github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/flowprobe/flowprobe.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.10.0-dev 4 // VPP: 23.10-rc0~170-g6f1548434 5 // source: plugins/flowprobe.api.json 6 7 // Package flowprobe contains generated bindings for API file flowprobe.api. 8 // 9 // Contents: 10 // - 4 enums 11 // - 12 messages 12 package flowprobe 13 14 import ( 15 "strconv" 16 17 interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" 18 api "go.fd.io/govpp/api" 19 codec "go.fd.io/govpp/codec" 20 ) 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the GoVPP api package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // GoVPP api package needs to be updated. 26 const _ = api.GoVppAPIPackageIsVersion2 27 28 const ( 29 APIFile = "flowprobe" 30 APIVersion = "2.1.0" 31 VersionCrc = 0x72c9c142 32 ) 33 34 // FlowprobeDirection defines enum 'flowprobe_direction'. 35 type FlowprobeDirection uint8 36 37 const ( 38 FLOWPROBE_DIRECTION_RX FlowprobeDirection = 0 39 FLOWPROBE_DIRECTION_TX FlowprobeDirection = 1 40 FLOWPROBE_DIRECTION_BOTH FlowprobeDirection = 2 41 ) 42 43 var ( 44 FlowprobeDirection_name = map[uint8]string{ 45 0: "FLOWPROBE_DIRECTION_RX", 46 1: "FLOWPROBE_DIRECTION_TX", 47 2: "FLOWPROBE_DIRECTION_BOTH", 48 } 49 FlowprobeDirection_value = map[string]uint8{ 50 "FLOWPROBE_DIRECTION_RX": 0, 51 "FLOWPROBE_DIRECTION_TX": 1, 52 "FLOWPROBE_DIRECTION_BOTH": 2, 53 } 54 ) 55 56 func (x FlowprobeDirection) String() string { 57 s, ok := FlowprobeDirection_name[uint8(x)] 58 if ok { 59 return s 60 } 61 return "FlowprobeDirection(" + strconv.Itoa(int(x)) + ")" 62 } 63 64 // FlowprobeRecordFlags defines enum 'flowprobe_record_flags'. 65 type FlowprobeRecordFlags uint8 66 67 const ( 68 FLOWPROBE_RECORD_FLAG_L2 FlowprobeRecordFlags = 1 69 FLOWPROBE_RECORD_FLAG_L3 FlowprobeRecordFlags = 2 70 FLOWPROBE_RECORD_FLAG_L4 FlowprobeRecordFlags = 4 71 ) 72 73 var ( 74 FlowprobeRecordFlags_name = map[uint8]string{ 75 1: "FLOWPROBE_RECORD_FLAG_L2", 76 2: "FLOWPROBE_RECORD_FLAG_L3", 77 4: "FLOWPROBE_RECORD_FLAG_L4", 78 } 79 FlowprobeRecordFlags_value = map[string]uint8{ 80 "FLOWPROBE_RECORD_FLAG_L2": 1, 81 "FLOWPROBE_RECORD_FLAG_L3": 2, 82 "FLOWPROBE_RECORD_FLAG_L4": 4, 83 } 84 ) 85 86 func (x FlowprobeRecordFlags) String() string { 87 s, ok := FlowprobeRecordFlags_name[uint8(x)] 88 if ok { 89 return s 90 } 91 str := func(n uint8) string { 92 s, ok := FlowprobeRecordFlags_name[uint8(n)] 93 if ok { 94 return s 95 } 96 return "FlowprobeRecordFlags(" + strconv.Itoa(int(n)) + ")" 97 } 98 for i := uint8(0); i <= 8; i++ { 99 val := uint8(x) 100 if val&(1<<i) != 0 { 101 if s != "" { 102 s += "|" 103 } 104 s += str(1 << i) 105 } 106 } 107 if s == "" { 108 return str(uint8(x)) 109 } 110 return s 111 } 112 113 // FlowprobeWhich defines enum 'flowprobe_which'. 114 type FlowprobeWhich uint8 115 116 const ( 117 FLOWPROBE_WHICH_IP4 FlowprobeWhich = 0 118 FLOWPROBE_WHICH_IP6 FlowprobeWhich = 1 119 FLOWPROBE_WHICH_L2 FlowprobeWhich = 2 120 ) 121 122 var ( 123 FlowprobeWhich_name = map[uint8]string{ 124 0: "FLOWPROBE_WHICH_IP4", 125 1: "FLOWPROBE_WHICH_IP6", 126 2: "FLOWPROBE_WHICH_L2", 127 } 128 FlowprobeWhich_value = map[string]uint8{ 129 "FLOWPROBE_WHICH_IP4": 0, 130 "FLOWPROBE_WHICH_IP6": 1, 131 "FLOWPROBE_WHICH_L2": 2, 132 } 133 ) 134 135 func (x FlowprobeWhich) String() string { 136 s, ok := FlowprobeWhich_name[uint8(x)] 137 if ok { 138 return s 139 } 140 return "FlowprobeWhich(" + strconv.Itoa(int(x)) + ")" 141 } 142 143 // FlowprobeWhichFlags defines enum 'flowprobe_which_flags'. 144 type FlowprobeWhichFlags uint8 145 146 const ( 147 FLOWPROBE_WHICH_FLAG_IP4 FlowprobeWhichFlags = 1 148 FLOWPROBE_WHICH_FLAG_L2 FlowprobeWhichFlags = 2 149 FLOWPROBE_WHICH_FLAG_IP6 FlowprobeWhichFlags = 4 150 ) 151 152 var ( 153 FlowprobeWhichFlags_name = map[uint8]string{ 154 1: "FLOWPROBE_WHICH_FLAG_IP4", 155 2: "FLOWPROBE_WHICH_FLAG_L2", 156 4: "FLOWPROBE_WHICH_FLAG_IP6", 157 } 158 FlowprobeWhichFlags_value = map[string]uint8{ 159 "FLOWPROBE_WHICH_FLAG_IP4": 1, 160 "FLOWPROBE_WHICH_FLAG_L2": 2, 161 "FLOWPROBE_WHICH_FLAG_IP6": 4, 162 } 163 ) 164 165 func (x FlowprobeWhichFlags) String() string { 166 s, ok := FlowprobeWhichFlags_name[uint8(x)] 167 if ok { 168 return s 169 } 170 str := func(n uint8) string { 171 s, ok := FlowprobeWhichFlags_name[uint8(n)] 172 if ok { 173 return s 174 } 175 return "FlowprobeWhichFlags(" + strconv.Itoa(int(n)) + ")" 176 } 177 for i := uint8(0); i <= 8; i++ { 178 val := uint8(x) 179 if val&(1<<i) != 0 { 180 if s != "" { 181 s += "|" 182 } 183 s += str(1 << i) 184 } 185 } 186 if s == "" { 187 return str(uint8(x)) 188 } 189 return s 190 } 191 192 // Get IPFIX flow record generation parameters 193 // FlowprobeGetParams defines message 'flowprobe_get_params'. 194 // InProgress: the message form may change in the future versions 195 type FlowprobeGetParams struct{} 196 197 func (m *FlowprobeGetParams) Reset() { *m = FlowprobeGetParams{} } 198 func (*FlowprobeGetParams) GetMessageName() string { return "flowprobe_get_params" } 199 func (*FlowprobeGetParams) GetCrcString() string { return "51077d14" } 200 func (*FlowprobeGetParams) GetMessageType() api.MessageType { 201 return api.RequestMessage 202 } 203 204 func (m *FlowprobeGetParams) Size() (size int) { 205 if m == nil { 206 return 0 207 } 208 return size 209 } 210 func (m *FlowprobeGetParams) Marshal(b []byte) ([]byte, error) { 211 if b == nil { 212 b = make([]byte, m.Size()) 213 } 214 buf := codec.NewBuffer(b) 215 return buf.Bytes(), nil 216 } 217 func (m *FlowprobeGetParams) Unmarshal(b []byte) error { 218 return nil 219 } 220 221 // Reply to get IPFIX flow record generation parameters 222 // - retval - error (0 is "no error") 223 // - record_flags - flags indicating what data to record 224 // - active_timer - time in seconds after which active flow records are 225 // to be exported (0 is "off") 226 // - passive_timer - time in seconds after which passive flow records are 227 // to be deleted (0 is "off") 228 // 229 // FlowprobeGetParamsReply defines message 'flowprobe_get_params_reply'. 230 // InProgress: the message form may change in the future versions 231 type FlowprobeGetParamsReply struct { 232 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 233 RecordFlags FlowprobeRecordFlags `binapi:"flowprobe_record_flags,name=record_flags" json:"record_flags,omitempty"` 234 ActiveTimer uint32 `binapi:"u32,name=active_timer" json:"active_timer,omitempty"` 235 PassiveTimer uint32 `binapi:"u32,name=passive_timer" json:"passive_timer,omitempty"` 236 } 237 238 func (m *FlowprobeGetParamsReply) Reset() { *m = FlowprobeGetParamsReply{} } 239 func (*FlowprobeGetParamsReply) GetMessageName() string { return "flowprobe_get_params_reply" } 240 func (*FlowprobeGetParamsReply) GetCrcString() string { return "f350d621" } 241 func (*FlowprobeGetParamsReply) GetMessageType() api.MessageType { 242 return api.ReplyMessage 243 } 244 245 func (m *FlowprobeGetParamsReply) Size() (size int) { 246 if m == nil { 247 return 0 248 } 249 size += 4 // m.Retval 250 size += 1 // m.RecordFlags 251 size += 4 // m.ActiveTimer 252 size += 4 // m.PassiveTimer 253 return size 254 } 255 func (m *FlowprobeGetParamsReply) Marshal(b []byte) ([]byte, error) { 256 if b == nil { 257 b = make([]byte, m.Size()) 258 } 259 buf := codec.NewBuffer(b) 260 buf.EncodeInt32(m.Retval) 261 buf.EncodeUint8(uint8(m.RecordFlags)) 262 buf.EncodeUint32(m.ActiveTimer) 263 buf.EncodeUint32(m.PassiveTimer) 264 return buf.Bytes(), nil 265 } 266 func (m *FlowprobeGetParamsReply) Unmarshal(b []byte) error { 267 buf := codec.NewBuffer(b) 268 m.Retval = buf.DecodeInt32() 269 m.RecordFlags = FlowprobeRecordFlags(buf.DecodeUint8()) 270 m.ActiveTimer = buf.DecodeUint32() 271 m.PassiveTimer = buf.DecodeUint32() 272 return nil 273 } 274 275 // Enable or disable IPFIX flow record generation on an interface 276 // - is_add - add interface if non-zero, else delete 277 // - which - datapath on which to record flows 278 // - direction - direction of recorded flows 279 // - sw_if_index - index of the interface 280 // 281 // FlowprobeInterfaceAddDel defines message 'flowprobe_interface_add_del'. 282 // InProgress: the message form may change in the future versions 283 type FlowprobeInterfaceAddDel struct { 284 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 285 Which FlowprobeWhich `binapi:"flowprobe_which,name=which" json:"which,omitempty"` 286 Direction FlowprobeDirection `binapi:"flowprobe_direction,name=direction" json:"direction,omitempty"` 287 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 288 } 289 290 func (m *FlowprobeInterfaceAddDel) Reset() { *m = FlowprobeInterfaceAddDel{} } 291 func (*FlowprobeInterfaceAddDel) GetMessageName() string { return "flowprobe_interface_add_del" } 292 func (*FlowprobeInterfaceAddDel) GetCrcString() string { return "3420739c" } 293 func (*FlowprobeInterfaceAddDel) GetMessageType() api.MessageType { 294 return api.RequestMessage 295 } 296 297 func (m *FlowprobeInterfaceAddDel) Size() (size int) { 298 if m == nil { 299 return 0 300 } 301 size += 1 // m.IsAdd 302 size += 1 // m.Which 303 size += 1 // m.Direction 304 size += 4 // m.SwIfIndex 305 return size 306 } 307 func (m *FlowprobeInterfaceAddDel) Marshal(b []byte) ([]byte, error) { 308 if b == nil { 309 b = make([]byte, m.Size()) 310 } 311 buf := codec.NewBuffer(b) 312 buf.EncodeBool(m.IsAdd) 313 buf.EncodeUint8(uint8(m.Which)) 314 buf.EncodeUint8(uint8(m.Direction)) 315 buf.EncodeUint32(uint32(m.SwIfIndex)) 316 return buf.Bytes(), nil 317 } 318 func (m *FlowprobeInterfaceAddDel) Unmarshal(b []byte) error { 319 buf := codec.NewBuffer(b) 320 m.IsAdd = buf.DecodeBool() 321 m.Which = FlowprobeWhich(buf.DecodeUint8()) 322 m.Direction = FlowprobeDirection(buf.DecodeUint8()) 323 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 324 return nil 325 } 326 327 // FlowprobeInterfaceAddDelReply defines message 'flowprobe_interface_add_del_reply'. 328 // InProgress: the message form may change in the future versions 329 type FlowprobeInterfaceAddDelReply struct { 330 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 331 } 332 333 func (m *FlowprobeInterfaceAddDelReply) Reset() { *m = FlowprobeInterfaceAddDelReply{} } 334 func (*FlowprobeInterfaceAddDelReply) GetMessageName() string { 335 return "flowprobe_interface_add_del_reply" 336 } 337 func (*FlowprobeInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } 338 func (*FlowprobeInterfaceAddDelReply) GetMessageType() api.MessageType { 339 return api.ReplyMessage 340 } 341 342 func (m *FlowprobeInterfaceAddDelReply) Size() (size int) { 343 if m == nil { 344 return 0 345 } 346 size += 4 // m.Retval 347 return size 348 } 349 func (m *FlowprobeInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) { 350 if b == nil { 351 b = make([]byte, m.Size()) 352 } 353 buf := codec.NewBuffer(b) 354 buf.EncodeInt32(m.Retval) 355 return buf.Bytes(), nil 356 } 357 func (m *FlowprobeInterfaceAddDelReply) Unmarshal(b []byte) error { 358 buf := codec.NewBuffer(b) 359 m.Retval = buf.DecodeInt32() 360 return nil 361 } 362 363 // Details about IPFIX flow record generation enabled on interface 364 // - which - datapath on which to record flows 365 // - direction - direction of recorded flows 366 // - sw_if_index - index of the interface 367 // 368 // FlowprobeInterfaceDetails defines message 'flowprobe_interface_details'. 369 // InProgress: the message form may change in the future versions 370 type FlowprobeInterfaceDetails struct { 371 Which FlowprobeWhich `binapi:"flowprobe_which,name=which" json:"which,omitempty"` 372 Direction FlowprobeDirection `binapi:"flowprobe_direction,name=direction" json:"direction,omitempty"` 373 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 374 } 375 376 func (m *FlowprobeInterfaceDetails) Reset() { *m = FlowprobeInterfaceDetails{} } 377 func (*FlowprobeInterfaceDetails) GetMessageName() string { return "flowprobe_interface_details" } 378 func (*FlowprobeInterfaceDetails) GetCrcString() string { return "427d77e0" } 379 func (*FlowprobeInterfaceDetails) GetMessageType() api.MessageType { 380 return api.ReplyMessage 381 } 382 383 func (m *FlowprobeInterfaceDetails) Size() (size int) { 384 if m == nil { 385 return 0 386 } 387 size += 1 // m.Which 388 size += 1 // m.Direction 389 size += 4 // m.SwIfIndex 390 return size 391 } 392 func (m *FlowprobeInterfaceDetails) Marshal(b []byte) ([]byte, error) { 393 if b == nil { 394 b = make([]byte, m.Size()) 395 } 396 buf := codec.NewBuffer(b) 397 buf.EncodeUint8(uint8(m.Which)) 398 buf.EncodeUint8(uint8(m.Direction)) 399 buf.EncodeUint32(uint32(m.SwIfIndex)) 400 return buf.Bytes(), nil 401 } 402 func (m *FlowprobeInterfaceDetails) Unmarshal(b []byte) error { 403 buf := codec.NewBuffer(b) 404 m.Which = FlowprobeWhich(buf.DecodeUint8()) 405 m.Direction = FlowprobeDirection(buf.DecodeUint8()) 406 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 407 return nil 408 } 409 410 // Dump interfaces for which IPFIX flow record generation is enabled 411 // - sw_if_index - interface index to use as filter (0xffffffff is "all") 412 // 413 // FlowprobeInterfaceDump defines message 'flowprobe_interface_dump'. 414 // InProgress: the message form may change in the future versions 415 type FlowprobeInterfaceDump struct { 416 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` 417 } 418 419 func (m *FlowprobeInterfaceDump) Reset() { *m = FlowprobeInterfaceDump{} } 420 func (*FlowprobeInterfaceDump) GetMessageName() string { return "flowprobe_interface_dump" } 421 func (*FlowprobeInterfaceDump) GetCrcString() string { return "f9e6675e" } 422 func (*FlowprobeInterfaceDump) GetMessageType() api.MessageType { 423 return api.RequestMessage 424 } 425 426 func (m *FlowprobeInterfaceDump) Size() (size int) { 427 if m == nil { 428 return 0 429 } 430 size += 4 // m.SwIfIndex 431 return size 432 } 433 func (m *FlowprobeInterfaceDump) Marshal(b []byte) ([]byte, error) { 434 if b == nil { 435 b = make([]byte, m.Size()) 436 } 437 buf := codec.NewBuffer(b) 438 buf.EncodeUint32(uint32(m.SwIfIndex)) 439 return buf.Bytes(), nil 440 } 441 func (m *FlowprobeInterfaceDump) Unmarshal(b []byte) error { 442 buf := codec.NewBuffer(b) 443 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 444 return nil 445 } 446 447 // FlowprobeParams defines message 'flowprobe_params'. 448 type FlowprobeParams struct { 449 RecordFlags FlowprobeRecordFlags `binapi:"flowprobe_record_flags,name=record_flags" json:"record_flags,omitempty"` 450 ActiveTimer uint32 `binapi:"u32,name=active_timer" json:"active_timer,omitempty"` 451 PassiveTimer uint32 `binapi:"u32,name=passive_timer" json:"passive_timer,omitempty"` 452 } 453 454 func (m *FlowprobeParams) Reset() { *m = FlowprobeParams{} } 455 func (*FlowprobeParams) GetMessageName() string { return "flowprobe_params" } 456 func (*FlowprobeParams) GetCrcString() string { return "baa46c09" } 457 func (*FlowprobeParams) GetMessageType() api.MessageType { 458 return api.RequestMessage 459 } 460 461 func (m *FlowprobeParams) Size() (size int) { 462 if m == nil { 463 return 0 464 } 465 size += 1 // m.RecordFlags 466 size += 4 // m.ActiveTimer 467 size += 4 // m.PassiveTimer 468 return size 469 } 470 func (m *FlowprobeParams) Marshal(b []byte) ([]byte, error) { 471 if b == nil { 472 b = make([]byte, m.Size()) 473 } 474 buf := codec.NewBuffer(b) 475 buf.EncodeUint8(uint8(m.RecordFlags)) 476 buf.EncodeUint32(m.ActiveTimer) 477 buf.EncodeUint32(m.PassiveTimer) 478 return buf.Bytes(), nil 479 } 480 func (m *FlowprobeParams) Unmarshal(b []byte) error { 481 buf := codec.NewBuffer(b) 482 m.RecordFlags = FlowprobeRecordFlags(buf.DecodeUint8()) 483 m.ActiveTimer = buf.DecodeUint32() 484 m.PassiveTimer = buf.DecodeUint32() 485 return nil 486 } 487 488 // FlowprobeParamsReply defines message 'flowprobe_params_reply'. 489 type FlowprobeParamsReply struct { 490 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 491 } 492 493 func (m *FlowprobeParamsReply) Reset() { *m = FlowprobeParamsReply{} } 494 func (*FlowprobeParamsReply) GetMessageName() string { return "flowprobe_params_reply" } 495 func (*FlowprobeParamsReply) GetCrcString() string { return "e8d4e804" } 496 func (*FlowprobeParamsReply) GetMessageType() api.MessageType { 497 return api.ReplyMessage 498 } 499 500 func (m *FlowprobeParamsReply) Size() (size int) { 501 if m == nil { 502 return 0 503 } 504 size += 4 // m.Retval 505 return size 506 } 507 func (m *FlowprobeParamsReply) Marshal(b []byte) ([]byte, error) { 508 if b == nil { 509 b = make([]byte, m.Size()) 510 } 511 buf := codec.NewBuffer(b) 512 buf.EncodeInt32(m.Retval) 513 return buf.Bytes(), nil 514 } 515 func (m *FlowprobeParamsReply) Unmarshal(b []byte) error { 516 buf := codec.NewBuffer(b) 517 m.Retval = buf.DecodeInt32() 518 return nil 519 } 520 521 // Set IPFIX flow record generation parameters 522 // - record_flags - flags indicating what data to record 523 // - active_timer - time in seconds after which active flow records are 524 // to be exported (0 is "off", 0xffffffff is "use default value") 525 // - passive_timer - time in seconds after which passive flow records are 526 // to be deleted (0 is "off", 0xffffffff is "use default value") 527 // 528 // FlowprobeSetParams defines message 'flowprobe_set_params'. 529 // InProgress: the message form may change in the future versions 530 type FlowprobeSetParams struct { 531 RecordFlags FlowprobeRecordFlags `binapi:"flowprobe_record_flags,name=record_flags" json:"record_flags,omitempty"` 532 ActiveTimer uint32 `binapi:"u32,name=active_timer,default=4294967295" json:"active_timer,omitempty"` 533 PassiveTimer uint32 `binapi:"u32,name=passive_timer,default=4294967295" json:"passive_timer,omitempty"` 534 } 535 536 func (m *FlowprobeSetParams) Reset() { *m = FlowprobeSetParams{} } 537 func (*FlowprobeSetParams) GetMessageName() string { return "flowprobe_set_params" } 538 func (*FlowprobeSetParams) GetCrcString() string { return "baa46c09" } 539 func (*FlowprobeSetParams) GetMessageType() api.MessageType { 540 return api.RequestMessage 541 } 542 543 func (m *FlowprobeSetParams) Size() (size int) { 544 if m == nil { 545 return 0 546 } 547 size += 1 // m.RecordFlags 548 size += 4 // m.ActiveTimer 549 size += 4 // m.PassiveTimer 550 return size 551 } 552 func (m *FlowprobeSetParams) Marshal(b []byte) ([]byte, error) { 553 if b == nil { 554 b = make([]byte, m.Size()) 555 } 556 buf := codec.NewBuffer(b) 557 buf.EncodeUint8(uint8(m.RecordFlags)) 558 buf.EncodeUint32(m.ActiveTimer) 559 buf.EncodeUint32(m.PassiveTimer) 560 return buf.Bytes(), nil 561 } 562 func (m *FlowprobeSetParams) Unmarshal(b []byte) error { 563 buf := codec.NewBuffer(b) 564 m.RecordFlags = FlowprobeRecordFlags(buf.DecodeUint8()) 565 m.ActiveTimer = buf.DecodeUint32() 566 m.PassiveTimer = buf.DecodeUint32() 567 return nil 568 } 569 570 // FlowprobeSetParamsReply defines message 'flowprobe_set_params_reply'. 571 // InProgress: the message form may change in the future versions 572 type FlowprobeSetParamsReply struct { 573 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 574 } 575 576 func (m *FlowprobeSetParamsReply) Reset() { *m = FlowprobeSetParamsReply{} } 577 func (*FlowprobeSetParamsReply) GetMessageName() string { return "flowprobe_set_params_reply" } 578 func (*FlowprobeSetParamsReply) GetCrcString() string { return "e8d4e804" } 579 func (*FlowprobeSetParamsReply) GetMessageType() api.MessageType { 580 return api.ReplyMessage 581 } 582 583 func (m *FlowprobeSetParamsReply) Size() (size int) { 584 if m == nil { 585 return 0 586 } 587 size += 4 // m.Retval 588 return size 589 } 590 func (m *FlowprobeSetParamsReply) Marshal(b []byte) ([]byte, error) { 591 if b == nil { 592 b = make([]byte, m.Size()) 593 } 594 buf := codec.NewBuffer(b) 595 buf.EncodeInt32(m.Retval) 596 return buf.Bytes(), nil 597 } 598 func (m *FlowprobeSetParamsReply) Unmarshal(b []byte) error { 599 buf := codec.NewBuffer(b) 600 m.Retval = buf.DecodeInt32() 601 return nil 602 } 603 604 // Enable / disable per-packet IPFIX recording on an interface 605 // - is_add - add address if non-zero, else delete 606 // - which - flags indicating forwarding path 607 // - sw_if_index - index of the interface 608 // 609 // FlowprobeTxInterfaceAddDel defines message 'flowprobe_tx_interface_add_del'. 610 type FlowprobeTxInterfaceAddDel struct { 611 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 612 Which FlowprobeWhichFlags `binapi:"flowprobe_which_flags,name=which" json:"which,omitempty"` 613 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 614 } 615 616 func (m *FlowprobeTxInterfaceAddDel) Reset() { *m = FlowprobeTxInterfaceAddDel{} } 617 func (*FlowprobeTxInterfaceAddDel) GetMessageName() string { return "flowprobe_tx_interface_add_del" } 618 func (*FlowprobeTxInterfaceAddDel) GetCrcString() string { return "b782c976" } 619 func (*FlowprobeTxInterfaceAddDel) GetMessageType() api.MessageType { 620 return api.RequestMessage 621 } 622 623 func (m *FlowprobeTxInterfaceAddDel) Size() (size int) { 624 if m == nil { 625 return 0 626 } 627 size += 1 // m.IsAdd 628 size += 1 // m.Which 629 size += 4 // m.SwIfIndex 630 return size 631 } 632 func (m *FlowprobeTxInterfaceAddDel) Marshal(b []byte) ([]byte, error) { 633 if b == nil { 634 b = make([]byte, m.Size()) 635 } 636 buf := codec.NewBuffer(b) 637 buf.EncodeBool(m.IsAdd) 638 buf.EncodeUint8(uint8(m.Which)) 639 buf.EncodeUint32(uint32(m.SwIfIndex)) 640 return buf.Bytes(), nil 641 } 642 func (m *FlowprobeTxInterfaceAddDel) Unmarshal(b []byte) error { 643 buf := codec.NewBuffer(b) 644 m.IsAdd = buf.DecodeBool() 645 m.Which = FlowprobeWhichFlags(buf.DecodeUint8()) 646 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 647 return nil 648 } 649 650 // FlowprobeTxInterfaceAddDelReply defines message 'flowprobe_tx_interface_add_del_reply'. 651 type FlowprobeTxInterfaceAddDelReply struct { 652 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 653 } 654 655 func (m *FlowprobeTxInterfaceAddDelReply) Reset() { *m = FlowprobeTxInterfaceAddDelReply{} } 656 func (*FlowprobeTxInterfaceAddDelReply) GetMessageName() string { 657 return "flowprobe_tx_interface_add_del_reply" 658 } 659 func (*FlowprobeTxInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } 660 func (*FlowprobeTxInterfaceAddDelReply) GetMessageType() api.MessageType { 661 return api.ReplyMessage 662 } 663 664 func (m *FlowprobeTxInterfaceAddDelReply) Size() (size int) { 665 if m == nil { 666 return 0 667 } 668 size += 4 // m.Retval 669 return size 670 } 671 func (m *FlowprobeTxInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) { 672 if b == nil { 673 b = make([]byte, m.Size()) 674 } 675 buf := codec.NewBuffer(b) 676 buf.EncodeInt32(m.Retval) 677 return buf.Bytes(), nil 678 } 679 func (m *FlowprobeTxInterfaceAddDelReply) Unmarshal(b []byte) error { 680 buf := codec.NewBuffer(b) 681 m.Retval = buf.DecodeInt32() 682 return nil 683 } 684 685 func init() { file_flowprobe_binapi_init() } 686 func file_flowprobe_binapi_init() { 687 api.RegisterMessage((*FlowprobeGetParams)(nil), "flowprobe_get_params_51077d14") 688 api.RegisterMessage((*FlowprobeGetParamsReply)(nil), "flowprobe_get_params_reply_f350d621") 689 api.RegisterMessage((*FlowprobeInterfaceAddDel)(nil), "flowprobe_interface_add_del_3420739c") 690 api.RegisterMessage((*FlowprobeInterfaceAddDelReply)(nil), "flowprobe_interface_add_del_reply_e8d4e804") 691 api.RegisterMessage((*FlowprobeInterfaceDetails)(nil), "flowprobe_interface_details_427d77e0") 692 api.RegisterMessage((*FlowprobeInterfaceDump)(nil), "flowprobe_interface_dump_f9e6675e") 693 api.RegisterMessage((*FlowprobeParams)(nil), "flowprobe_params_baa46c09") 694 api.RegisterMessage((*FlowprobeParamsReply)(nil), "flowprobe_params_reply_e8d4e804") 695 api.RegisterMessage((*FlowprobeSetParams)(nil), "flowprobe_set_params_baa46c09") 696 api.RegisterMessage((*FlowprobeSetParamsReply)(nil), "flowprobe_set_params_reply_e8d4e804") 697 api.RegisterMessage((*FlowprobeTxInterfaceAddDel)(nil), "flowprobe_tx_interface_add_del_b782c976") 698 api.RegisterMessage((*FlowprobeTxInterfaceAddDelReply)(nil), "flowprobe_tx_interface_add_del_reply_e8d4e804") 699 } 700 701 // Messages returns list of all messages in this module. 702 func AllMessages() []api.Message { 703 return []api.Message{ 704 (*FlowprobeGetParams)(nil), 705 (*FlowprobeGetParamsReply)(nil), 706 (*FlowprobeInterfaceAddDel)(nil), 707 (*FlowprobeInterfaceAddDelReply)(nil), 708 (*FlowprobeInterfaceDetails)(nil), 709 (*FlowprobeInterfaceDump)(nil), 710 (*FlowprobeParams)(nil), 711 (*FlowprobeParamsReply)(nil), 712 (*FlowprobeSetParams)(nil), 713 (*FlowprobeSetParamsReply)(nil), 714 (*FlowprobeTxInterfaceAddDel)(nil), 715 (*FlowprobeTxInterfaceAddDelReply)(nil), 716 } 717 }