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