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