go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2101/l2/l2.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package l2 contains generated bindings for API file l2.api. 4 // 5 // Contents: 6 // - 3 enums 7 // - 3 structs 8 // - 54 messages 9 package l2 10 11 import ( 12 "strconv" 13 14 api "go.fd.io/govpp/api" 15 codec "go.fd.io/govpp/codec" 16 ethernet_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ethernet_types" 17 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/interface_types" 18 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ip_types" 19 ) 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the GoVPP api package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // GoVPP api package needs to be updated. 25 const _ = api.GoVppAPIPackageIsVersion2 26 27 const ( 28 APIFile = "l2" 29 APIVersion = "3.0.0" 30 VersionCrc = 0xd8cb45a8 31 ) 32 33 // BdFlags defines enum 'bd_flags'. 34 type BdFlags uint32 35 36 const ( 37 BRIDGE_API_FLAG_NONE BdFlags = 0 38 BRIDGE_API_FLAG_LEARN BdFlags = 1 39 BRIDGE_API_FLAG_FWD BdFlags = 2 40 BRIDGE_API_FLAG_FLOOD BdFlags = 4 41 BRIDGE_API_FLAG_UU_FLOOD BdFlags = 8 42 BRIDGE_API_FLAG_ARP_TERM BdFlags = 16 43 BRIDGE_API_FLAG_ARP_UFWD BdFlags = 32 44 ) 45 46 var ( 47 BdFlags_name = map[uint32]string{ 48 0: "BRIDGE_API_FLAG_NONE", 49 1: "BRIDGE_API_FLAG_LEARN", 50 2: "BRIDGE_API_FLAG_FWD", 51 4: "BRIDGE_API_FLAG_FLOOD", 52 8: "BRIDGE_API_FLAG_UU_FLOOD", 53 16: "BRIDGE_API_FLAG_ARP_TERM", 54 32: "BRIDGE_API_FLAG_ARP_UFWD", 55 } 56 BdFlags_value = map[string]uint32{ 57 "BRIDGE_API_FLAG_NONE": 0, 58 "BRIDGE_API_FLAG_LEARN": 1, 59 "BRIDGE_API_FLAG_FWD": 2, 60 "BRIDGE_API_FLAG_FLOOD": 4, 61 "BRIDGE_API_FLAG_UU_FLOOD": 8, 62 "BRIDGE_API_FLAG_ARP_TERM": 16, 63 "BRIDGE_API_FLAG_ARP_UFWD": 32, 64 } 65 ) 66 67 func (x BdFlags) String() string { 68 s, ok := BdFlags_name[uint32(x)] 69 if ok { 70 return s 71 } 72 str := func(n uint32) string { 73 s, ok := BdFlags_name[uint32(n)] 74 if ok { 75 return s 76 } 77 return "BdFlags(" + strconv.Itoa(int(n)) + ")" 78 } 79 for i := uint32(0); i <= 32; i++ { 80 val := uint32(x) 81 if val&(1<<i) != 0 { 82 if s != "" { 83 s += "|" 84 } 85 s += str(1 << i) 86 } 87 } 88 if s == "" { 89 return str(uint32(x)) 90 } 91 return s 92 } 93 94 // L2PortType defines enum 'l2_port_type'. 95 type L2PortType uint32 96 97 const ( 98 L2_API_PORT_TYPE_NORMAL L2PortType = 0 99 L2_API_PORT_TYPE_BVI L2PortType = 1 100 L2_API_PORT_TYPE_UU_FWD L2PortType = 2 101 ) 102 103 var ( 104 L2PortType_name = map[uint32]string{ 105 0: "L2_API_PORT_TYPE_NORMAL", 106 1: "L2_API_PORT_TYPE_BVI", 107 2: "L2_API_PORT_TYPE_UU_FWD", 108 } 109 L2PortType_value = map[string]uint32{ 110 "L2_API_PORT_TYPE_NORMAL": 0, 111 "L2_API_PORT_TYPE_BVI": 1, 112 "L2_API_PORT_TYPE_UU_FWD": 2, 113 } 114 ) 115 116 func (x L2PortType) String() string { 117 s, ok := L2PortType_name[uint32(x)] 118 if ok { 119 return s 120 } 121 return "L2PortType(" + strconv.Itoa(int(x)) + ")" 122 } 123 124 // MacEventAction defines enum 'mac_event_action'. 125 type MacEventAction uint32 126 127 const ( 128 MAC_EVENT_ACTION_API_ADD MacEventAction = 0 129 MAC_EVENT_ACTION_API_DELETE MacEventAction = 1 130 MAC_EVENT_ACTION_API_MOVE MacEventAction = 2 131 ) 132 133 var ( 134 MacEventAction_name = map[uint32]string{ 135 0: "MAC_EVENT_ACTION_API_ADD", 136 1: "MAC_EVENT_ACTION_API_DELETE", 137 2: "MAC_EVENT_ACTION_API_MOVE", 138 } 139 MacEventAction_value = map[string]uint32{ 140 "MAC_EVENT_ACTION_API_ADD": 0, 141 "MAC_EVENT_ACTION_API_DELETE": 1, 142 "MAC_EVENT_ACTION_API_MOVE": 2, 143 } 144 ) 145 146 func (x MacEventAction) String() string { 147 s, ok := MacEventAction_name[uint32(x)] 148 if ok { 149 return s 150 } 151 return "MacEventAction(" + strconv.Itoa(int(x)) + ")" 152 } 153 154 // BdIPMac defines type 'bd_ip_mac'. 155 type BdIPMac struct { 156 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 157 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"` 158 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` 159 } 160 161 // BridgeDomainSwIf defines type 'bridge_domain_sw_if'. 162 type BridgeDomainSwIf struct { 163 Context uint32 `binapi:"u32,name=context" json:"context,omitempty"` 164 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 165 Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"` 166 } 167 168 // MacEntry defines type 'mac_entry'. 169 type MacEntry struct { 170 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 171 MacAddr ethernet_types.MacAddress `binapi:"mac_address,name=mac_addr" json:"mac_addr,omitempty"` 172 Action MacEventAction `binapi:"mac_event_action,name=action" json:"action,omitempty"` 173 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"` 174 } 175 176 // BdIPMacAddDel defines message 'bd_ip_mac_add_del'. 177 type BdIPMacAddDel struct { 178 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 179 Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"` 180 } 181 182 func (m *BdIPMacAddDel) Reset() { *m = BdIPMacAddDel{} } 183 func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" } 184 func (*BdIPMacAddDel) GetCrcString() string { return "5f2b84e2" } 185 func (*BdIPMacAddDel) GetMessageType() api.MessageType { 186 return api.RequestMessage 187 } 188 189 func (m *BdIPMacAddDel) Size() (size int) { 190 if m == nil { 191 return 0 192 } 193 size += 1 // m.IsAdd 194 size += 4 // m.Entry.BdID 195 size += 1 // m.Entry.IP.Af 196 size += 1 * 16 // m.Entry.IP.Un 197 size += 1 * 6 // m.Entry.Mac 198 return size 199 } 200 func (m *BdIPMacAddDel) Marshal(b []byte) ([]byte, error) { 201 if b == nil { 202 b = make([]byte, m.Size()) 203 } 204 buf := codec.NewBuffer(b) 205 buf.EncodeBool(m.IsAdd) 206 buf.EncodeUint32(m.Entry.BdID) 207 buf.EncodeUint8(uint8(m.Entry.IP.Af)) 208 buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16) 209 buf.EncodeBytes(m.Entry.Mac[:], 6) 210 return buf.Bytes(), nil 211 } 212 func (m *BdIPMacAddDel) Unmarshal(b []byte) error { 213 buf := codec.NewBuffer(b) 214 m.IsAdd = buf.DecodeBool() 215 m.Entry.BdID = buf.DecodeUint32() 216 m.Entry.IP.Af = ip_types.AddressFamily(buf.DecodeUint8()) 217 copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 218 copy(m.Entry.Mac[:], buf.DecodeBytes(6)) 219 return nil 220 } 221 222 // BdIPMacAddDelReply defines message 'bd_ip_mac_add_del_reply'. 223 type BdIPMacAddDelReply struct { 224 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 225 } 226 227 func (m *BdIPMacAddDelReply) Reset() { *m = BdIPMacAddDelReply{} } 228 func (*BdIPMacAddDelReply) GetMessageName() string { return "bd_ip_mac_add_del_reply" } 229 func (*BdIPMacAddDelReply) GetCrcString() string { return "e8d4e804" } 230 func (*BdIPMacAddDelReply) GetMessageType() api.MessageType { 231 return api.ReplyMessage 232 } 233 234 func (m *BdIPMacAddDelReply) Size() (size int) { 235 if m == nil { 236 return 0 237 } 238 size += 4 // m.Retval 239 return size 240 } 241 func (m *BdIPMacAddDelReply) Marshal(b []byte) ([]byte, error) { 242 if b == nil { 243 b = make([]byte, m.Size()) 244 } 245 buf := codec.NewBuffer(b) 246 buf.EncodeInt32(m.Retval) 247 return buf.Bytes(), nil 248 } 249 func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error { 250 buf := codec.NewBuffer(b) 251 m.Retval = buf.DecodeInt32() 252 return nil 253 } 254 255 // BdIPMacDetails defines message 'bd_ip_mac_details'. 256 type BdIPMacDetails struct { 257 Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"` 258 } 259 260 func (m *BdIPMacDetails) Reset() { *m = BdIPMacDetails{} } 261 func (*BdIPMacDetails) GetMessageName() string { return "bd_ip_mac_details" } 262 func (*BdIPMacDetails) GetCrcString() string { return "a52f8044" } 263 func (*BdIPMacDetails) GetMessageType() api.MessageType { 264 return api.ReplyMessage 265 } 266 267 func (m *BdIPMacDetails) Size() (size int) { 268 if m == nil { 269 return 0 270 } 271 size += 4 // m.Entry.BdID 272 size += 1 // m.Entry.IP.Af 273 size += 1 * 16 // m.Entry.IP.Un 274 size += 1 * 6 // m.Entry.Mac 275 return size 276 } 277 func (m *BdIPMacDetails) Marshal(b []byte) ([]byte, error) { 278 if b == nil { 279 b = make([]byte, m.Size()) 280 } 281 buf := codec.NewBuffer(b) 282 buf.EncodeUint32(m.Entry.BdID) 283 buf.EncodeUint8(uint8(m.Entry.IP.Af)) 284 buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16) 285 buf.EncodeBytes(m.Entry.Mac[:], 6) 286 return buf.Bytes(), nil 287 } 288 func (m *BdIPMacDetails) Unmarshal(b []byte) error { 289 buf := codec.NewBuffer(b) 290 m.Entry.BdID = buf.DecodeUint32() 291 m.Entry.IP.Af = ip_types.AddressFamily(buf.DecodeUint8()) 292 copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 293 copy(m.Entry.Mac[:], buf.DecodeBytes(6)) 294 return nil 295 } 296 297 // BdIPMacDump defines message 'bd_ip_mac_dump'. 298 type BdIPMacDump struct { 299 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 300 } 301 302 func (m *BdIPMacDump) Reset() { *m = BdIPMacDump{} } 303 func (*BdIPMacDump) GetMessageName() string { return "bd_ip_mac_dump" } 304 func (*BdIPMacDump) GetCrcString() string { return "c25fdce6" } 305 func (*BdIPMacDump) GetMessageType() api.MessageType { 306 return api.RequestMessage 307 } 308 309 func (m *BdIPMacDump) Size() (size int) { 310 if m == nil { 311 return 0 312 } 313 size += 4 // m.BdID 314 return size 315 } 316 func (m *BdIPMacDump) Marshal(b []byte) ([]byte, error) { 317 if b == nil { 318 b = make([]byte, m.Size()) 319 } 320 buf := codec.NewBuffer(b) 321 buf.EncodeUint32(m.BdID) 322 return buf.Bytes(), nil 323 } 324 func (m *BdIPMacDump) Unmarshal(b []byte) error { 325 buf := codec.NewBuffer(b) 326 m.BdID = buf.DecodeUint32() 327 return nil 328 } 329 330 // BdIPMacFlush defines message 'bd_ip_mac_flush'. 331 type BdIPMacFlush struct { 332 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 333 } 334 335 func (m *BdIPMacFlush) Reset() { *m = BdIPMacFlush{} } 336 func (*BdIPMacFlush) GetMessageName() string { return "bd_ip_mac_flush" } 337 func (*BdIPMacFlush) GetCrcString() string { return "c25fdce6" } 338 func (*BdIPMacFlush) GetMessageType() api.MessageType { 339 return api.RequestMessage 340 } 341 342 func (m *BdIPMacFlush) Size() (size int) { 343 if m == nil { 344 return 0 345 } 346 size += 4 // m.BdID 347 return size 348 } 349 func (m *BdIPMacFlush) Marshal(b []byte) ([]byte, error) { 350 if b == nil { 351 b = make([]byte, m.Size()) 352 } 353 buf := codec.NewBuffer(b) 354 buf.EncodeUint32(m.BdID) 355 return buf.Bytes(), nil 356 } 357 func (m *BdIPMacFlush) Unmarshal(b []byte) error { 358 buf := codec.NewBuffer(b) 359 m.BdID = buf.DecodeUint32() 360 return nil 361 } 362 363 // BdIPMacFlushReply defines message 'bd_ip_mac_flush_reply'. 364 type BdIPMacFlushReply struct { 365 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 366 } 367 368 func (m *BdIPMacFlushReply) Reset() { *m = BdIPMacFlushReply{} } 369 func (*BdIPMacFlushReply) GetMessageName() string { return "bd_ip_mac_flush_reply" } 370 func (*BdIPMacFlushReply) GetCrcString() string { return "e8d4e804" } 371 func (*BdIPMacFlushReply) GetMessageType() api.MessageType { 372 return api.ReplyMessage 373 } 374 375 func (m *BdIPMacFlushReply) Size() (size int) { 376 if m == nil { 377 return 0 378 } 379 size += 4 // m.Retval 380 return size 381 } 382 func (m *BdIPMacFlushReply) Marshal(b []byte) ([]byte, error) { 383 if b == nil { 384 b = make([]byte, m.Size()) 385 } 386 buf := codec.NewBuffer(b) 387 buf.EncodeInt32(m.Retval) 388 return buf.Bytes(), nil 389 } 390 func (m *BdIPMacFlushReply) Unmarshal(b []byte) error { 391 buf := codec.NewBuffer(b) 392 m.Retval = buf.DecodeInt32() 393 return nil 394 } 395 396 // BridgeDomainAddDel defines message 'bridge_domain_add_del'. 397 type BridgeDomainAddDel struct { 398 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 399 Flood bool `binapi:"bool,name=flood" json:"flood,omitempty"` 400 UuFlood bool `binapi:"bool,name=uu_flood" json:"uu_flood,omitempty"` 401 Forward bool `binapi:"bool,name=forward" json:"forward,omitempty"` 402 Learn bool `binapi:"bool,name=learn" json:"learn,omitempty"` 403 ArpTerm bool `binapi:"bool,name=arp_term" json:"arp_term,omitempty"` 404 ArpUfwd bool `binapi:"bool,name=arp_ufwd" json:"arp_ufwd,omitempty"` 405 MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"` 406 BdTag string `binapi:"string[64],name=bd_tag" json:"bd_tag,omitempty"` 407 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 408 } 409 410 func (m *BridgeDomainAddDel) Reset() { *m = BridgeDomainAddDel{} } 411 func (*BridgeDomainAddDel) GetMessageName() string { return "bridge_domain_add_del" } 412 func (*BridgeDomainAddDel) GetCrcString() string { return "600b7170" } 413 func (*BridgeDomainAddDel) GetMessageType() api.MessageType { 414 return api.RequestMessage 415 } 416 417 func (m *BridgeDomainAddDel) Size() (size int) { 418 if m == nil { 419 return 0 420 } 421 size += 4 // m.BdID 422 size += 1 // m.Flood 423 size += 1 // m.UuFlood 424 size += 1 // m.Forward 425 size += 1 // m.Learn 426 size += 1 // m.ArpTerm 427 size += 1 // m.ArpUfwd 428 size += 1 // m.MacAge 429 size += 64 // m.BdTag 430 size += 1 // m.IsAdd 431 return size 432 } 433 func (m *BridgeDomainAddDel) Marshal(b []byte) ([]byte, error) { 434 if b == nil { 435 b = make([]byte, m.Size()) 436 } 437 buf := codec.NewBuffer(b) 438 buf.EncodeUint32(m.BdID) 439 buf.EncodeBool(m.Flood) 440 buf.EncodeBool(m.UuFlood) 441 buf.EncodeBool(m.Forward) 442 buf.EncodeBool(m.Learn) 443 buf.EncodeBool(m.ArpTerm) 444 buf.EncodeBool(m.ArpUfwd) 445 buf.EncodeUint8(m.MacAge) 446 buf.EncodeString(m.BdTag, 64) 447 buf.EncodeBool(m.IsAdd) 448 return buf.Bytes(), nil 449 } 450 func (m *BridgeDomainAddDel) Unmarshal(b []byte) error { 451 buf := codec.NewBuffer(b) 452 m.BdID = buf.DecodeUint32() 453 m.Flood = buf.DecodeBool() 454 m.UuFlood = buf.DecodeBool() 455 m.Forward = buf.DecodeBool() 456 m.Learn = buf.DecodeBool() 457 m.ArpTerm = buf.DecodeBool() 458 m.ArpUfwd = buf.DecodeBool() 459 m.MacAge = buf.DecodeUint8() 460 m.BdTag = buf.DecodeString(64) 461 m.IsAdd = buf.DecodeBool() 462 return nil 463 } 464 465 // BridgeDomainAddDelReply defines message 'bridge_domain_add_del_reply'. 466 type BridgeDomainAddDelReply struct { 467 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 468 } 469 470 func (m *BridgeDomainAddDelReply) Reset() { *m = BridgeDomainAddDelReply{} } 471 func (*BridgeDomainAddDelReply) GetMessageName() string { return "bridge_domain_add_del_reply" } 472 func (*BridgeDomainAddDelReply) GetCrcString() string { return "e8d4e804" } 473 func (*BridgeDomainAddDelReply) GetMessageType() api.MessageType { 474 return api.ReplyMessage 475 } 476 477 func (m *BridgeDomainAddDelReply) Size() (size int) { 478 if m == nil { 479 return 0 480 } 481 size += 4 // m.Retval 482 return size 483 } 484 func (m *BridgeDomainAddDelReply) Marshal(b []byte) ([]byte, error) { 485 if b == nil { 486 b = make([]byte, m.Size()) 487 } 488 buf := codec.NewBuffer(b) 489 buf.EncodeInt32(m.Retval) 490 return buf.Bytes(), nil 491 } 492 func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error { 493 buf := codec.NewBuffer(b) 494 m.Retval = buf.DecodeInt32() 495 return nil 496 } 497 498 // BridgeDomainDetails defines message 'bridge_domain_details'. 499 type BridgeDomainDetails struct { 500 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 501 Flood bool `binapi:"bool,name=flood" json:"flood,omitempty"` 502 UuFlood bool `binapi:"bool,name=uu_flood" json:"uu_flood,omitempty"` 503 Forward bool `binapi:"bool,name=forward" json:"forward,omitempty"` 504 Learn bool `binapi:"bool,name=learn" json:"learn,omitempty"` 505 ArpTerm bool `binapi:"bool,name=arp_term" json:"arp_term,omitempty"` 506 ArpUfwd bool `binapi:"bool,name=arp_ufwd" json:"arp_ufwd,omitempty"` 507 MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"` 508 BdTag string `binapi:"string[64],name=bd_tag" json:"bd_tag,omitempty"` 509 BviSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"` 510 UuFwdSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"` 511 NSwIfs uint32 `binapi:"u32,name=n_sw_ifs" json:"-"` 512 SwIfDetails []BridgeDomainSwIf `binapi:"bridge_domain_sw_if[n_sw_ifs],name=sw_if_details" json:"sw_if_details,omitempty"` 513 } 514 515 func (m *BridgeDomainDetails) Reset() { *m = BridgeDomainDetails{} } 516 func (*BridgeDomainDetails) GetMessageName() string { return "bridge_domain_details" } 517 func (*BridgeDomainDetails) GetCrcString() string { return "979f549d" } 518 func (*BridgeDomainDetails) GetMessageType() api.MessageType { 519 return api.ReplyMessage 520 } 521 522 func (m *BridgeDomainDetails) Size() (size int) { 523 if m == nil { 524 return 0 525 } 526 size += 4 // m.BdID 527 size += 1 // m.Flood 528 size += 1 // m.UuFlood 529 size += 1 // m.Forward 530 size += 1 // m.Learn 531 size += 1 // m.ArpTerm 532 size += 1 // m.ArpUfwd 533 size += 1 // m.MacAge 534 size += 64 // m.BdTag 535 size += 4 // m.BviSwIfIndex 536 size += 4 // m.UuFwdSwIfIndex 537 size += 4 // m.NSwIfs 538 for j1 := 0; j1 < len(m.SwIfDetails); j1++ { 539 var s1 BridgeDomainSwIf 540 _ = s1 541 if j1 < len(m.SwIfDetails) { 542 s1 = m.SwIfDetails[j1] 543 } 544 size += 4 // s1.Context 545 size += 4 // s1.SwIfIndex 546 size += 1 // s1.Shg 547 } 548 return size 549 } 550 func (m *BridgeDomainDetails) Marshal(b []byte) ([]byte, error) { 551 if b == nil { 552 b = make([]byte, m.Size()) 553 } 554 buf := codec.NewBuffer(b) 555 buf.EncodeUint32(m.BdID) 556 buf.EncodeBool(m.Flood) 557 buf.EncodeBool(m.UuFlood) 558 buf.EncodeBool(m.Forward) 559 buf.EncodeBool(m.Learn) 560 buf.EncodeBool(m.ArpTerm) 561 buf.EncodeBool(m.ArpUfwd) 562 buf.EncodeUint8(m.MacAge) 563 buf.EncodeString(m.BdTag, 64) 564 buf.EncodeUint32(uint32(m.BviSwIfIndex)) 565 buf.EncodeUint32(uint32(m.UuFwdSwIfIndex)) 566 buf.EncodeUint32(uint32(len(m.SwIfDetails))) 567 for j0 := 0; j0 < len(m.SwIfDetails); j0++ { 568 var v0 BridgeDomainSwIf // SwIfDetails 569 if j0 < len(m.SwIfDetails) { 570 v0 = m.SwIfDetails[j0] 571 } 572 buf.EncodeUint32(v0.Context) 573 buf.EncodeUint32(uint32(v0.SwIfIndex)) 574 buf.EncodeUint8(v0.Shg) 575 } 576 return buf.Bytes(), nil 577 } 578 func (m *BridgeDomainDetails) Unmarshal(b []byte) error { 579 buf := codec.NewBuffer(b) 580 m.BdID = buf.DecodeUint32() 581 m.Flood = buf.DecodeBool() 582 m.UuFlood = buf.DecodeBool() 583 m.Forward = buf.DecodeBool() 584 m.Learn = buf.DecodeBool() 585 m.ArpTerm = buf.DecodeBool() 586 m.ArpUfwd = buf.DecodeBool() 587 m.MacAge = buf.DecodeUint8() 588 m.BdTag = buf.DecodeString(64) 589 m.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 590 m.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 591 m.NSwIfs = buf.DecodeUint32() 592 m.SwIfDetails = make([]BridgeDomainSwIf, m.NSwIfs) 593 for j0 := 0; j0 < len(m.SwIfDetails); j0++ { 594 m.SwIfDetails[j0].Context = buf.DecodeUint32() 595 m.SwIfDetails[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 596 m.SwIfDetails[j0].Shg = buf.DecodeUint8() 597 } 598 return nil 599 } 600 601 // BridgeDomainDump defines message 'bridge_domain_dump'. 602 type BridgeDomainDump struct { 603 BdID uint32 `binapi:"u32,name=bd_id,default=4294967295" json:"bd_id,omitempty"` 604 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` 605 } 606 607 func (m *BridgeDomainDump) Reset() { *m = BridgeDomainDump{} } 608 func (*BridgeDomainDump) GetMessageName() string { return "bridge_domain_dump" } 609 func (*BridgeDomainDump) GetCrcString() string { return "74396a43" } 610 func (*BridgeDomainDump) GetMessageType() api.MessageType { 611 return api.RequestMessage 612 } 613 614 func (m *BridgeDomainDump) Size() (size int) { 615 if m == nil { 616 return 0 617 } 618 size += 4 // m.BdID 619 size += 4 // m.SwIfIndex 620 return size 621 } 622 func (m *BridgeDomainDump) Marshal(b []byte) ([]byte, error) { 623 if b == nil { 624 b = make([]byte, m.Size()) 625 } 626 buf := codec.NewBuffer(b) 627 buf.EncodeUint32(m.BdID) 628 buf.EncodeUint32(uint32(m.SwIfIndex)) 629 return buf.Bytes(), nil 630 } 631 func (m *BridgeDomainDump) Unmarshal(b []byte) error { 632 buf := codec.NewBuffer(b) 633 m.BdID = buf.DecodeUint32() 634 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 635 return nil 636 } 637 638 // BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'. 639 type BridgeDomainSetMacAge struct { 640 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 641 MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"` 642 } 643 644 func (m *BridgeDomainSetMacAge) Reset() { *m = BridgeDomainSetMacAge{} } 645 func (*BridgeDomainSetMacAge) GetMessageName() string { return "bridge_domain_set_mac_age" } 646 func (*BridgeDomainSetMacAge) GetCrcString() string { return "b537ad7b" } 647 func (*BridgeDomainSetMacAge) GetMessageType() api.MessageType { 648 return api.RequestMessage 649 } 650 651 func (m *BridgeDomainSetMacAge) Size() (size int) { 652 if m == nil { 653 return 0 654 } 655 size += 4 // m.BdID 656 size += 1 // m.MacAge 657 return size 658 } 659 func (m *BridgeDomainSetMacAge) Marshal(b []byte) ([]byte, error) { 660 if b == nil { 661 b = make([]byte, m.Size()) 662 } 663 buf := codec.NewBuffer(b) 664 buf.EncodeUint32(m.BdID) 665 buf.EncodeUint8(m.MacAge) 666 return buf.Bytes(), nil 667 } 668 func (m *BridgeDomainSetMacAge) Unmarshal(b []byte) error { 669 buf := codec.NewBuffer(b) 670 m.BdID = buf.DecodeUint32() 671 m.MacAge = buf.DecodeUint8() 672 return nil 673 } 674 675 // BridgeDomainSetMacAgeReply defines message 'bridge_domain_set_mac_age_reply'. 676 type BridgeDomainSetMacAgeReply struct { 677 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 678 } 679 680 func (m *BridgeDomainSetMacAgeReply) Reset() { *m = BridgeDomainSetMacAgeReply{} } 681 func (*BridgeDomainSetMacAgeReply) GetMessageName() string { return "bridge_domain_set_mac_age_reply" } 682 func (*BridgeDomainSetMacAgeReply) GetCrcString() string { return "e8d4e804" } 683 func (*BridgeDomainSetMacAgeReply) GetMessageType() api.MessageType { 684 return api.ReplyMessage 685 } 686 687 func (m *BridgeDomainSetMacAgeReply) Size() (size int) { 688 if m == nil { 689 return 0 690 } 691 size += 4 // m.Retval 692 return size 693 } 694 func (m *BridgeDomainSetMacAgeReply) Marshal(b []byte) ([]byte, error) { 695 if b == nil { 696 b = make([]byte, m.Size()) 697 } 698 buf := codec.NewBuffer(b) 699 buf.EncodeInt32(m.Retval) 700 return buf.Bytes(), nil 701 } 702 func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error { 703 buf := codec.NewBuffer(b) 704 m.Retval = buf.DecodeInt32() 705 return nil 706 } 707 708 // BridgeFlags defines message 'bridge_flags'. 709 type BridgeFlags struct { 710 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 711 IsSet bool `binapi:"bool,name=is_set" json:"is_set,omitempty"` 712 Flags BdFlags `binapi:"bd_flags,name=flags" json:"flags,omitempty"` 713 } 714 715 func (m *BridgeFlags) Reset() { *m = BridgeFlags{} } 716 func (*BridgeFlags) GetMessageName() string { return "bridge_flags" } 717 func (*BridgeFlags) GetCrcString() string { return "1b0c5fbd" } 718 func (*BridgeFlags) GetMessageType() api.MessageType { 719 return api.RequestMessage 720 } 721 722 func (m *BridgeFlags) Size() (size int) { 723 if m == nil { 724 return 0 725 } 726 size += 4 // m.BdID 727 size += 1 // m.IsSet 728 size += 4 // m.Flags 729 return size 730 } 731 func (m *BridgeFlags) Marshal(b []byte) ([]byte, error) { 732 if b == nil { 733 b = make([]byte, m.Size()) 734 } 735 buf := codec.NewBuffer(b) 736 buf.EncodeUint32(m.BdID) 737 buf.EncodeBool(m.IsSet) 738 buf.EncodeUint32(uint32(m.Flags)) 739 return buf.Bytes(), nil 740 } 741 func (m *BridgeFlags) Unmarshal(b []byte) error { 742 buf := codec.NewBuffer(b) 743 m.BdID = buf.DecodeUint32() 744 m.IsSet = buf.DecodeBool() 745 m.Flags = BdFlags(buf.DecodeUint32()) 746 return nil 747 } 748 749 // BridgeFlagsReply defines message 'bridge_flags_reply'. 750 type BridgeFlagsReply struct { 751 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 752 ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"` 753 } 754 755 func (m *BridgeFlagsReply) Reset() { *m = BridgeFlagsReply{} } 756 func (*BridgeFlagsReply) GetMessageName() string { return "bridge_flags_reply" } 757 func (*BridgeFlagsReply) GetCrcString() string { return "29b2a2b3" } 758 func (*BridgeFlagsReply) GetMessageType() api.MessageType { 759 return api.ReplyMessage 760 } 761 762 func (m *BridgeFlagsReply) Size() (size int) { 763 if m == nil { 764 return 0 765 } 766 size += 4 // m.Retval 767 size += 4 // m.ResultingFeatureBitmap 768 return size 769 } 770 func (m *BridgeFlagsReply) Marshal(b []byte) ([]byte, error) { 771 if b == nil { 772 b = make([]byte, m.Size()) 773 } 774 buf := codec.NewBuffer(b) 775 buf.EncodeInt32(m.Retval) 776 buf.EncodeUint32(m.ResultingFeatureBitmap) 777 return buf.Bytes(), nil 778 } 779 func (m *BridgeFlagsReply) Unmarshal(b []byte) error { 780 buf := codec.NewBuffer(b) 781 m.Retval = buf.DecodeInt32() 782 m.ResultingFeatureBitmap = buf.DecodeUint32() 783 return nil 784 } 785 786 // BviCreate defines message 'bvi_create'. 787 type BviCreate struct { 788 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` 789 UserInstance uint32 `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"` 790 } 791 792 func (m *BviCreate) Reset() { *m = BviCreate{} } 793 func (*BviCreate) GetMessageName() string { return "bvi_create" } 794 func (*BviCreate) GetCrcString() string { return "f5398559" } 795 func (*BviCreate) GetMessageType() api.MessageType { 796 return api.RequestMessage 797 } 798 799 func (m *BviCreate) Size() (size int) { 800 if m == nil { 801 return 0 802 } 803 size += 1 * 6 // m.Mac 804 size += 4 // m.UserInstance 805 return size 806 } 807 func (m *BviCreate) Marshal(b []byte) ([]byte, error) { 808 if b == nil { 809 b = make([]byte, m.Size()) 810 } 811 buf := codec.NewBuffer(b) 812 buf.EncodeBytes(m.Mac[:], 6) 813 buf.EncodeUint32(m.UserInstance) 814 return buf.Bytes(), nil 815 } 816 func (m *BviCreate) Unmarshal(b []byte) error { 817 buf := codec.NewBuffer(b) 818 copy(m.Mac[:], buf.DecodeBytes(6)) 819 m.UserInstance = buf.DecodeUint32() 820 return nil 821 } 822 823 // BviCreateReply defines message 'bvi_create_reply'. 824 type BviCreateReply struct { 825 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 826 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 827 } 828 829 func (m *BviCreateReply) Reset() { *m = BviCreateReply{} } 830 func (*BviCreateReply) GetMessageName() string { return "bvi_create_reply" } 831 func (*BviCreateReply) GetCrcString() string { return "5383d31f" } 832 func (*BviCreateReply) GetMessageType() api.MessageType { 833 return api.ReplyMessage 834 } 835 836 func (m *BviCreateReply) Size() (size int) { 837 if m == nil { 838 return 0 839 } 840 size += 4 // m.Retval 841 size += 4 // m.SwIfIndex 842 return size 843 } 844 func (m *BviCreateReply) Marshal(b []byte) ([]byte, error) { 845 if b == nil { 846 b = make([]byte, m.Size()) 847 } 848 buf := codec.NewBuffer(b) 849 buf.EncodeInt32(m.Retval) 850 buf.EncodeUint32(uint32(m.SwIfIndex)) 851 return buf.Bytes(), nil 852 } 853 func (m *BviCreateReply) Unmarshal(b []byte) error { 854 buf := codec.NewBuffer(b) 855 m.Retval = buf.DecodeInt32() 856 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 857 return nil 858 } 859 860 // BviDelete defines message 'bvi_delete'. 861 type BviDelete struct { 862 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 863 } 864 865 func (m *BviDelete) Reset() { *m = BviDelete{} } 866 func (*BviDelete) GetMessageName() string { return "bvi_delete" } 867 func (*BviDelete) GetCrcString() string { return "f9e6675e" } 868 func (*BviDelete) GetMessageType() api.MessageType { 869 return api.RequestMessage 870 } 871 872 func (m *BviDelete) Size() (size int) { 873 if m == nil { 874 return 0 875 } 876 size += 4 // m.SwIfIndex 877 return size 878 } 879 func (m *BviDelete) Marshal(b []byte) ([]byte, error) { 880 if b == nil { 881 b = make([]byte, m.Size()) 882 } 883 buf := codec.NewBuffer(b) 884 buf.EncodeUint32(uint32(m.SwIfIndex)) 885 return buf.Bytes(), nil 886 } 887 func (m *BviDelete) Unmarshal(b []byte) error { 888 buf := codec.NewBuffer(b) 889 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 890 return nil 891 } 892 893 // BviDeleteReply defines message 'bvi_delete_reply'. 894 type BviDeleteReply struct { 895 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 896 } 897 898 func (m *BviDeleteReply) Reset() { *m = BviDeleteReply{} } 899 func (*BviDeleteReply) GetMessageName() string { return "bvi_delete_reply" } 900 func (*BviDeleteReply) GetCrcString() string { return "e8d4e804" } 901 func (*BviDeleteReply) GetMessageType() api.MessageType { 902 return api.ReplyMessage 903 } 904 905 func (m *BviDeleteReply) Size() (size int) { 906 if m == nil { 907 return 0 908 } 909 size += 4 // m.Retval 910 return size 911 } 912 func (m *BviDeleteReply) Marshal(b []byte) ([]byte, error) { 913 if b == nil { 914 b = make([]byte, m.Size()) 915 } 916 buf := codec.NewBuffer(b) 917 buf.EncodeInt32(m.Retval) 918 return buf.Bytes(), nil 919 } 920 func (m *BviDeleteReply) Unmarshal(b []byte) error { 921 buf := codec.NewBuffer(b) 922 m.Retval = buf.DecodeInt32() 923 return nil 924 } 925 926 // L2ArpTermEvent defines message 'l2_arp_term_event'. 927 type L2ArpTermEvent struct { 928 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 929 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"` 930 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 931 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` 932 } 933 934 func (m *L2ArpTermEvent) Reset() { *m = L2ArpTermEvent{} } 935 func (*L2ArpTermEvent) GetMessageName() string { return "l2_arp_term_event" } 936 func (*L2ArpTermEvent) GetCrcString() string { return "85ff71ea" } 937 func (*L2ArpTermEvent) GetMessageType() api.MessageType { 938 return api.EventMessage 939 } 940 941 func (m *L2ArpTermEvent) Size() (size int) { 942 if m == nil { 943 return 0 944 } 945 size += 4 // m.PID 946 size += 1 // m.IP.Af 947 size += 1 * 16 // m.IP.Un 948 size += 4 // m.SwIfIndex 949 size += 1 * 6 // m.Mac 950 return size 951 } 952 func (m *L2ArpTermEvent) Marshal(b []byte) ([]byte, error) { 953 if b == nil { 954 b = make([]byte, m.Size()) 955 } 956 buf := codec.NewBuffer(b) 957 buf.EncodeUint32(m.PID) 958 buf.EncodeUint8(uint8(m.IP.Af)) 959 buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16) 960 buf.EncodeUint32(uint32(m.SwIfIndex)) 961 buf.EncodeBytes(m.Mac[:], 6) 962 return buf.Bytes(), nil 963 } 964 func (m *L2ArpTermEvent) Unmarshal(b []byte) error { 965 buf := codec.NewBuffer(b) 966 m.PID = buf.DecodeUint32() 967 m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8()) 968 copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 969 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 970 copy(m.Mac[:], buf.DecodeBytes(6)) 971 return nil 972 } 973 974 // L2FibClearTable defines message 'l2_fib_clear_table'. 975 type L2FibClearTable struct{} 976 977 func (m *L2FibClearTable) Reset() { *m = L2FibClearTable{} } 978 func (*L2FibClearTable) GetMessageName() string { return "l2_fib_clear_table" } 979 func (*L2FibClearTable) GetCrcString() string { return "51077d14" } 980 func (*L2FibClearTable) GetMessageType() api.MessageType { 981 return api.RequestMessage 982 } 983 984 func (m *L2FibClearTable) Size() (size int) { 985 if m == nil { 986 return 0 987 } 988 return size 989 } 990 func (m *L2FibClearTable) Marshal(b []byte) ([]byte, error) { 991 if b == nil { 992 b = make([]byte, m.Size()) 993 } 994 buf := codec.NewBuffer(b) 995 return buf.Bytes(), nil 996 } 997 func (m *L2FibClearTable) Unmarshal(b []byte) error { 998 return nil 999 } 1000 1001 // L2FibClearTableReply defines message 'l2_fib_clear_table_reply'. 1002 type L2FibClearTableReply struct { 1003 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1004 } 1005 1006 func (m *L2FibClearTableReply) Reset() { *m = L2FibClearTableReply{} } 1007 func (*L2FibClearTableReply) GetMessageName() string { return "l2_fib_clear_table_reply" } 1008 func (*L2FibClearTableReply) GetCrcString() string { return "e8d4e804" } 1009 func (*L2FibClearTableReply) GetMessageType() api.MessageType { 1010 return api.ReplyMessage 1011 } 1012 1013 func (m *L2FibClearTableReply) Size() (size int) { 1014 if m == nil { 1015 return 0 1016 } 1017 size += 4 // m.Retval 1018 return size 1019 } 1020 func (m *L2FibClearTableReply) Marshal(b []byte) ([]byte, error) { 1021 if b == nil { 1022 b = make([]byte, m.Size()) 1023 } 1024 buf := codec.NewBuffer(b) 1025 buf.EncodeInt32(m.Retval) 1026 return buf.Bytes(), nil 1027 } 1028 func (m *L2FibClearTableReply) Unmarshal(b []byte) error { 1029 buf := codec.NewBuffer(b) 1030 m.Retval = buf.DecodeInt32() 1031 return nil 1032 } 1033 1034 // L2FibTableDetails defines message 'l2_fib_table_details'. 1035 type L2FibTableDetails struct { 1036 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 1037 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` 1038 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1039 StaticMac bool `binapi:"bool,name=static_mac" json:"static_mac,omitempty"` 1040 FilterMac bool `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"` 1041 BviMac bool `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"` 1042 } 1043 1044 func (m *L2FibTableDetails) Reset() { *m = L2FibTableDetails{} } 1045 func (*L2FibTableDetails) GetMessageName() string { return "l2_fib_table_details" } 1046 func (*L2FibTableDetails) GetCrcString() string { return "e8d2fc72" } 1047 func (*L2FibTableDetails) GetMessageType() api.MessageType { 1048 return api.ReplyMessage 1049 } 1050 1051 func (m *L2FibTableDetails) Size() (size int) { 1052 if m == nil { 1053 return 0 1054 } 1055 size += 4 // m.BdID 1056 size += 1 * 6 // m.Mac 1057 size += 4 // m.SwIfIndex 1058 size += 1 // m.StaticMac 1059 size += 1 // m.FilterMac 1060 size += 1 // m.BviMac 1061 return size 1062 } 1063 func (m *L2FibTableDetails) Marshal(b []byte) ([]byte, error) { 1064 if b == nil { 1065 b = make([]byte, m.Size()) 1066 } 1067 buf := codec.NewBuffer(b) 1068 buf.EncodeUint32(m.BdID) 1069 buf.EncodeBytes(m.Mac[:], 6) 1070 buf.EncodeUint32(uint32(m.SwIfIndex)) 1071 buf.EncodeBool(m.StaticMac) 1072 buf.EncodeBool(m.FilterMac) 1073 buf.EncodeBool(m.BviMac) 1074 return buf.Bytes(), nil 1075 } 1076 func (m *L2FibTableDetails) Unmarshal(b []byte) error { 1077 buf := codec.NewBuffer(b) 1078 m.BdID = buf.DecodeUint32() 1079 copy(m.Mac[:], buf.DecodeBytes(6)) 1080 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1081 m.StaticMac = buf.DecodeBool() 1082 m.FilterMac = buf.DecodeBool() 1083 m.BviMac = buf.DecodeBool() 1084 return nil 1085 } 1086 1087 // L2FibTableDump defines message 'l2_fib_table_dump'. 1088 type L2FibTableDump struct { 1089 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 1090 } 1091 1092 func (m *L2FibTableDump) Reset() { *m = L2FibTableDump{} } 1093 func (*L2FibTableDump) GetMessageName() string { return "l2_fib_table_dump" } 1094 func (*L2FibTableDump) GetCrcString() string { return "c25fdce6" } 1095 func (*L2FibTableDump) GetMessageType() api.MessageType { 1096 return api.RequestMessage 1097 } 1098 1099 func (m *L2FibTableDump) Size() (size int) { 1100 if m == nil { 1101 return 0 1102 } 1103 size += 4 // m.BdID 1104 return size 1105 } 1106 func (m *L2FibTableDump) Marshal(b []byte) ([]byte, error) { 1107 if b == nil { 1108 b = make([]byte, m.Size()) 1109 } 1110 buf := codec.NewBuffer(b) 1111 buf.EncodeUint32(m.BdID) 1112 return buf.Bytes(), nil 1113 } 1114 func (m *L2FibTableDump) Unmarshal(b []byte) error { 1115 buf := codec.NewBuffer(b) 1116 m.BdID = buf.DecodeUint32() 1117 return nil 1118 } 1119 1120 // L2Flags defines message 'l2_flags'. 1121 type L2Flags struct { 1122 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1123 IsSet bool `binapi:"bool,name=is_set" json:"is_set,omitempty"` 1124 FeatureBitmap uint32 `binapi:"u32,name=feature_bitmap" json:"feature_bitmap,omitempty"` 1125 } 1126 1127 func (m *L2Flags) Reset() { *m = L2Flags{} } 1128 func (*L2Flags) GetMessageName() string { return "l2_flags" } 1129 func (*L2Flags) GetCrcString() string { return "fc41cfe8" } 1130 func (*L2Flags) GetMessageType() api.MessageType { 1131 return api.RequestMessage 1132 } 1133 1134 func (m *L2Flags) Size() (size int) { 1135 if m == nil { 1136 return 0 1137 } 1138 size += 4 // m.SwIfIndex 1139 size += 1 // m.IsSet 1140 size += 4 // m.FeatureBitmap 1141 return size 1142 } 1143 func (m *L2Flags) Marshal(b []byte) ([]byte, error) { 1144 if b == nil { 1145 b = make([]byte, m.Size()) 1146 } 1147 buf := codec.NewBuffer(b) 1148 buf.EncodeUint32(uint32(m.SwIfIndex)) 1149 buf.EncodeBool(m.IsSet) 1150 buf.EncodeUint32(m.FeatureBitmap) 1151 return buf.Bytes(), nil 1152 } 1153 func (m *L2Flags) Unmarshal(b []byte) error { 1154 buf := codec.NewBuffer(b) 1155 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1156 m.IsSet = buf.DecodeBool() 1157 m.FeatureBitmap = buf.DecodeUint32() 1158 return nil 1159 } 1160 1161 // L2FlagsReply defines message 'l2_flags_reply'. 1162 type L2FlagsReply struct { 1163 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1164 ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"` 1165 } 1166 1167 func (m *L2FlagsReply) Reset() { *m = L2FlagsReply{} } 1168 func (*L2FlagsReply) GetMessageName() string { return "l2_flags_reply" } 1169 func (*L2FlagsReply) GetCrcString() string { return "29b2a2b3" } 1170 func (*L2FlagsReply) GetMessageType() api.MessageType { 1171 return api.ReplyMessage 1172 } 1173 1174 func (m *L2FlagsReply) Size() (size int) { 1175 if m == nil { 1176 return 0 1177 } 1178 size += 4 // m.Retval 1179 size += 4 // m.ResultingFeatureBitmap 1180 return size 1181 } 1182 func (m *L2FlagsReply) Marshal(b []byte) ([]byte, error) { 1183 if b == nil { 1184 b = make([]byte, m.Size()) 1185 } 1186 buf := codec.NewBuffer(b) 1187 buf.EncodeInt32(m.Retval) 1188 buf.EncodeUint32(m.ResultingFeatureBitmap) 1189 return buf.Bytes(), nil 1190 } 1191 func (m *L2FlagsReply) Unmarshal(b []byte) error { 1192 buf := codec.NewBuffer(b) 1193 m.Retval = buf.DecodeInt32() 1194 m.ResultingFeatureBitmap = buf.DecodeUint32() 1195 return nil 1196 } 1197 1198 // L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'. 1199 type L2InterfaceEfpFilter struct { 1200 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1201 EnableDisable bool `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"` 1202 } 1203 1204 func (m *L2InterfaceEfpFilter) Reset() { *m = L2InterfaceEfpFilter{} } 1205 func (*L2InterfaceEfpFilter) GetMessageName() string { return "l2_interface_efp_filter" } 1206 func (*L2InterfaceEfpFilter) GetCrcString() string { return "5501adee" } 1207 func (*L2InterfaceEfpFilter) GetMessageType() api.MessageType { 1208 return api.RequestMessage 1209 } 1210 1211 func (m *L2InterfaceEfpFilter) Size() (size int) { 1212 if m == nil { 1213 return 0 1214 } 1215 size += 4 // m.SwIfIndex 1216 size += 1 // m.EnableDisable 1217 return size 1218 } 1219 func (m *L2InterfaceEfpFilter) Marshal(b []byte) ([]byte, error) { 1220 if b == nil { 1221 b = make([]byte, m.Size()) 1222 } 1223 buf := codec.NewBuffer(b) 1224 buf.EncodeUint32(uint32(m.SwIfIndex)) 1225 buf.EncodeBool(m.EnableDisable) 1226 return buf.Bytes(), nil 1227 } 1228 func (m *L2InterfaceEfpFilter) Unmarshal(b []byte) error { 1229 buf := codec.NewBuffer(b) 1230 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1231 m.EnableDisable = buf.DecodeBool() 1232 return nil 1233 } 1234 1235 // L2InterfaceEfpFilterReply defines message 'l2_interface_efp_filter_reply'. 1236 type L2InterfaceEfpFilterReply struct { 1237 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1238 } 1239 1240 func (m *L2InterfaceEfpFilterReply) Reset() { *m = L2InterfaceEfpFilterReply{} } 1241 func (*L2InterfaceEfpFilterReply) GetMessageName() string { return "l2_interface_efp_filter_reply" } 1242 func (*L2InterfaceEfpFilterReply) GetCrcString() string { return "e8d4e804" } 1243 func (*L2InterfaceEfpFilterReply) GetMessageType() api.MessageType { 1244 return api.ReplyMessage 1245 } 1246 1247 func (m *L2InterfaceEfpFilterReply) Size() (size int) { 1248 if m == nil { 1249 return 0 1250 } 1251 size += 4 // m.Retval 1252 return size 1253 } 1254 func (m *L2InterfaceEfpFilterReply) Marshal(b []byte) ([]byte, error) { 1255 if b == nil { 1256 b = make([]byte, m.Size()) 1257 } 1258 buf := codec.NewBuffer(b) 1259 buf.EncodeInt32(m.Retval) 1260 return buf.Bytes(), nil 1261 } 1262 func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error { 1263 buf := codec.NewBuffer(b) 1264 m.Retval = buf.DecodeInt32() 1265 return nil 1266 } 1267 1268 // L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'. 1269 type L2InterfacePbbTagRewrite struct { 1270 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1271 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"` 1272 OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"` 1273 BDmac ethernet_types.MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"` 1274 BSmac ethernet_types.MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"` 1275 BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"` 1276 ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"` 1277 } 1278 1279 func (m *L2InterfacePbbTagRewrite) Reset() { *m = L2InterfacePbbTagRewrite{} } 1280 func (*L2InterfacePbbTagRewrite) GetMessageName() string { return "l2_interface_pbb_tag_rewrite" } 1281 func (*L2InterfacePbbTagRewrite) GetCrcString() string { return "612efa5a" } 1282 func (*L2InterfacePbbTagRewrite) GetMessageType() api.MessageType { 1283 return api.RequestMessage 1284 } 1285 1286 func (m *L2InterfacePbbTagRewrite) Size() (size int) { 1287 if m == nil { 1288 return 0 1289 } 1290 size += 4 // m.SwIfIndex 1291 size += 4 // m.VtrOp 1292 size += 2 // m.OuterTag 1293 size += 1 * 6 // m.BDmac 1294 size += 1 * 6 // m.BSmac 1295 size += 2 // m.BVlanid 1296 size += 4 // m.ISid 1297 return size 1298 } 1299 func (m *L2InterfacePbbTagRewrite) Marshal(b []byte) ([]byte, error) { 1300 if b == nil { 1301 b = make([]byte, m.Size()) 1302 } 1303 buf := codec.NewBuffer(b) 1304 buf.EncodeUint32(uint32(m.SwIfIndex)) 1305 buf.EncodeUint32(m.VtrOp) 1306 buf.EncodeUint16(m.OuterTag) 1307 buf.EncodeBytes(m.BDmac[:], 6) 1308 buf.EncodeBytes(m.BSmac[:], 6) 1309 buf.EncodeUint16(m.BVlanid) 1310 buf.EncodeUint32(m.ISid) 1311 return buf.Bytes(), nil 1312 } 1313 func (m *L2InterfacePbbTagRewrite) Unmarshal(b []byte) error { 1314 buf := codec.NewBuffer(b) 1315 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1316 m.VtrOp = buf.DecodeUint32() 1317 m.OuterTag = buf.DecodeUint16() 1318 copy(m.BDmac[:], buf.DecodeBytes(6)) 1319 copy(m.BSmac[:], buf.DecodeBytes(6)) 1320 m.BVlanid = buf.DecodeUint16() 1321 m.ISid = buf.DecodeUint32() 1322 return nil 1323 } 1324 1325 // L2InterfacePbbTagRewriteReply defines message 'l2_interface_pbb_tag_rewrite_reply'. 1326 type L2InterfacePbbTagRewriteReply struct { 1327 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1328 } 1329 1330 func (m *L2InterfacePbbTagRewriteReply) Reset() { *m = L2InterfacePbbTagRewriteReply{} } 1331 func (*L2InterfacePbbTagRewriteReply) GetMessageName() string { 1332 return "l2_interface_pbb_tag_rewrite_reply" 1333 } 1334 func (*L2InterfacePbbTagRewriteReply) GetCrcString() string { return "e8d4e804" } 1335 func (*L2InterfacePbbTagRewriteReply) GetMessageType() api.MessageType { 1336 return api.ReplyMessage 1337 } 1338 1339 func (m *L2InterfacePbbTagRewriteReply) Size() (size int) { 1340 if m == nil { 1341 return 0 1342 } 1343 size += 4 // m.Retval 1344 return size 1345 } 1346 func (m *L2InterfacePbbTagRewriteReply) Marshal(b []byte) ([]byte, error) { 1347 if b == nil { 1348 b = make([]byte, m.Size()) 1349 } 1350 buf := codec.NewBuffer(b) 1351 buf.EncodeInt32(m.Retval) 1352 return buf.Bytes(), nil 1353 } 1354 func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error { 1355 buf := codec.NewBuffer(b) 1356 m.Retval = buf.DecodeInt32() 1357 return nil 1358 } 1359 1360 // L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'. 1361 type L2InterfaceVlanTagRewrite struct { 1362 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1363 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"` 1364 PushDot1q uint32 `binapi:"u32,name=push_dot1q" json:"push_dot1q,omitempty"` 1365 Tag1 uint32 `binapi:"u32,name=tag1" json:"tag1,omitempty"` 1366 Tag2 uint32 `binapi:"u32,name=tag2" json:"tag2,omitempty"` 1367 } 1368 1369 func (m *L2InterfaceVlanTagRewrite) Reset() { *m = L2InterfaceVlanTagRewrite{} } 1370 func (*L2InterfaceVlanTagRewrite) GetMessageName() string { return "l2_interface_vlan_tag_rewrite" } 1371 func (*L2InterfaceVlanTagRewrite) GetCrcString() string { return "62cc0bbc" } 1372 func (*L2InterfaceVlanTagRewrite) GetMessageType() api.MessageType { 1373 return api.RequestMessage 1374 } 1375 1376 func (m *L2InterfaceVlanTagRewrite) Size() (size int) { 1377 if m == nil { 1378 return 0 1379 } 1380 size += 4 // m.SwIfIndex 1381 size += 4 // m.VtrOp 1382 size += 4 // m.PushDot1q 1383 size += 4 // m.Tag1 1384 size += 4 // m.Tag2 1385 return size 1386 } 1387 func (m *L2InterfaceVlanTagRewrite) Marshal(b []byte) ([]byte, error) { 1388 if b == nil { 1389 b = make([]byte, m.Size()) 1390 } 1391 buf := codec.NewBuffer(b) 1392 buf.EncodeUint32(uint32(m.SwIfIndex)) 1393 buf.EncodeUint32(m.VtrOp) 1394 buf.EncodeUint32(m.PushDot1q) 1395 buf.EncodeUint32(m.Tag1) 1396 buf.EncodeUint32(m.Tag2) 1397 return buf.Bytes(), nil 1398 } 1399 func (m *L2InterfaceVlanTagRewrite) Unmarshal(b []byte) error { 1400 buf := codec.NewBuffer(b) 1401 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1402 m.VtrOp = buf.DecodeUint32() 1403 m.PushDot1q = buf.DecodeUint32() 1404 m.Tag1 = buf.DecodeUint32() 1405 m.Tag2 = buf.DecodeUint32() 1406 return nil 1407 } 1408 1409 // L2InterfaceVlanTagRewriteReply defines message 'l2_interface_vlan_tag_rewrite_reply'. 1410 type L2InterfaceVlanTagRewriteReply struct { 1411 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1412 } 1413 1414 func (m *L2InterfaceVlanTagRewriteReply) Reset() { *m = L2InterfaceVlanTagRewriteReply{} } 1415 func (*L2InterfaceVlanTagRewriteReply) GetMessageName() string { 1416 return "l2_interface_vlan_tag_rewrite_reply" 1417 } 1418 func (*L2InterfaceVlanTagRewriteReply) GetCrcString() string { return "e8d4e804" } 1419 func (*L2InterfaceVlanTagRewriteReply) GetMessageType() api.MessageType { 1420 return api.ReplyMessage 1421 } 1422 1423 func (m *L2InterfaceVlanTagRewriteReply) Size() (size int) { 1424 if m == nil { 1425 return 0 1426 } 1427 size += 4 // m.Retval 1428 return size 1429 } 1430 func (m *L2InterfaceVlanTagRewriteReply) Marshal(b []byte) ([]byte, error) { 1431 if b == nil { 1432 b = make([]byte, m.Size()) 1433 } 1434 buf := codec.NewBuffer(b) 1435 buf.EncodeInt32(m.Retval) 1436 return buf.Bytes(), nil 1437 } 1438 func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error { 1439 buf := codec.NewBuffer(b) 1440 m.Retval = buf.DecodeInt32() 1441 return nil 1442 } 1443 1444 // L2MacsEvent defines message 'l2_macs_event'. 1445 type L2MacsEvent struct { 1446 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 1447 NMacs uint32 `binapi:"u32,name=n_macs" json:"-"` 1448 Mac []MacEntry `binapi:"mac_entry[n_macs],name=mac" json:"mac,omitempty"` 1449 } 1450 1451 func (m *L2MacsEvent) Reset() { *m = L2MacsEvent{} } 1452 func (*L2MacsEvent) GetMessageName() string { return "l2_macs_event" } 1453 func (*L2MacsEvent) GetCrcString() string { return "2eadfc8b" } 1454 func (*L2MacsEvent) GetMessageType() api.MessageType { 1455 return api.EventMessage 1456 } 1457 1458 func (m *L2MacsEvent) Size() (size int) { 1459 if m == nil { 1460 return 0 1461 } 1462 size += 4 // m.PID 1463 size += 4 // m.NMacs 1464 for j1 := 0; j1 < len(m.Mac); j1++ { 1465 var s1 MacEntry 1466 _ = s1 1467 if j1 < len(m.Mac) { 1468 s1 = m.Mac[j1] 1469 } 1470 size += 4 // s1.SwIfIndex 1471 size += 1 * 6 // s1.MacAddr 1472 size += 4 // s1.Action 1473 size += 1 // s1.Flags 1474 } 1475 return size 1476 } 1477 func (m *L2MacsEvent) Marshal(b []byte) ([]byte, error) { 1478 if b == nil { 1479 b = make([]byte, m.Size()) 1480 } 1481 buf := codec.NewBuffer(b) 1482 buf.EncodeUint32(m.PID) 1483 buf.EncodeUint32(uint32(len(m.Mac))) 1484 for j0 := 0; j0 < len(m.Mac); j0++ { 1485 var v0 MacEntry // Mac 1486 if j0 < len(m.Mac) { 1487 v0 = m.Mac[j0] 1488 } 1489 buf.EncodeUint32(uint32(v0.SwIfIndex)) 1490 buf.EncodeBytes(v0.MacAddr[:], 6) 1491 buf.EncodeUint32(uint32(v0.Action)) 1492 buf.EncodeUint8(v0.Flags) 1493 } 1494 return buf.Bytes(), nil 1495 } 1496 func (m *L2MacsEvent) Unmarshal(b []byte) error { 1497 buf := codec.NewBuffer(b) 1498 m.PID = buf.DecodeUint32() 1499 m.NMacs = buf.DecodeUint32() 1500 m.Mac = make([]MacEntry, m.NMacs) 1501 for j0 := 0; j0 < len(m.Mac); j0++ { 1502 m.Mac[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1503 copy(m.Mac[j0].MacAddr[:], buf.DecodeBytes(6)) 1504 m.Mac[j0].Action = MacEventAction(buf.DecodeUint32()) 1505 m.Mac[j0].Flags = buf.DecodeUint8() 1506 } 1507 return nil 1508 } 1509 1510 // L2PatchAddDel defines message 'l2_patch_add_del'. 1511 type L2PatchAddDel struct { 1512 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` 1513 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"` 1514 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1515 } 1516 1517 func (m *L2PatchAddDel) Reset() { *m = L2PatchAddDel{} } 1518 func (*L2PatchAddDel) GetMessageName() string { return "l2_patch_add_del" } 1519 func (*L2PatchAddDel) GetCrcString() string { return "522f3445" } 1520 func (*L2PatchAddDel) GetMessageType() api.MessageType { 1521 return api.RequestMessage 1522 } 1523 1524 func (m *L2PatchAddDel) Size() (size int) { 1525 if m == nil { 1526 return 0 1527 } 1528 size += 4 // m.RxSwIfIndex 1529 size += 4 // m.TxSwIfIndex 1530 size += 1 // m.IsAdd 1531 return size 1532 } 1533 func (m *L2PatchAddDel) Marshal(b []byte) ([]byte, error) { 1534 if b == nil { 1535 b = make([]byte, m.Size()) 1536 } 1537 buf := codec.NewBuffer(b) 1538 buf.EncodeUint32(uint32(m.RxSwIfIndex)) 1539 buf.EncodeUint32(uint32(m.TxSwIfIndex)) 1540 buf.EncodeBool(m.IsAdd) 1541 return buf.Bytes(), nil 1542 } 1543 func (m *L2PatchAddDel) Unmarshal(b []byte) error { 1544 buf := codec.NewBuffer(b) 1545 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1546 m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1547 m.IsAdd = buf.DecodeBool() 1548 return nil 1549 } 1550 1551 // L2PatchAddDelReply defines message 'l2_patch_add_del_reply'. 1552 type L2PatchAddDelReply struct { 1553 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1554 } 1555 1556 func (m *L2PatchAddDelReply) Reset() { *m = L2PatchAddDelReply{} } 1557 func (*L2PatchAddDelReply) GetMessageName() string { return "l2_patch_add_del_reply" } 1558 func (*L2PatchAddDelReply) GetCrcString() string { return "e8d4e804" } 1559 func (*L2PatchAddDelReply) GetMessageType() api.MessageType { 1560 return api.ReplyMessage 1561 } 1562 1563 func (m *L2PatchAddDelReply) Size() (size int) { 1564 if m == nil { 1565 return 0 1566 } 1567 size += 4 // m.Retval 1568 return size 1569 } 1570 func (m *L2PatchAddDelReply) Marshal(b []byte) ([]byte, error) { 1571 if b == nil { 1572 b = make([]byte, m.Size()) 1573 } 1574 buf := codec.NewBuffer(b) 1575 buf.EncodeInt32(m.Retval) 1576 return buf.Bytes(), nil 1577 } 1578 func (m *L2PatchAddDelReply) Unmarshal(b []byte) error { 1579 buf := codec.NewBuffer(b) 1580 m.Retval = buf.DecodeInt32() 1581 return nil 1582 } 1583 1584 // L2XconnectDetails defines message 'l2_xconnect_details'. 1585 type L2XconnectDetails struct { 1586 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` 1587 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"` 1588 } 1589 1590 func (m *L2XconnectDetails) Reset() { *m = L2XconnectDetails{} } 1591 func (*L2XconnectDetails) GetMessageName() string { return "l2_xconnect_details" } 1592 func (*L2XconnectDetails) GetCrcString() string { return "c8aa6b37" } 1593 func (*L2XconnectDetails) GetMessageType() api.MessageType { 1594 return api.ReplyMessage 1595 } 1596 1597 func (m *L2XconnectDetails) Size() (size int) { 1598 if m == nil { 1599 return 0 1600 } 1601 size += 4 // m.RxSwIfIndex 1602 size += 4 // m.TxSwIfIndex 1603 return size 1604 } 1605 func (m *L2XconnectDetails) Marshal(b []byte) ([]byte, error) { 1606 if b == nil { 1607 b = make([]byte, m.Size()) 1608 } 1609 buf := codec.NewBuffer(b) 1610 buf.EncodeUint32(uint32(m.RxSwIfIndex)) 1611 buf.EncodeUint32(uint32(m.TxSwIfIndex)) 1612 return buf.Bytes(), nil 1613 } 1614 func (m *L2XconnectDetails) Unmarshal(b []byte) error { 1615 buf := codec.NewBuffer(b) 1616 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1617 m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1618 return nil 1619 } 1620 1621 // L2XconnectDump defines message 'l2_xconnect_dump'. 1622 type L2XconnectDump struct{} 1623 1624 func (m *L2XconnectDump) Reset() { *m = L2XconnectDump{} } 1625 func (*L2XconnectDump) GetMessageName() string { return "l2_xconnect_dump" } 1626 func (*L2XconnectDump) GetCrcString() string { return "51077d14" } 1627 func (*L2XconnectDump) GetMessageType() api.MessageType { 1628 return api.RequestMessage 1629 } 1630 1631 func (m *L2XconnectDump) Size() (size int) { 1632 if m == nil { 1633 return 0 1634 } 1635 return size 1636 } 1637 func (m *L2XconnectDump) Marshal(b []byte) ([]byte, error) { 1638 if b == nil { 1639 b = make([]byte, m.Size()) 1640 } 1641 buf := codec.NewBuffer(b) 1642 return buf.Bytes(), nil 1643 } 1644 func (m *L2XconnectDump) Unmarshal(b []byte) error { 1645 return nil 1646 } 1647 1648 // L2fibAddDel defines message 'l2fib_add_del'. 1649 type L2fibAddDel struct { 1650 Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` 1651 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 1652 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1653 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1654 StaticMac bool `binapi:"bool,name=static_mac" json:"static_mac,omitempty"` 1655 FilterMac bool `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"` 1656 BviMac bool `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"` 1657 } 1658 1659 func (m *L2fibAddDel) Reset() { *m = L2fibAddDel{} } 1660 func (*L2fibAddDel) GetMessageName() string { return "l2fib_add_del" } 1661 func (*L2fibAddDel) GetCrcString() string { return "f29d796c" } 1662 func (*L2fibAddDel) GetMessageType() api.MessageType { 1663 return api.RequestMessage 1664 } 1665 1666 func (m *L2fibAddDel) Size() (size int) { 1667 if m == nil { 1668 return 0 1669 } 1670 size += 1 * 6 // m.Mac 1671 size += 4 // m.BdID 1672 size += 4 // m.SwIfIndex 1673 size += 1 // m.IsAdd 1674 size += 1 // m.StaticMac 1675 size += 1 // m.FilterMac 1676 size += 1 // m.BviMac 1677 return size 1678 } 1679 func (m *L2fibAddDel) Marshal(b []byte) ([]byte, error) { 1680 if b == nil { 1681 b = make([]byte, m.Size()) 1682 } 1683 buf := codec.NewBuffer(b) 1684 buf.EncodeBytes(m.Mac[:], 6) 1685 buf.EncodeUint32(m.BdID) 1686 buf.EncodeUint32(uint32(m.SwIfIndex)) 1687 buf.EncodeBool(m.IsAdd) 1688 buf.EncodeBool(m.StaticMac) 1689 buf.EncodeBool(m.FilterMac) 1690 buf.EncodeBool(m.BviMac) 1691 return buf.Bytes(), nil 1692 } 1693 func (m *L2fibAddDel) Unmarshal(b []byte) error { 1694 buf := codec.NewBuffer(b) 1695 copy(m.Mac[:], buf.DecodeBytes(6)) 1696 m.BdID = buf.DecodeUint32() 1697 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1698 m.IsAdd = buf.DecodeBool() 1699 m.StaticMac = buf.DecodeBool() 1700 m.FilterMac = buf.DecodeBool() 1701 m.BviMac = buf.DecodeBool() 1702 return nil 1703 } 1704 1705 // L2fibAddDelReply defines message 'l2fib_add_del_reply'. 1706 type L2fibAddDelReply struct { 1707 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1708 } 1709 1710 func (m *L2fibAddDelReply) Reset() { *m = L2fibAddDelReply{} } 1711 func (*L2fibAddDelReply) GetMessageName() string { return "l2fib_add_del_reply" } 1712 func (*L2fibAddDelReply) GetCrcString() string { return "e8d4e804" } 1713 func (*L2fibAddDelReply) GetMessageType() api.MessageType { 1714 return api.ReplyMessage 1715 } 1716 1717 func (m *L2fibAddDelReply) Size() (size int) { 1718 if m == nil { 1719 return 0 1720 } 1721 size += 4 // m.Retval 1722 return size 1723 } 1724 func (m *L2fibAddDelReply) Marshal(b []byte) ([]byte, error) { 1725 if b == nil { 1726 b = make([]byte, m.Size()) 1727 } 1728 buf := codec.NewBuffer(b) 1729 buf.EncodeInt32(m.Retval) 1730 return buf.Bytes(), nil 1731 } 1732 func (m *L2fibAddDelReply) Unmarshal(b []byte) error { 1733 buf := codec.NewBuffer(b) 1734 m.Retval = buf.DecodeInt32() 1735 return nil 1736 } 1737 1738 // L2fibFlushAll defines message 'l2fib_flush_all'. 1739 type L2fibFlushAll struct{} 1740 1741 func (m *L2fibFlushAll) Reset() { *m = L2fibFlushAll{} } 1742 func (*L2fibFlushAll) GetMessageName() string { return "l2fib_flush_all" } 1743 func (*L2fibFlushAll) GetCrcString() string { return "51077d14" } 1744 func (*L2fibFlushAll) GetMessageType() api.MessageType { 1745 return api.RequestMessage 1746 } 1747 1748 func (m *L2fibFlushAll) Size() (size int) { 1749 if m == nil { 1750 return 0 1751 } 1752 return size 1753 } 1754 func (m *L2fibFlushAll) Marshal(b []byte) ([]byte, error) { 1755 if b == nil { 1756 b = make([]byte, m.Size()) 1757 } 1758 buf := codec.NewBuffer(b) 1759 return buf.Bytes(), nil 1760 } 1761 func (m *L2fibFlushAll) Unmarshal(b []byte) error { 1762 return nil 1763 } 1764 1765 // L2fibFlushAllReply defines message 'l2fib_flush_all_reply'. 1766 type L2fibFlushAllReply struct { 1767 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1768 } 1769 1770 func (m *L2fibFlushAllReply) Reset() { *m = L2fibFlushAllReply{} } 1771 func (*L2fibFlushAllReply) GetMessageName() string { return "l2fib_flush_all_reply" } 1772 func (*L2fibFlushAllReply) GetCrcString() string { return "e8d4e804" } 1773 func (*L2fibFlushAllReply) GetMessageType() api.MessageType { 1774 return api.ReplyMessage 1775 } 1776 1777 func (m *L2fibFlushAllReply) Size() (size int) { 1778 if m == nil { 1779 return 0 1780 } 1781 size += 4 // m.Retval 1782 return size 1783 } 1784 func (m *L2fibFlushAllReply) Marshal(b []byte) ([]byte, error) { 1785 if b == nil { 1786 b = make([]byte, m.Size()) 1787 } 1788 buf := codec.NewBuffer(b) 1789 buf.EncodeInt32(m.Retval) 1790 return buf.Bytes(), nil 1791 } 1792 func (m *L2fibFlushAllReply) Unmarshal(b []byte) error { 1793 buf := codec.NewBuffer(b) 1794 m.Retval = buf.DecodeInt32() 1795 return nil 1796 } 1797 1798 // L2fibFlushBd defines message 'l2fib_flush_bd'. 1799 type L2fibFlushBd struct { 1800 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 1801 } 1802 1803 func (m *L2fibFlushBd) Reset() { *m = L2fibFlushBd{} } 1804 func (*L2fibFlushBd) GetMessageName() string { return "l2fib_flush_bd" } 1805 func (*L2fibFlushBd) GetCrcString() string { return "c25fdce6" } 1806 func (*L2fibFlushBd) GetMessageType() api.MessageType { 1807 return api.RequestMessage 1808 } 1809 1810 func (m *L2fibFlushBd) Size() (size int) { 1811 if m == nil { 1812 return 0 1813 } 1814 size += 4 // m.BdID 1815 return size 1816 } 1817 func (m *L2fibFlushBd) Marshal(b []byte) ([]byte, error) { 1818 if b == nil { 1819 b = make([]byte, m.Size()) 1820 } 1821 buf := codec.NewBuffer(b) 1822 buf.EncodeUint32(m.BdID) 1823 return buf.Bytes(), nil 1824 } 1825 func (m *L2fibFlushBd) Unmarshal(b []byte) error { 1826 buf := codec.NewBuffer(b) 1827 m.BdID = buf.DecodeUint32() 1828 return nil 1829 } 1830 1831 // L2fibFlushBdReply defines message 'l2fib_flush_bd_reply'. 1832 type L2fibFlushBdReply struct { 1833 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1834 } 1835 1836 func (m *L2fibFlushBdReply) Reset() { *m = L2fibFlushBdReply{} } 1837 func (*L2fibFlushBdReply) GetMessageName() string { return "l2fib_flush_bd_reply" } 1838 func (*L2fibFlushBdReply) GetCrcString() string { return "e8d4e804" } 1839 func (*L2fibFlushBdReply) GetMessageType() api.MessageType { 1840 return api.ReplyMessage 1841 } 1842 1843 func (m *L2fibFlushBdReply) Size() (size int) { 1844 if m == nil { 1845 return 0 1846 } 1847 size += 4 // m.Retval 1848 return size 1849 } 1850 func (m *L2fibFlushBdReply) Marshal(b []byte) ([]byte, error) { 1851 if b == nil { 1852 b = make([]byte, m.Size()) 1853 } 1854 buf := codec.NewBuffer(b) 1855 buf.EncodeInt32(m.Retval) 1856 return buf.Bytes(), nil 1857 } 1858 func (m *L2fibFlushBdReply) Unmarshal(b []byte) error { 1859 buf := codec.NewBuffer(b) 1860 m.Retval = buf.DecodeInt32() 1861 return nil 1862 } 1863 1864 // L2fibFlushInt defines message 'l2fib_flush_int'. 1865 type L2fibFlushInt struct { 1866 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1867 } 1868 1869 func (m *L2fibFlushInt) Reset() { *m = L2fibFlushInt{} } 1870 func (*L2fibFlushInt) GetMessageName() string { return "l2fib_flush_int" } 1871 func (*L2fibFlushInt) GetCrcString() string { return "f9e6675e" } 1872 func (*L2fibFlushInt) GetMessageType() api.MessageType { 1873 return api.RequestMessage 1874 } 1875 1876 func (m *L2fibFlushInt) Size() (size int) { 1877 if m == nil { 1878 return 0 1879 } 1880 size += 4 // m.SwIfIndex 1881 return size 1882 } 1883 func (m *L2fibFlushInt) Marshal(b []byte) ([]byte, error) { 1884 if b == nil { 1885 b = make([]byte, m.Size()) 1886 } 1887 buf := codec.NewBuffer(b) 1888 buf.EncodeUint32(uint32(m.SwIfIndex)) 1889 return buf.Bytes(), nil 1890 } 1891 func (m *L2fibFlushInt) Unmarshal(b []byte) error { 1892 buf := codec.NewBuffer(b) 1893 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1894 return nil 1895 } 1896 1897 // L2fibFlushIntReply defines message 'l2fib_flush_int_reply'. 1898 type L2fibFlushIntReply struct { 1899 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1900 } 1901 1902 func (m *L2fibFlushIntReply) Reset() { *m = L2fibFlushIntReply{} } 1903 func (*L2fibFlushIntReply) GetMessageName() string { return "l2fib_flush_int_reply" } 1904 func (*L2fibFlushIntReply) GetCrcString() string { return "e8d4e804" } 1905 func (*L2fibFlushIntReply) GetMessageType() api.MessageType { 1906 return api.ReplyMessage 1907 } 1908 1909 func (m *L2fibFlushIntReply) Size() (size int) { 1910 if m == nil { 1911 return 0 1912 } 1913 size += 4 // m.Retval 1914 return size 1915 } 1916 func (m *L2fibFlushIntReply) Marshal(b []byte) ([]byte, error) { 1917 if b == nil { 1918 b = make([]byte, m.Size()) 1919 } 1920 buf := codec.NewBuffer(b) 1921 buf.EncodeInt32(m.Retval) 1922 return buf.Bytes(), nil 1923 } 1924 func (m *L2fibFlushIntReply) Unmarshal(b []byte) error { 1925 buf := codec.NewBuffer(b) 1926 m.Retval = buf.DecodeInt32() 1927 return nil 1928 } 1929 1930 // SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'. 1931 type SwInterfaceSetL2Bridge struct { 1932 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` 1933 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` 1934 PortType L2PortType `binapi:"l2_port_type,name=port_type" json:"port_type,omitempty"` 1935 Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"` 1936 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` 1937 } 1938 1939 func (m *SwInterfaceSetL2Bridge) Reset() { *m = SwInterfaceSetL2Bridge{} } 1940 func (*SwInterfaceSetL2Bridge) GetMessageName() string { return "sw_interface_set_l2_bridge" } 1941 func (*SwInterfaceSetL2Bridge) GetCrcString() string { return "2e483cd0" } 1942 func (*SwInterfaceSetL2Bridge) GetMessageType() api.MessageType { 1943 return api.RequestMessage 1944 } 1945 1946 func (m *SwInterfaceSetL2Bridge) Size() (size int) { 1947 if m == nil { 1948 return 0 1949 } 1950 size += 4 // m.RxSwIfIndex 1951 size += 4 // m.BdID 1952 size += 4 // m.PortType 1953 size += 1 // m.Shg 1954 size += 1 // m.Enable 1955 return size 1956 } 1957 func (m *SwInterfaceSetL2Bridge) Marshal(b []byte) ([]byte, error) { 1958 if b == nil { 1959 b = make([]byte, m.Size()) 1960 } 1961 buf := codec.NewBuffer(b) 1962 buf.EncodeUint32(uint32(m.RxSwIfIndex)) 1963 buf.EncodeUint32(m.BdID) 1964 buf.EncodeUint32(uint32(m.PortType)) 1965 buf.EncodeUint8(m.Shg) 1966 buf.EncodeBool(m.Enable) 1967 return buf.Bytes(), nil 1968 } 1969 func (m *SwInterfaceSetL2Bridge) Unmarshal(b []byte) error { 1970 buf := codec.NewBuffer(b) 1971 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1972 m.BdID = buf.DecodeUint32() 1973 m.PortType = L2PortType(buf.DecodeUint32()) 1974 m.Shg = buf.DecodeUint8() 1975 m.Enable = buf.DecodeBool() 1976 return nil 1977 } 1978 1979 // SwInterfaceSetL2BridgeReply defines message 'sw_interface_set_l2_bridge_reply'. 1980 type SwInterfaceSetL2BridgeReply struct { 1981 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1982 } 1983 1984 func (m *SwInterfaceSetL2BridgeReply) Reset() { *m = SwInterfaceSetL2BridgeReply{} } 1985 func (*SwInterfaceSetL2BridgeReply) GetMessageName() string { 1986 return "sw_interface_set_l2_bridge_reply" 1987 } 1988 func (*SwInterfaceSetL2BridgeReply) GetCrcString() string { return "e8d4e804" } 1989 func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType { 1990 return api.ReplyMessage 1991 } 1992 1993 func (m *SwInterfaceSetL2BridgeReply) Size() (size int) { 1994 if m == nil { 1995 return 0 1996 } 1997 size += 4 // m.Retval 1998 return size 1999 } 2000 func (m *SwInterfaceSetL2BridgeReply) Marshal(b []byte) ([]byte, error) { 2001 if b == nil { 2002 b = make([]byte, m.Size()) 2003 } 2004 buf := codec.NewBuffer(b) 2005 buf.EncodeInt32(m.Retval) 2006 return buf.Bytes(), nil 2007 } 2008 func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error { 2009 buf := codec.NewBuffer(b) 2010 m.Retval = buf.DecodeInt32() 2011 return nil 2012 } 2013 2014 // SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'. 2015 type SwInterfaceSetL2Xconnect struct { 2016 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` 2017 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"` 2018 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` 2019 } 2020 2021 func (m *SwInterfaceSetL2Xconnect) Reset() { *m = SwInterfaceSetL2Xconnect{} } 2022 func (*SwInterfaceSetL2Xconnect) GetMessageName() string { return "sw_interface_set_l2_xconnect" } 2023 func (*SwInterfaceSetL2Xconnect) GetCrcString() string { return "1aaa2dbb" } 2024 func (*SwInterfaceSetL2Xconnect) GetMessageType() api.MessageType { 2025 return api.RequestMessage 2026 } 2027 2028 func (m *SwInterfaceSetL2Xconnect) Size() (size int) { 2029 if m == nil { 2030 return 0 2031 } 2032 size += 4 // m.RxSwIfIndex 2033 size += 4 // m.TxSwIfIndex 2034 size += 1 // m.Enable 2035 return size 2036 } 2037 func (m *SwInterfaceSetL2Xconnect) Marshal(b []byte) ([]byte, error) { 2038 if b == nil { 2039 b = make([]byte, m.Size()) 2040 } 2041 buf := codec.NewBuffer(b) 2042 buf.EncodeUint32(uint32(m.RxSwIfIndex)) 2043 buf.EncodeUint32(uint32(m.TxSwIfIndex)) 2044 buf.EncodeBool(m.Enable) 2045 return buf.Bytes(), nil 2046 } 2047 func (m *SwInterfaceSetL2Xconnect) Unmarshal(b []byte) error { 2048 buf := codec.NewBuffer(b) 2049 m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2050 m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2051 m.Enable = buf.DecodeBool() 2052 return nil 2053 } 2054 2055 // SwInterfaceSetL2XconnectReply defines message 'sw_interface_set_l2_xconnect_reply'. 2056 type SwInterfaceSetL2XconnectReply struct { 2057 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2058 } 2059 2060 func (m *SwInterfaceSetL2XconnectReply) Reset() { *m = SwInterfaceSetL2XconnectReply{} } 2061 func (*SwInterfaceSetL2XconnectReply) GetMessageName() string { 2062 return "sw_interface_set_l2_xconnect_reply" 2063 } 2064 func (*SwInterfaceSetL2XconnectReply) GetCrcString() string { return "e8d4e804" } 2065 func (*SwInterfaceSetL2XconnectReply) GetMessageType() api.MessageType { 2066 return api.ReplyMessage 2067 } 2068 2069 func (m *SwInterfaceSetL2XconnectReply) Size() (size int) { 2070 if m == nil { 2071 return 0 2072 } 2073 size += 4 // m.Retval 2074 return size 2075 } 2076 func (m *SwInterfaceSetL2XconnectReply) Marshal(b []byte) ([]byte, error) { 2077 if b == nil { 2078 b = make([]byte, m.Size()) 2079 } 2080 buf := codec.NewBuffer(b) 2081 buf.EncodeInt32(m.Retval) 2082 return buf.Bytes(), nil 2083 } 2084 func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error { 2085 buf := codec.NewBuffer(b) 2086 m.Retval = buf.DecodeInt32() 2087 return nil 2088 } 2089 2090 // SwInterfaceSetVpath defines message 'sw_interface_set_vpath'. 2091 type SwInterfaceSetVpath struct { 2092 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2093 Enable bool `binapi:"bool,name=enable,default=4.294967295e+09" json:"enable,omitempty"` 2094 } 2095 2096 func (m *SwInterfaceSetVpath) Reset() { *m = SwInterfaceSetVpath{} } 2097 func (*SwInterfaceSetVpath) GetMessageName() string { return "sw_interface_set_vpath" } 2098 func (*SwInterfaceSetVpath) GetCrcString() string { return "ae6cfcfb" } 2099 func (*SwInterfaceSetVpath) GetMessageType() api.MessageType { 2100 return api.RequestMessage 2101 } 2102 2103 func (m *SwInterfaceSetVpath) Size() (size int) { 2104 if m == nil { 2105 return 0 2106 } 2107 size += 4 // m.SwIfIndex 2108 size += 1 // m.Enable 2109 return size 2110 } 2111 func (m *SwInterfaceSetVpath) Marshal(b []byte) ([]byte, error) { 2112 if b == nil { 2113 b = make([]byte, m.Size()) 2114 } 2115 buf := codec.NewBuffer(b) 2116 buf.EncodeUint32(uint32(m.SwIfIndex)) 2117 buf.EncodeBool(m.Enable) 2118 return buf.Bytes(), nil 2119 } 2120 func (m *SwInterfaceSetVpath) Unmarshal(b []byte) error { 2121 buf := codec.NewBuffer(b) 2122 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2123 m.Enable = buf.DecodeBool() 2124 return nil 2125 } 2126 2127 // SwInterfaceSetVpathReply defines message 'sw_interface_set_vpath_reply'. 2128 type SwInterfaceSetVpathReply struct { 2129 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2130 } 2131 2132 func (m *SwInterfaceSetVpathReply) Reset() { *m = SwInterfaceSetVpathReply{} } 2133 func (*SwInterfaceSetVpathReply) GetMessageName() string { return "sw_interface_set_vpath_reply" } 2134 func (*SwInterfaceSetVpathReply) GetCrcString() string { return "e8d4e804" } 2135 func (*SwInterfaceSetVpathReply) GetMessageType() api.MessageType { 2136 return api.ReplyMessage 2137 } 2138 2139 func (m *SwInterfaceSetVpathReply) Size() (size int) { 2140 if m == nil { 2141 return 0 2142 } 2143 size += 4 // m.Retval 2144 return size 2145 } 2146 func (m *SwInterfaceSetVpathReply) Marshal(b []byte) ([]byte, error) { 2147 if b == nil { 2148 b = make([]byte, m.Size()) 2149 } 2150 buf := codec.NewBuffer(b) 2151 buf.EncodeInt32(m.Retval) 2152 return buf.Bytes(), nil 2153 } 2154 func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error { 2155 buf := codec.NewBuffer(b) 2156 m.Retval = buf.DecodeInt32() 2157 return nil 2158 } 2159 2160 // WantL2ArpTermEvents defines message 'want_l2_arp_term_events'. 2161 type WantL2ArpTermEvents struct { 2162 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 2163 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 2164 } 2165 2166 func (m *WantL2ArpTermEvents) Reset() { *m = WantL2ArpTermEvents{} } 2167 func (*WantL2ArpTermEvents) GetMessageName() string { return "want_l2_arp_term_events" } 2168 func (*WantL2ArpTermEvents) GetCrcString() string { return "3ec6d6c2" } 2169 func (*WantL2ArpTermEvents) GetMessageType() api.MessageType { 2170 return api.RequestMessage 2171 } 2172 2173 func (m *WantL2ArpTermEvents) Size() (size int) { 2174 if m == nil { 2175 return 0 2176 } 2177 size += 1 // m.Enable 2178 size += 4 // m.PID 2179 return size 2180 } 2181 func (m *WantL2ArpTermEvents) Marshal(b []byte) ([]byte, error) { 2182 if b == nil { 2183 b = make([]byte, m.Size()) 2184 } 2185 buf := codec.NewBuffer(b) 2186 buf.EncodeBool(m.Enable) 2187 buf.EncodeUint32(m.PID) 2188 return buf.Bytes(), nil 2189 } 2190 func (m *WantL2ArpTermEvents) Unmarshal(b []byte) error { 2191 buf := codec.NewBuffer(b) 2192 m.Enable = buf.DecodeBool() 2193 m.PID = buf.DecodeUint32() 2194 return nil 2195 } 2196 2197 // WantL2ArpTermEventsReply defines message 'want_l2_arp_term_events_reply'. 2198 type WantL2ArpTermEventsReply struct { 2199 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2200 } 2201 2202 func (m *WantL2ArpTermEventsReply) Reset() { *m = WantL2ArpTermEventsReply{} } 2203 func (*WantL2ArpTermEventsReply) GetMessageName() string { return "want_l2_arp_term_events_reply" } 2204 func (*WantL2ArpTermEventsReply) GetCrcString() string { return "e8d4e804" } 2205 func (*WantL2ArpTermEventsReply) GetMessageType() api.MessageType { 2206 return api.ReplyMessage 2207 } 2208 2209 func (m *WantL2ArpTermEventsReply) Size() (size int) { 2210 if m == nil { 2211 return 0 2212 } 2213 size += 4 // m.Retval 2214 return size 2215 } 2216 func (m *WantL2ArpTermEventsReply) Marshal(b []byte) ([]byte, error) { 2217 if b == nil { 2218 b = make([]byte, m.Size()) 2219 } 2220 buf := codec.NewBuffer(b) 2221 buf.EncodeInt32(m.Retval) 2222 return buf.Bytes(), nil 2223 } 2224 func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error { 2225 buf := codec.NewBuffer(b) 2226 m.Retval = buf.DecodeInt32() 2227 return nil 2228 } 2229 2230 // WantL2MacsEvents defines message 'want_l2_macs_events'. 2231 type WantL2MacsEvents struct { 2232 LearnLimit uint32 `binapi:"u32,name=learn_limit,default=1000" json:"learn_limit,omitempty"` 2233 ScanDelay uint8 `binapi:"u8,name=scan_delay,default=10" json:"scan_delay,omitempty"` 2234 MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"` 2235 EnableDisable bool `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"` 2236 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 2237 } 2238 2239 func (m *WantL2MacsEvents) Reset() { *m = WantL2MacsEvents{} } 2240 func (*WantL2MacsEvents) GetMessageName() string { return "want_l2_macs_events" } 2241 func (*WantL2MacsEvents) GetCrcString() string { return "9aabdfde" } 2242 func (*WantL2MacsEvents) GetMessageType() api.MessageType { 2243 return api.RequestMessage 2244 } 2245 2246 func (m *WantL2MacsEvents) Size() (size int) { 2247 if m == nil { 2248 return 0 2249 } 2250 size += 4 // m.LearnLimit 2251 size += 1 // m.ScanDelay 2252 size += 1 // m.MaxMacsInEvent 2253 size += 1 // m.EnableDisable 2254 size += 4 // m.PID 2255 return size 2256 } 2257 func (m *WantL2MacsEvents) Marshal(b []byte) ([]byte, error) { 2258 if b == nil { 2259 b = make([]byte, m.Size()) 2260 } 2261 buf := codec.NewBuffer(b) 2262 buf.EncodeUint32(m.LearnLimit) 2263 buf.EncodeUint8(m.ScanDelay) 2264 buf.EncodeUint8(m.MaxMacsInEvent) 2265 buf.EncodeBool(m.EnableDisable) 2266 buf.EncodeUint32(m.PID) 2267 return buf.Bytes(), nil 2268 } 2269 func (m *WantL2MacsEvents) Unmarshal(b []byte) error { 2270 buf := codec.NewBuffer(b) 2271 m.LearnLimit = buf.DecodeUint32() 2272 m.ScanDelay = buf.DecodeUint8() 2273 m.MaxMacsInEvent = buf.DecodeUint8() 2274 m.EnableDisable = buf.DecodeBool() 2275 m.PID = buf.DecodeUint32() 2276 return nil 2277 } 2278 2279 // WantL2MacsEventsReply defines message 'want_l2_macs_events_reply'. 2280 type WantL2MacsEventsReply struct { 2281 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2282 } 2283 2284 func (m *WantL2MacsEventsReply) Reset() { *m = WantL2MacsEventsReply{} } 2285 func (*WantL2MacsEventsReply) GetMessageName() string { return "want_l2_macs_events_reply" } 2286 func (*WantL2MacsEventsReply) GetCrcString() string { return "e8d4e804" } 2287 func (*WantL2MacsEventsReply) GetMessageType() api.MessageType { 2288 return api.ReplyMessage 2289 } 2290 2291 func (m *WantL2MacsEventsReply) Size() (size int) { 2292 if m == nil { 2293 return 0 2294 } 2295 size += 4 // m.Retval 2296 return size 2297 } 2298 func (m *WantL2MacsEventsReply) Marshal(b []byte) ([]byte, error) { 2299 if b == nil { 2300 b = make([]byte, m.Size()) 2301 } 2302 buf := codec.NewBuffer(b) 2303 buf.EncodeInt32(m.Retval) 2304 return buf.Bytes(), nil 2305 } 2306 func (m *WantL2MacsEventsReply) Unmarshal(b []byte) error { 2307 buf := codec.NewBuffer(b) 2308 m.Retval = buf.DecodeInt32() 2309 return nil 2310 } 2311 2312 func init() { file_l2_binapi_init() } 2313 func file_l2_binapi_init() { 2314 api.RegisterMessage((*BdIPMacAddDel)(nil), "bd_ip_mac_add_del_5f2b84e2") 2315 api.RegisterMessage((*BdIPMacAddDelReply)(nil), "bd_ip_mac_add_del_reply_e8d4e804") 2316 api.RegisterMessage((*BdIPMacDetails)(nil), "bd_ip_mac_details_a52f8044") 2317 api.RegisterMessage((*BdIPMacDump)(nil), "bd_ip_mac_dump_c25fdce6") 2318 api.RegisterMessage((*BdIPMacFlush)(nil), "bd_ip_mac_flush_c25fdce6") 2319 api.RegisterMessage((*BdIPMacFlushReply)(nil), "bd_ip_mac_flush_reply_e8d4e804") 2320 api.RegisterMessage((*BridgeDomainAddDel)(nil), "bridge_domain_add_del_600b7170") 2321 api.RegisterMessage((*BridgeDomainAddDelReply)(nil), "bridge_domain_add_del_reply_e8d4e804") 2322 api.RegisterMessage((*BridgeDomainDetails)(nil), "bridge_domain_details_979f549d") 2323 api.RegisterMessage((*BridgeDomainDump)(nil), "bridge_domain_dump_74396a43") 2324 api.RegisterMessage((*BridgeDomainSetMacAge)(nil), "bridge_domain_set_mac_age_b537ad7b") 2325 api.RegisterMessage((*BridgeDomainSetMacAgeReply)(nil), "bridge_domain_set_mac_age_reply_e8d4e804") 2326 api.RegisterMessage((*BridgeFlags)(nil), "bridge_flags_1b0c5fbd") 2327 api.RegisterMessage((*BridgeFlagsReply)(nil), "bridge_flags_reply_29b2a2b3") 2328 api.RegisterMessage((*BviCreate)(nil), "bvi_create_f5398559") 2329 api.RegisterMessage((*BviCreateReply)(nil), "bvi_create_reply_5383d31f") 2330 api.RegisterMessage((*BviDelete)(nil), "bvi_delete_f9e6675e") 2331 api.RegisterMessage((*BviDeleteReply)(nil), "bvi_delete_reply_e8d4e804") 2332 api.RegisterMessage((*L2ArpTermEvent)(nil), "l2_arp_term_event_85ff71ea") 2333 api.RegisterMessage((*L2FibClearTable)(nil), "l2_fib_clear_table_51077d14") 2334 api.RegisterMessage((*L2FibClearTableReply)(nil), "l2_fib_clear_table_reply_e8d4e804") 2335 api.RegisterMessage((*L2FibTableDetails)(nil), "l2_fib_table_details_e8d2fc72") 2336 api.RegisterMessage((*L2FibTableDump)(nil), "l2_fib_table_dump_c25fdce6") 2337 api.RegisterMessage((*L2Flags)(nil), "l2_flags_fc41cfe8") 2338 api.RegisterMessage((*L2FlagsReply)(nil), "l2_flags_reply_29b2a2b3") 2339 api.RegisterMessage((*L2InterfaceEfpFilter)(nil), "l2_interface_efp_filter_5501adee") 2340 api.RegisterMessage((*L2InterfaceEfpFilterReply)(nil), "l2_interface_efp_filter_reply_e8d4e804") 2341 api.RegisterMessage((*L2InterfacePbbTagRewrite)(nil), "l2_interface_pbb_tag_rewrite_612efa5a") 2342 api.RegisterMessage((*L2InterfacePbbTagRewriteReply)(nil), "l2_interface_pbb_tag_rewrite_reply_e8d4e804") 2343 api.RegisterMessage((*L2InterfaceVlanTagRewrite)(nil), "l2_interface_vlan_tag_rewrite_62cc0bbc") 2344 api.RegisterMessage((*L2InterfaceVlanTagRewriteReply)(nil), "l2_interface_vlan_tag_rewrite_reply_e8d4e804") 2345 api.RegisterMessage((*L2MacsEvent)(nil), "l2_macs_event_2eadfc8b") 2346 api.RegisterMessage((*L2PatchAddDel)(nil), "l2_patch_add_del_522f3445") 2347 api.RegisterMessage((*L2PatchAddDelReply)(nil), "l2_patch_add_del_reply_e8d4e804") 2348 api.RegisterMessage((*L2XconnectDetails)(nil), "l2_xconnect_details_c8aa6b37") 2349 api.RegisterMessage((*L2XconnectDump)(nil), "l2_xconnect_dump_51077d14") 2350 api.RegisterMessage((*L2fibAddDel)(nil), "l2fib_add_del_f29d796c") 2351 api.RegisterMessage((*L2fibAddDelReply)(nil), "l2fib_add_del_reply_e8d4e804") 2352 api.RegisterMessage((*L2fibFlushAll)(nil), "l2fib_flush_all_51077d14") 2353 api.RegisterMessage((*L2fibFlushAllReply)(nil), "l2fib_flush_all_reply_e8d4e804") 2354 api.RegisterMessage((*L2fibFlushBd)(nil), "l2fib_flush_bd_c25fdce6") 2355 api.RegisterMessage((*L2fibFlushBdReply)(nil), "l2fib_flush_bd_reply_e8d4e804") 2356 api.RegisterMessage((*L2fibFlushInt)(nil), "l2fib_flush_int_f9e6675e") 2357 api.RegisterMessage((*L2fibFlushIntReply)(nil), "l2fib_flush_int_reply_e8d4e804") 2358 api.RegisterMessage((*SwInterfaceSetL2Bridge)(nil), "sw_interface_set_l2_bridge_2e483cd0") 2359 api.RegisterMessage((*SwInterfaceSetL2BridgeReply)(nil), "sw_interface_set_l2_bridge_reply_e8d4e804") 2360 api.RegisterMessage((*SwInterfaceSetL2Xconnect)(nil), "sw_interface_set_l2_xconnect_1aaa2dbb") 2361 api.RegisterMessage((*SwInterfaceSetL2XconnectReply)(nil), "sw_interface_set_l2_xconnect_reply_e8d4e804") 2362 api.RegisterMessage((*SwInterfaceSetVpath)(nil), "sw_interface_set_vpath_ae6cfcfb") 2363 api.RegisterMessage((*SwInterfaceSetVpathReply)(nil), "sw_interface_set_vpath_reply_e8d4e804") 2364 api.RegisterMessage((*WantL2ArpTermEvents)(nil), "want_l2_arp_term_events_3ec6d6c2") 2365 api.RegisterMessage((*WantL2ArpTermEventsReply)(nil), "want_l2_arp_term_events_reply_e8d4e804") 2366 api.RegisterMessage((*WantL2MacsEvents)(nil), "want_l2_macs_events_9aabdfde") 2367 api.RegisterMessage((*WantL2MacsEventsReply)(nil), "want_l2_macs_events_reply_e8d4e804") 2368 } 2369 2370 // Messages returns list of all messages in this module. 2371 func AllMessages() []api.Message { 2372 return []api.Message{ 2373 (*BdIPMacAddDel)(nil), 2374 (*BdIPMacAddDelReply)(nil), 2375 (*BdIPMacDetails)(nil), 2376 (*BdIPMacDump)(nil), 2377 (*BdIPMacFlush)(nil), 2378 (*BdIPMacFlushReply)(nil), 2379 (*BridgeDomainAddDel)(nil), 2380 (*BridgeDomainAddDelReply)(nil), 2381 (*BridgeDomainDetails)(nil), 2382 (*BridgeDomainDump)(nil), 2383 (*BridgeDomainSetMacAge)(nil), 2384 (*BridgeDomainSetMacAgeReply)(nil), 2385 (*BridgeFlags)(nil), 2386 (*BridgeFlagsReply)(nil), 2387 (*BviCreate)(nil), 2388 (*BviCreateReply)(nil), 2389 (*BviDelete)(nil), 2390 (*BviDeleteReply)(nil), 2391 (*L2ArpTermEvent)(nil), 2392 (*L2FibClearTable)(nil), 2393 (*L2FibClearTableReply)(nil), 2394 (*L2FibTableDetails)(nil), 2395 (*L2FibTableDump)(nil), 2396 (*L2Flags)(nil), 2397 (*L2FlagsReply)(nil), 2398 (*L2InterfaceEfpFilter)(nil), 2399 (*L2InterfaceEfpFilterReply)(nil), 2400 (*L2InterfacePbbTagRewrite)(nil), 2401 (*L2InterfacePbbTagRewriteReply)(nil), 2402 (*L2InterfaceVlanTagRewrite)(nil), 2403 (*L2InterfaceVlanTagRewriteReply)(nil), 2404 (*L2MacsEvent)(nil), 2405 (*L2PatchAddDel)(nil), 2406 (*L2PatchAddDelReply)(nil), 2407 (*L2XconnectDetails)(nil), 2408 (*L2XconnectDump)(nil), 2409 (*L2fibAddDel)(nil), 2410 (*L2fibAddDelReply)(nil), 2411 (*L2fibFlushAll)(nil), 2412 (*L2fibFlushAllReply)(nil), 2413 (*L2fibFlushBd)(nil), 2414 (*L2fibFlushBdReply)(nil), 2415 (*L2fibFlushInt)(nil), 2416 (*L2fibFlushIntReply)(nil), 2417 (*SwInterfaceSetL2Bridge)(nil), 2418 (*SwInterfaceSetL2BridgeReply)(nil), 2419 (*SwInterfaceSetL2Xconnect)(nil), 2420 (*SwInterfaceSetL2XconnectReply)(nil), 2421 (*SwInterfaceSetVpath)(nil), 2422 (*SwInterfaceSetVpathReply)(nil), 2423 (*WantL2ArpTermEvents)(nil), 2424 (*WantL2ArpTermEventsReply)(nil), 2425 (*WantL2MacsEvents)(nil), 2426 (*WantL2MacsEventsReply)(nil), 2427 } 2428 }