1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/l2.api.json
7 // Package l2 contains generated bindings for API file l2.api.
24 api "git.fd.io/govpp.git/api"
25 codec "git.fd.io/govpp.git/codec"
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
37 VersionCrc = 0x2e148df3
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
44 ADDRESS_IP4 AddressFamily = 0
45 ADDRESS_IP6 AddressFamily = 1
49 AddressFamily_name = map[uint32]string{
53 AddressFamily_value = map[string]uint32{
59 func (x AddressFamily) String() string {
60 s, ok := AddressFamily_name[uint32(x)]
64 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
67 // BdFlags defines enum 'bd_flags'.
71 BRIDGE_API_FLAG_NONE BdFlags = 0
72 BRIDGE_API_FLAG_LEARN BdFlags = 1
73 BRIDGE_API_FLAG_FWD BdFlags = 2
74 BRIDGE_API_FLAG_FLOOD BdFlags = 4
75 BRIDGE_API_FLAG_UU_FLOOD BdFlags = 8
76 BRIDGE_API_FLAG_ARP_TERM BdFlags = 16
77 BRIDGE_API_FLAG_ARP_UFWD BdFlags = 32
81 BdFlags_name = map[uint32]string{
82 0: "BRIDGE_API_FLAG_NONE",
83 1: "BRIDGE_API_FLAG_LEARN",
84 2: "BRIDGE_API_FLAG_FWD",
85 4: "BRIDGE_API_FLAG_FLOOD",
86 8: "BRIDGE_API_FLAG_UU_FLOOD",
87 16: "BRIDGE_API_FLAG_ARP_TERM",
88 32: "BRIDGE_API_FLAG_ARP_UFWD",
90 BdFlags_value = map[string]uint32{
91 "BRIDGE_API_FLAG_NONE": 0,
92 "BRIDGE_API_FLAG_LEARN": 1,
93 "BRIDGE_API_FLAG_FWD": 2,
94 "BRIDGE_API_FLAG_FLOOD": 4,
95 "BRIDGE_API_FLAG_UU_FLOOD": 8,
96 "BRIDGE_API_FLAG_ARP_TERM": 16,
97 "BRIDGE_API_FLAG_ARP_UFWD": 32,
101 func (x BdFlags) String() string {
102 s, ok := BdFlags_name[uint32(x)]
106 str := func(n uint32) string {
107 s, ok := BdFlags_name[uint32(n)]
111 return "BdFlags(" + strconv.Itoa(int(n)) + ")"
113 for i := uint32(0); i <= 32; i++ {
123 return str(uint32(x))
128 // IfStatusFlags defines enum 'if_status_flags'.
129 type IfStatusFlags uint32
132 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
133 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
137 IfStatusFlags_name = map[uint32]string{
138 1: "IF_STATUS_API_FLAG_ADMIN_UP",
139 2: "IF_STATUS_API_FLAG_LINK_UP",
141 IfStatusFlags_value = map[string]uint32{
142 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
143 "IF_STATUS_API_FLAG_LINK_UP": 2,
147 func (x IfStatusFlags) String() string {
148 s, ok := IfStatusFlags_name[uint32(x)]
152 str := func(n uint32) string {
153 s, ok := IfStatusFlags_name[uint32(n)]
157 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
159 for i := uint32(0); i <= 32; i++ {
169 return str(uint32(x))
174 // IfType defines enum 'if_type'.
178 IF_API_TYPE_HARDWARE IfType = 1
179 IF_API_TYPE_SUB IfType = 2
180 IF_API_TYPE_P2P IfType = 3
181 IF_API_TYPE_PIPE IfType = 4
185 IfType_name = map[uint32]string{
186 1: "IF_API_TYPE_HARDWARE",
187 2: "IF_API_TYPE_SUB",
188 3: "IF_API_TYPE_P2P",
189 4: "IF_API_TYPE_PIPE",
191 IfType_value = map[string]uint32{
192 "IF_API_TYPE_HARDWARE": 1,
193 "IF_API_TYPE_SUB": 2,
194 "IF_API_TYPE_P2P": 3,
195 "IF_API_TYPE_PIPE": 4,
199 func (x IfType) String() string {
200 s, ok := IfType_name[uint32(x)]
204 return "IfType(" + strconv.Itoa(int(x)) + ")"
207 // IPDscp defines enum 'ip_dscp'.
211 IP_API_DSCP_CS0 IPDscp = 0
212 IP_API_DSCP_CS1 IPDscp = 8
213 IP_API_DSCP_AF11 IPDscp = 10
214 IP_API_DSCP_AF12 IPDscp = 12
215 IP_API_DSCP_AF13 IPDscp = 14
216 IP_API_DSCP_CS2 IPDscp = 16
217 IP_API_DSCP_AF21 IPDscp = 18
218 IP_API_DSCP_AF22 IPDscp = 20
219 IP_API_DSCP_AF23 IPDscp = 22
220 IP_API_DSCP_CS3 IPDscp = 24
221 IP_API_DSCP_AF31 IPDscp = 26
222 IP_API_DSCP_AF32 IPDscp = 28
223 IP_API_DSCP_AF33 IPDscp = 30
224 IP_API_DSCP_CS4 IPDscp = 32
225 IP_API_DSCP_AF41 IPDscp = 34
226 IP_API_DSCP_AF42 IPDscp = 36
227 IP_API_DSCP_AF43 IPDscp = 38
228 IP_API_DSCP_CS5 IPDscp = 40
229 IP_API_DSCP_EF IPDscp = 46
230 IP_API_DSCP_CS6 IPDscp = 48
231 IP_API_DSCP_CS7 IPDscp = 50
235 IPDscp_name = map[uint8]string{
236 0: "IP_API_DSCP_CS0",
237 8: "IP_API_DSCP_CS1",
238 10: "IP_API_DSCP_AF11",
239 12: "IP_API_DSCP_AF12",
240 14: "IP_API_DSCP_AF13",
241 16: "IP_API_DSCP_CS2",
242 18: "IP_API_DSCP_AF21",
243 20: "IP_API_DSCP_AF22",
244 22: "IP_API_DSCP_AF23",
245 24: "IP_API_DSCP_CS3",
246 26: "IP_API_DSCP_AF31",
247 28: "IP_API_DSCP_AF32",
248 30: "IP_API_DSCP_AF33",
249 32: "IP_API_DSCP_CS4",
250 34: "IP_API_DSCP_AF41",
251 36: "IP_API_DSCP_AF42",
252 38: "IP_API_DSCP_AF43",
253 40: "IP_API_DSCP_CS5",
254 46: "IP_API_DSCP_EF",
255 48: "IP_API_DSCP_CS6",
256 50: "IP_API_DSCP_CS7",
258 IPDscp_value = map[string]uint8{
259 "IP_API_DSCP_CS0": 0,
260 "IP_API_DSCP_CS1": 8,
261 "IP_API_DSCP_AF11": 10,
262 "IP_API_DSCP_AF12": 12,
263 "IP_API_DSCP_AF13": 14,
264 "IP_API_DSCP_CS2": 16,
265 "IP_API_DSCP_AF21": 18,
266 "IP_API_DSCP_AF22": 20,
267 "IP_API_DSCP_AF23": 22,
268 "IP_API_DSCP_CS3": 24,
269 "IP_API_DSCP_AF31": 26,
270 "IP_API_DSCP_AF32": 28,
271 "IP_API_DSCP_AF33": 30,
272 "IP_API_DSCP_CS4": 32,
273 "IP_API_DSCP_AF41": 34,
274 "IP_API_DSCP_AF42": 36,
275 "IP_API_DSCP_AF43": 38,
276 "IP_API_DSCP_CS5": 40,
277 "IP_API_DSCP_EF": 46,
278 "IP_API_DSCP_CS6": 48,
279 "IP_API_DSCP_CS7": 50,
283 func (x IPDscp) String() string {
284 s, ok := IPDscp_name[uint8(x)]
288 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
291 // IPEcn defines enum 'ip_ecn'.
295 IP_API_ECN_NONE IPEcn = 0
296 IP_API_ECN_ECT0 IPEcn = 1
297 IP_API_ECN_ECT1 IPEcn = 2
298 IP_API_ECN_CE IPEcn = 3
302 IPEcn_name = map[uint8]string{
303 0: "IP_API_ECN_NONE",
304 1: "IP_API_ECN_ECT0",
305 2: "IP_API_ECN_ECT1",
308 IPEcn_value = map[string]uint8{
309 "IP_API_ECN_NONE": 0,
310 "IP_API_ECN_ECT0": 1,
311 "IP_API_ECN_ECT1": 2,
316 func (x IPEcn) String() string {
317 s, ok := IPEcn_name[uint8(x)]
321 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
324 // IPProto defines enum 'ip_proto'.
328 IP_API_PROTO_HOPOPT IPProto = 0
329 IP_API_PROTO_ICMP IPProto = 1
330 IP_API_PROTO_IGMP IPProto = 2
331 IP_API_PROTO_TCP IPProto = 6
332 IP_API_PROTO_UDP IPProto = 17
333 IP_API_PROTO_GRE IPProto = 47
334 IP_API_PROTO_AH IPProto = 50
335 IP_API_PROTO_ESP IPProto = 51
336 IP_API_PROTO_EIGRP IPProto = 88
337 IP_API_PROTO_OSPF IPProto = 89
338 IP_API_PROTO_SCTP IPProto = 132
339 IP_API_PROTO_RESERVED IPProto = 255
343 IPProto_name = map[uint32]string{
344 0: "IP_API_PROTO_HOPOPT",
345 1: "IP_API_PROTO_ICMP",
346 2: "IP_API_PROTO_IGMP",
347 6: "IP_API_PROTO_TCP",
348 17: "IP_API_PROTO_UDP",
349 47: "IP_API_PROTO_GRE",
350 50: "IP_API_PROTO_AH",
351 51: "IP_API_PROTO_ESP",
352 88: "IP_API_PROTO_EIGRP",
353 89: "IP_API_PROTO_OSPF",
354 132: "IP_API_PROTO_SCTP",
355 255: "IP_API_PROTO_RESERVED",
357 IPProto_value = map[string]uint32{
358 "IP_API_PROTO_HOPOPT": 0,
359 "IP_API_PROTO_ICMP": 1,
360 "IP_API_PROTO_IGMP": 2,
361 "IP_API_PROTO_TCP": 6,
362 "IP_API_PROTO_UDP": 17,
363 "IP_API_PROTO_GRE": 47,
364 "IP_API_PROTO_AH": 50,
365 "IP_API_PROTO_ESP": 51,
366 "IP_API_PROTO_EIGRP": 88,
367 "IP_API_PROTO_OSPF": 89,
368 "IP_API_PROTO_SCTP": 132,
369 "IP_API_PROTO_RESERVED": 255,
373 func (x IPProto) String() string {
374 s, ok := IPProto_name[uint32(x)]
378 return "IPProto(" + strconv.Itoa(int(x)) + ")"
381 // L2PortType defines enum 'l2_port_type'.
382 type L2PortType uint32
385 L2_API_PORT_TYPE_NORMAL L2PortType = 0
386 L2_API_PORT_TYPE_BVI L2PortType = 1
387 L2_API_PORT_TYPE_UU_FWD L2PortType = 2
391 L2PortType_name = map[uint32]string{
392 0: "L2_API_PORT_TYPE_NORMAL",
393 1: "L2_API_PORT_TYPE_BVI",
394 2: "L2_API_PORT_TYPE_UU_FWD",
396 L2PortType_value = map[string]uint32{
397 "L2_API_PORT_TYPE_NORMAL": 0,
398 "L2_API_PORT_TYPE_BVI": 1,
399 "L2_API_PORT_TYPE_UU_FWD": 2,
403 func (x L2PortType) String() string {
404 s, ok := L2PortType_name[uint32(x)]
408 return "L2PortType(" + strconv.Itoa(int(x)) + ")"
411 // LinkDuplex defines enum 'link_duplex'.
412 type LinkDuplex uint32
415 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
416 LINK_DUPLEX_API_HALF LinkDuplex = 1
417 LINK_DUPLEX_API_FULL LinkDuplex = 2
421 LinkDuplex_name = map[uint32]string{
422 0: "LINK_DUPLEX_API_UNKNOWN",
423 1: "LINK_DUPLEX_API_HALF",
424 2: "LINK_DUPLEX_API_FULL",
426 LinkDuplex_value = map[string]uint32{
427 "LINK_DUPLEX_API_UNKNOWN": 0,
428 "LINK_DUPLEX_API_HALF": 1,
429 "LINK_DUPLEX_API_FULL": 2,
433 func (x LinkDuplex) String() string {
434 s, ok := LinkDuplex_name[uint32(x)]
438 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
441 // MtuProto defines enum 'mtu_proto'.
445 MTU_PROTO_API_L3 MtuProto = 1
446 MTU_PROTO_API_IP4 MtuProto = 2
447 MTU_PROTO_API_IP6 MtuProto = 3
448 MTU_PROTO_API_MPLS MtuProto = 4
449 MTU_PROTO_API_N MtuProto = 5
453 MtuProto_name = map[uint32]string{
454 1: "MTU_PROTO_API_L3",
455 2: "MTU_PROTO_API_IP4",
456 3: "MTU_PROTO_API_IP6",
457 4: "MTU_PROTO_API_MPLS",
458 5: "MTU_PROTO_API_N",
460 MtuProto_value = map[string]uint32{
461 "MTU_PROTO_API_L3": 1,
462 "MTU_PROTO_API_IP4": 2,
463 "MTU_PROTO_API_IP6": 3,
464 "MTU_PROTO_API_MPLS": 4,
465 "MTU_PROTO_API_N": 5,
469 func (x MtuProto) String() string {
470 s, ok := MtuProto_name[uint32(x)]
474 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
477 // RxMode defines enum 'rx_mode'.
481 RX_MODE_API_UNKNOWN RxMode = 0
482 RX_MODE_API_POLLING RxMode = 1
483 RX_MODE_API_INTERRUPT RxMode = 2
484 RX_MODE_API_ADAPTIVE RxMode = 3
485 RX_MODE_API_DEFAULT RxMode = 4
489 RxMode_name = map[uint32]string{
490 0: "RX_MODE_API_UNKNOWN",
491 1: "RX_MODE_API_POLLING",
492 2: "RX_MODE_API_INTERRUPT",
493 3: "RX_MODE_API_ADAPTIVE",
494 4: "RX_MODE_API_DEFAULT",
496 RxMode_value = map[string]uint32{
497 "RX_MODE_API_UNKNOWN": 0,
498 "RX_MODE_API_POLLING": 1,
499 "RX_MODE_API_INTERRUPT": 2,
500 "RX_MODE_API_ADAPTIVE": 3,
501 "RX_MODE_API_DEFAULT": 4,
505 func (x RxMode) String() string {
506 s, ok := RxMode_name[uint32(x)]
510 return "RxMode(" + strconv.Itoa(int(x)) + ")"
513 // SubIfFlags defines enum 'sub_if_flags'.
514 type SubIfFlags uint32
517 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
518 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
519 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
520 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
521 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
522 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
523 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
524 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
525 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
526 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
530 SubIfFlags_name = map[uint32]string{
531 1: "SUB_IF_API_FLAG_NO_TAGS",
532 2: "SUB_IF_API_FLAG_ONE_TAG",
533 4: "SUB_IF_API_FLAG_TWO_TAGS",
534 8: "SUB_IF_API_FLAG_DOT1AD",
535 16: "SUB_IF_API_FLAG_EXACT_MATCH",
536 32: "SUB_IF_API_FLAG_DEFAULT",
537 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
538 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
539 254: "SUB_IF_API_FLAG_MASK_VNET",
540 256: "SUB_IF_API_FLAG_DOT1AH",
542 SubIfFlags_value = map[string]uint32{
543 "SUB_IF_API_FLAG_NO_TAGS": 1,
544 "SUB_IF_API_FLAG_ONE_TAG": 2,
545 "SUB_IF_API_FLAG_TWO_TAGS": 4,
546 "SUB_IF_API_FLAG_DOT1AD": 8,
547 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
548 "SUB_IF_API_FLAG_DEFAULT": 32,
549 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
550 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
551 "SUB_IF_API_FLAG_MASK_VNET": 254,
552 "SUB_IF_API_FLAG_DOT1AH": 256,
556 func (x SubIfFlags) String() string {
557 s, ok := SubIfFlags_name[uint32(x)]
561 str := func(n uint32) string {
562 s, ok := SubIfFlags_name[uint32(n)]
566 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
568 for i := uint32(0); i <= 32; i++ {
578 return str(uint32(x))
583 // AddressWithPrefix defines alias 'address_with_prefix'.
584 type AddressWithPrefix Prefix
586 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
587 prefix, err := ParsePrefix(s)
589 return AddressWithPrefix{}, err
591 return AddressWithPrefix(prefix), nil
594 func (x AddressWithPrefix) String() string {
595 return Prefix(x).String()
598 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
599 return []byte(x.String()), nil
602 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
603 prefix, err := ParseAddressWithPrefix(string(text))
611 // InterfaceIndex defines alias 'interface_index'.
612 type InterfaceIndex uint32
614 // IP4Address defines alias 'ip4_address'.
615 type IP4Address [4]uint8
617 func ParseIP4Address(s string) (IP4Address, error) {
618 ip := net.ParseIP(s).To4()
620 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
622 var ipaddr IP4Address
623 copy(ipaddr[:], ip.To4())
627 func (x IP4Address) ToIP() net.IP {
628 return net.IP(x[:]).To4()
631 func (x IP4Address) String() string {
632 return x.ToIP().String()
635 func (x *IP4Address) MarshalText() ([]byte, error) {
636 return []byte(x.String()), nil
639 func (x *IP4Address) UnmarshalText(text []byte) error {
640 ipaddr, err := ParseIP4Address(string(text))
648 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
649 type IP4AddressWithPrefix IP4Prefix
651 // IP6Address defines alias 'ip6_address'.
652 type IP6Address [16]uint8
654 func ParseIP6Address(s string) (IP6Address, error) {
655 ip := net.ParseIP(s).To16()
657 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
659 var ipaddr IP6Address
660 copy(ipaddr[:], ip.To16())
664 func (x IP6Address) ToIP() net.IP {
665 return net.IP(x[:]).To16()
668 func (x IP6Address) String() string {
669 return x.ToIP().String()
672 func (x *IP6Address) MarshalText() ([]byte, error) {
673 return []byte(x.String()), nil
676 func (x *IP6Address) UnmarshalText(text []byte) error {
677 ipaddr, err := ParseIP6Address(string(text))
685 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
686 type IP6AddressWithPrefix IP6Prefix
688 // MacAddress defines alias 'mac_address'.
689 type MacAddress [6]uint8
691 func ParseMacAddress(s string) (MacAddress, error) {
692 var macaddr MacAddress
693 mac, err := net.ParseMAC(s)
697 copy(macaddr[:], mac[:])
701 func (x MacAddress) ToMAC() net.HardwareAddr {
702 return net.HardwareAddr(x[:])
705 func (x MacAddress) String() string {
706 return x.ToMAC().String()
709 func (x *MacAddress) MarshalText() ([]byte, error) {
710 return []byte(x.String()), nil
713 func (x *MacAddress) UnmarshalText(text []byte) error {
714 mac, err := ParseMacAddress(string(text))
722 // Address defines type 'address'.
723 type Address struct {
724 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
725 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
728 func ParseAddress(s string) (Address, error) {
731 return Address{}, fmt.Errorf("invalid address: %s", s)
733 return AddressFromIP(ip), nil
736 func AddressFromIP(ip net.IP) Address {
739 addr.Af = ADDRESS_IP6
741 copy(ip6[:], ip.To16())
744 addr.Af = ADDRESS_IP4
746 copy(ip4[:], ip.To4())
752 func (x Address) ToIP() net.IP {
753 if x.Af == ADDRESS_IP6 {
755 return net.IP(ip6[:]).To16()
758 return net.IP(ip4[:]).To4()
762 func (x Address) String() string {
763 return x.ToIP().String()
766 func (x *Address) MarshalText() ([]byte, error) {
767 return []byte(x.String()), nil
770 func (x *Address) UnmarshalText(text []byte) error {
771 addr, err := ParseAddress(string(text))
779 // BdIPMac defines type 'bd_ip_mac'.
780 type BdIPMac struct {
781 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
782 IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
783 Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
786 // BridgeDomainSwIf defines type 'bridge_domain_sw_if'.
787 type BridgeDomainSwIf struct {
788 Context uint32 `binapi:"u32,name=context" json:"context,omitempty"`
789 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
790 Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"`
793 // IP4Prefix defines type 'ip4_prefix'.
794 type IP4Prefix struct {
795 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
796 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
799 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
800 hasPrefix := strings.Contains(s, "/")
802 ip, network, err := net.ParseCIDR(s)
804 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
806 maskSize, _ := network.Mask.Size()
807 prefix.Len = byte(maskSize)
808 prefix.Address, err = ParseIP4Address(ip.String())
810 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
814 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
816 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
818 prefix.Len = byte(defaultMaskSize)
819 prefix.Address, err = ParseIP4Address(ip.String())
821 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
827 func (x IP4Prefix) ToIPNet() *net.IPNet {
828 mask := net.CIDRMask(int(x.Len), 32)
829 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
833 func (x IP4Prefix) String() string {
834 ip := x.Address.String()
835 return ip + "/" + strconv.Itoa(int(x.Len))
838 func (x *IP4Prefix) MarshalText() ([]byte, error) {
839 return []byte(x.String()), nil
842 func (x *IP4Prefix) UnmarshalText(text []byte) error {
843 prefix, err := ParseIP4Prefix(string(text))
851 // IP6Prefix defines type 'ip6_prefix'.
852 type IP6Prefix struct {
853 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
854 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
857 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
858 hasPrefix := strings.Contains(s, "/")
860 ip, network, err := net.ParseCIDR(s)
862 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
864 maskSize, _ := network.Mask.Size()
865 prefix.Len = byte(maskSize)
866 prefix.Address, err = ParseIP6Address(ip.String())
868 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
872 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
874 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
876 prefix.Len = byte(defaultMaskSize)
877 prefix.Address, err = ParseIP6Address(ip.String())
879 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
885 func (x IP6Prefix) ToIPNet() *net.IPNet {
886 mask := net.CIDRMask(int(x.Len), 128)
887 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
891 func (x IP6Prefix) String() string {
892 ip := x.Address.String()
893 return ip + "/" + strconv.Itoa(int(x.Len))
896 func (x *IP6Prefix) MarshalText() ([]byte, error) {
897 return []byte(x.String()), nil
900 func (x *IP6Prefix) UnmarshalText(text []byte) error {
901 prefix, err := ParseIP6Prefix(string(text))
909 // MacEntry defines type 'mac_entry'.
910 type MacEntry struct {
911 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
912 MacAddr []byte `binapi:"u8[6],name=mac_addr" json:"mac_addr,omitempty"`
913 Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
914 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
917 // Mprefix defines type 'mprefix'.
918 type Mprefix struct {
919 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
920 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
921 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
922 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
925 // Prefix defines type 'prefix'.
927 Address Address `binapi:"address,name=address" json:"address,omitempty"`
928 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
931 func ParsePrefix(ip string) (prefix Prefix, err error) {
932 hasPrefix := strings.Contains(ip, "/")
934 netIP, network, err := net.ParseCIDR(ip)
936 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
938 maskSize, _ := network.Mask.Size()
939 prefix.Len = byte(maskSize)
940 prefix.Address, err = ParseAddress(netIP.String())
942 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
945 netIP := net.ParseIP(ip)
946 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
947 if netIP.To4() == nil {
948 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
950 prefix.Len = byte(defaultMaskSize)
951 prefix.Address, err = ParseAddress(netIP.String())
953 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
959 func (x Prefix) ToIPNet() *net.IPNet {
961 if x.Address.Af == ADDRESS_IP4 {
962 mask = net.CIDRMask(int(x.Len), 32)
964 mask = net.CIDRMask(int(x.Len), 128)
966 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
970 func (x Prefix) String() string {
971 ip := x.Address.String()
972 return ip + "/" + strconv.Itoa(int(x.Len))
975 func (x *Prefix) MarshalText() ([]byte, error) {
976 return []byte(x.String()), nil
979 func (x *Prefix) UnmarshalText(text []byte) error {
980 prefix, err := ParsePrefix(string(text))
988 // PrefixMatcher defines type 'prefix_matcher'.
989 type PrefixMatcher struct {
990 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
991 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
994 // AddressUnion defines union 'address_union'.
995 type AddressUnion struct {
996 // AddressUnion can be one of:
999 XXX_UnionData [16]byte
1002 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
1006 func (u *AddressUnion) SetIP4(a IP4Address) {
1007 buf := codec.NewBuffer(u.XXX_UnionData[:])
1008 buf.EncodeBytes(a[:], 4)
1010 func (u *AddressUnion) GetIP4() (a IP4Address) {
1011 buf := codec.NewBuffer(u.XXX_UnionData[:])
1012 copy(a[:], buf.DecodeBytes(4))
1016 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
1020 func (u *AddressUnion) SetIP6(a IP6Address) {
1021 buf := codec.NewBuffer(u.XXX_UnionData[:])
1022 buf.EncodeBytes(a[:], 16)
1024 func (u *AddressUnion) GetIP6() (a IP6Address) {
1025 buf := codec.NewBuffer(u.XXX_UnionData[:])
1026 copy(a[:], buf.DecodeBytes(16))
1030 // BdIPMacAddDel defines message 'bd_ip_mac_add_del'.
1031 type BdIPMacAddDel struct {
1032 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1033 Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
1036 func (m *BdIPMacAddDel) Reset() { *m = BdIPMacAddDel{} }
1037 func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" }
1038 func (*BdIPMacAddDel) GetCrcString() string { return "25bf4063" }
1039 func (*BdIPMacAddDel) GetMessageType() api.MessageType {
1040 return api.RequestMessage
1043 func (m *BdIPMacAddDel) Size() (size int) {
1047 size += 1 // m.IsAdd
1048 size += 4 // m.Entry.BdID
1049 size += 4 // m.Entry.IP.Af
1050 size += 1 * 16 // m.Entry.IP.Un
1051 size += 1 * 6 // m.Entry.Mac
1054 func (m *BdIPMacAddDel) Marshal(b []byte) ([]byte, error) {
1056 b = make([]byte, m.Size())
1058 buf := codec.NewBuffer(b)
1059 buf.EncodeUint8(m.IsAdd)
1060 buf.EncodeUint32(m.Entry.BdID)
1061 buf.EncodeUint32(uint32(m.Entry.IP.Af))
1062 buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
1063 buf.EncodeBytes(m.Entry.Mac[:], 6)
1064 return buf.Bytes(), nil
1066 func (m *BdIPMacAddDel) Unmarshal(b []byte) error {
1067 buf := codec.NewBuffer(b)
1068 m.IsAdd = buf.DecodeUint8()
1069 m.Entry.BdID = buf.DecodeUint32()
1070 m.Entry.IP.Af = AddressFamily(buf.DecodeUint32())
1071 copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1072 copy(m.Entry.Mac[:], buf.DecodeBytes(6))
1076 // BdIPMacAddDelReply defines message 'bd_ip_mac_add_del_reply'.
1077 type BdIPMacAddDelReply struct {
1078 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1081 func (m *BdIPMacAddDelReply) Reset() { *m = BdIPMacAddDelReply{} }
1082 func (*BdIPMacAddDelReply) GetMessageName() string { return "bd_ip_mac_add_del_reply" }
1083 func (*BdIPMacAddDelReply) GetCrcString() string { return "e8d4e804" }
1084 func (*BdIPMacAddDelReply) GetMessageType() api.MessageType {
1085 return api.ReplyMessage
1088 func (m *BdIPMacAddDelReply) Size() (size int) {
1092 size += 4 // m.Retval
1095 func (m *BdIPMacAddDelReply) Marshal(b []byte) ([]byte, error) {
1097 b = make([]byte, m.Size())
1099 buf := codec.NewBuffer(b)
1100 buf.EncodeInt32(m.Retval)
1101 return buf.Bytes(), nil
1103 func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error {
1104 buf := codec.NewBuffer(b)
1105 m.Retval = buf.DecodeInt32()
1109 // BdIPMacDetails defines message 'bd_ip_mac_details'.
1110 type BdIPMacDetails struct {
1111 Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
1114 func (m *BdIPMacDetails) Reset() { *m = BdIPMacDetails{} }
1115 func (*BdIPMacDetails) GetMessageName() string { return "bd_ip_mac_details" }
1116 func (*BdIPMacDetails) GetCrcString() string { return "a52f8044" }
1117 func (*BdIPMacDetails) GetMessageType() api.MessageType {
1118 return api.ReplyMessage
1121 func (m *BdIPMacDetails) Size() (size int) {
1125 size += 4 // m.Entry.BdID
1126 size += 4 // m.Entry.IP.Af
1127 size += 1 * 16 // m.Entry.IP.Un
1128 size += 1 * 6 // m.Entry.Mac
1131 func (m *BdIPMacDetails) Marshal(b []byte) ([]byte, error) {
1133 b = make([]byte, m.Size())
1135 buf := codec.NewBuffer(b)
1136 buf.EncodeUint32(m.Entry.BdID)
1137 buf.EncodeUint32(uint32(m.Entry.IP.Af))
1138 buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
1139 buf.EncodeBytes(m.Entry.Mac[:], 6)
1140 return buf.Bytes(), nil
1142 func (m *BdIPMacDetails) Unmarshal(b []byte) error {
1143 buf := codec.NewBuffer(b)
1144 m.Entry.BdID = buf.DecodeUint32()
1145 m.Entry.IP.Af = AddressFamily(buf.DecodeUint32())
1146 copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1147 copy(m.Entry.Mac[:], buf.DecodeBytes(6))
1151 // BdIPMacDump defines message 'bd_ip_mac_dump'.
1152 type BdIPMacDump struct {
1153 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1156 func (m *BdIPMacDump) Reset() { *m = BdIPMacDump{} }
1157 func (*BdIPMacDump) GetMessageName() string { return "bd_ip_mac_dump" }
1158 func (*BdIPMacDump) GetCrcString() string { return "c25fdce6" }
1159 func (*BdIPMacDump) GetMessageType() api.MessageType {
1160 return api.RequestMessage
1163 func (m *BdIPMacDump) Size() (size int) {
1170 func (m *BdIPMacDump) Marshal(b []byte) ([]byte, error) {
1172 b = make([]byte, m.Size())
1174 buf := codec.NewBuffer(b)
1175 buf.EncodeUint32(m.BdID)
1176 return buf.Bytes(), nil
1178 func (m *BdIPMacDump) Unmarshal(b []byte) error {
1179 buf := codec.NewBuffer(b)
1180 m.BdID = buf.DecodeUint32()
1184 // BdIPMacFlush defines message 'bd_ip_mac_flush'.
1185 type BdIPMacFlush struct {
1186 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1189 func (m *BdIPMacFlush) Reset() { *m = BdIPMacFlush{} }
1190 func (*BdIPMacFlush) GetMessageName() string { return "bd_ip_mac_flush" }
1191 func (*BdIPMacFlush) GetCrcString() string { return "c25fdce6" }
1192 func (*BdIPMacFlush) GetMessageType() api.MessageType {
1193 return api.RequestMessage
1196 func (m *BdIPMacFlush) Size() (size int) {
1203 func (m *BdIPMacFlush) Marshal(b []byte) ([]byte, error) {
1205 b = make([]byte, m.Size())
1207 buf := codec.NewBuffer(b)
1208 buf.EncodeUint32(m.BdID)
1209 return buf.Bytes(), nil
1211 func (m *BdIPMacFlush) Unmarshal(b []byte) error {
1212 buf := codec.NewBuffer(b)
1213 m.BdID = buf.DecodeUint32()
1217 // BdIPMacFlushReply defines message 'bd_ip_mac_flush_reply'.
1218 type BdIPMacFlushReply struct {
1219 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1222 func (m *BdIPMacFlushReply) Reset() { *m = BdIPMacFlushReply{} }
1223 func (*BdIPMacFlushReply) GetMessageName() string { return "bd_ip_mac_flush_reply" }
1224 func (*BdIPMacFlushReply) GetCrcString() string { return "e8d4e804" }
1225 func (*BdIPMacFlushReply) GetMessageType() api.MessageType {
1226 return api.ReplyMessage
1229 func (m *BdIPMacFlushReply) Size() (size int) {
1233 size += 4 // m.Retval
1236 func (m *BdIPMacFlushReply) Marshal(b []byte) ([]byte, error) {
1238 b = make([]byte, m.Size())
1240 buf := codec.NewBuffer(b)
1241 buf.EncodeInt32(m.Retval)
1242 return buf.Bytes(), nil
1244 func (m *BdIPMacFlushReply) Unmarshal(b []byte) error {
1245 buf := codec.NewBuffer(b)
1246 m.Retval = buf.DecodeInt32()
1250 // BridgeDomainAddDel defines message 'bridge_domain_add_del'.
1251 type BridgeDomainAddDel struct {
1252 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1253 Flood uint8 `binapi:"u8,name=flood" json:"flood,omitempty"`
1254 UuFlood uint8 `binapi:"u8,name=uu_flood" json:"uu_flood,omitempty"`
1255 Forward uint8 `binapi:"u8,name=forward" json:"forward,omitempty"`
1256 Learn uint8 `binapi:"u8,name=learn" json:"learn,omitempty"`
1257 ArpTerm uint8 `binapi:"u8,name=arp_term" json:"arp_term,omitempty"`
1258 ArpUfwd uint8 `binapi:"u8,name=arp_ufwd" json:"arp_ufwd,omitempty"`
1259 MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
1260 BdTag []byte `binapi:"u8[64],name=bd_tag" json:"bd_tag,omitempty"`
1261 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1264 func (m *BridgeDomainAddDel) Reset() { *m = BridgeDomainAddDel{} }
1265 func (*BridgeDomainAddDel) GetMessageName() string { return "bridge_domain_add_del" }
1266 func (*BridgeDomainAddDel) GetCrcString() string { return "c6360720" }
1267 func (*BridgeDomainAddDel) GetMessageType() api.MessageType {
1268 return api.RequestMessage
1271 func (m *BridgeDomainAddDel) Size() (size int) {
1276 size += 1 // m.Flood
1277 size += 1 // m.UuFlood
1278 size += 1 // m.Forward
1279 size += 1 // m.Learn
1280 size += 1 // m.ArpTerm
1281 size += 1 // m.ArpUfwd
1282 size += 1 // m.MacAge
1283 size += 1 * 64 // m.BdTag
1284 size += 1 // m.IsAdd
1287 func (m *BridgeDomainAddDel) Marshal(b []byte) ([]byte, error) {
1289 b = make([]byte, m.Size())
1291 buf := codec.NewBuffer(b)
1292 buf.EncodeUint32(m.BdID)
1293 buf.EncodeUint8(m.Flood)
1294 buf.EncodeUint8(m.UuFlood)
1295 buf.EncodeUint8(m.Forward)
1296 buf.EncodeUint8(m.Learn)
1297 buf.EncodeUint8(m.ArpTerm)
1298 buf.EncodeUint8(m.ArpUfwd)
1299 buf.EncodeUint8(m.MacAge)
1300 buf.EncodeBytes(m.BdTag, 64)
1301 buf.EncodeUint8(m.IsAdd)
1302 return buf.Bytes(), nil
1304 func (m *BridgeDomainAddDel) Unmarshal(b []byte) error {
1305 buf := codec.NewBuffer(b)
1306 m.BdID = buf.DecodeUint32()
1307 m.Flood = buf.DecodeUint8()
1308 m.UuFlood = buf.DecodeUint8()
1309 m.Forward = buf.DecodeUint8()
1310 m.Learn = buf.DecodeUint8()
1311 m.ArpTerm = buf.DecodeUint8()
1312 m.ArpUfwd = buf.DecodeUint8()
1313 m.MacAge = buf.DecodeUint8()
1314 m.BdTag = make([]byte, 64)
1315 copy(m.BdTag, buf.DecodeBytes(len(m.BdTag)))
1316 m.IsAdd = buf.DecodeUint8()
1320 // BridgeDomainAddDelReply defines message 'bridge_domain_add_del_reply'.
1321 type BridgeDomainAddDelReply struct {
1322 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1325 func (m *BridgeDomainAddDelReply) Reset() { *m = BridgeDomainAddDelReply{} }
1326 func (*BridgeDomainAddDelReply) GetMessageName() string { return "bridge_domain_add_del_reply" }
1327 func (*BridgeDomainAddDelReply) GetCrcString() string { return "e8d4e804" }
1328 func (*BridgeDomainAddDelReply) GetMessageType() api.MessageType {
1329 return api.ReplyMessage
1332 func (m *BridgeDomainAddDelReply) Size() (size int) {
1336 size += 4 // m.Retval
1339 func (m *BridgeDomainAddDelReply) Marshal(b []byte) ([]byte, error) {
1341 b = make([]byte, m.Size())
1343 buf := codec.NewBuffer(b)
1344 buf.EncodeInt32(m.Retval)
1345 return buf.Bytes(), nil
1347 func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error {
1348 buf := codec.NewBuffer(b)
1349 m.Retval = buf.DecodeInt32()
1353 // BridgeDomainDetails defines message 'bridge_domain_details'.
1354 type BridgeDomainDetails struct {
1355 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1356 Flood uint8 `binapi:"u8,name=flood" json:"flood,omitempty"`
1357 UuFlood uint8 `binapi:"u8,name=uu_flood" json:"uu_flood,omitempty"`
1358 Forward uint8 `binapi:"u8,name=forward" json:"forward,omitempty"`
1359 Learn uint8 `binapi:"u8,name=learn" json:"learn,omitempty"`
1360 ArpTerm uint8 `binapi:"u8,name=arp_term" json:"arp_term,omitempty"`
1361 ArpUfwd uint8 `binapi:"u8,name=arp_ufwd" json:"arp_ufwd,omitempty"`
1362 MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
1363 BdTag []byte `binapi:"u8[64],name=bd_tag" json:"bd_tag,omitempty"`
1364 BviSwIfIndex uint32 `binapi:"u32,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
1365 UuFwdSwIfIndex uint32 `binapi:"u32,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
1366 NSwIfs uint32 `binapi:"u32,name=n_sw_ifs" json:"-"`
1367 SwIfDetails []BridgeDomainSwIf `binapi:"bridge_domain_sw_if[n_sw_ifs],name=sw_if_details" json:"sw_if_details,omitempty"`
1370 func (m *BridgeDomainDetails) Reset() { *m = BridgeDomainDetails{} }
1371 func (*BridgeDomainDetails) GetMessageName() string { return "bridge_domain_details" }
1372 func (*BridgeDomainDetails) GetCrcString() string { return "748c854a" }
1373 func (*BridgeDomainDetails) GetMessageType() api.MessageType {
1374 return api.ReplyMessage
1377 func (m *BridgeDomainDetails) Size() (size int) {
1382 size += 1 // m.Flood
1383 size += 1 // m.UuFlood
1384 size += 1 // m.Forward
1385 size += 1 // m.Learn
1386 size += 1 // m.ArpTerm
1387 size += 1 // m.ArpUfwd
1388 size += 1 // m.MacAge
1389 size += 1 * 64 // m.BdTag
1390 size += 4 // m.BviSwIfIndex
1391 size += 4 // m.UuFwdSwIfIndex
1392 size += 4 // m.NSwIfs
1393 for j1 := 0; j1 < len(m.SwIfDetails); j1++ {
1394 var s1 BridgeDomainSwIf
1396 if j1 < len(m.SwIfDetails) {
1397 s1 = m.SwIfDetails[j1]
1399 size += 4 // s1.Context
1400 size += 4 // s1.SwIfIndex
1405 func (m *BridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
1407 b = make([]byte, m.Size())
1409 buf := codec.NewBuffer(b)
1410 buf.EncodeUint32(m.BdID)
1411 buf.EncodeUint8(m.Flood)
1412 buf.EncodeUint8(m.UuFlood)
1413 buf.EncodeUint8(m.Forward)
1414 buf.EncodeUint8(m.Learn)
1415 buf.EncodeUint8(m.ArpTerm)
1416 buf.EncodeUint8(m.ArpUfwd)
1417 buf.EncodeUint8(m.MacAge)
1418 buf.EncodeBytes(m.BdTag, 64)
1419 buf.EncodeUint32(m.BviSwIfIndex)
1420 buf.EncodeUint32(m.UuFwdSwIfIndex)
1421 buf.EncodeUint32(uint32(len(m.SwIfDetails)))
1422 for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
1423 var v0 BridgeDomainSwIf // SwIfDetails
1424 if j0 < len(m.SwIfDetails) {
1425 v0 = m.SwIfDetails[j0]
1427 buf.EncodeUint32(v0.Context)
1428 buf.EncodeUint32(v0.SwIfIndex)
1429 buf.EncodeUint8(v0.Shg)
1431 return buf.Bytes(), nil
1433 func (m *BridgeDomainDetails) Unmarshal(b []byte) error {
1434 buf := codec.NewBuffer(b)
1435 m.BdID = buf.DecodeUint32()
1436 m.Flood = buf.DecodeUint8()
1437 m.UuFlood = buf.DecodeUint8()
1438 m.Forward = buf.DecodeUint8()
1439 m.Learn = buf.DecodeUint8()
1440 m.ArpTerm = buf.DecodeUint8()
1441 m.ArpUfwd = buf.DecodeUint8()
1442 m.MacAge = buf.DecodeUint8()
1443 m.BdTag = make([]byte, 64)
1444 copy(m.BdTag, buf.DecodeBytes(len(m.BdTag)))
1445 m.BviSwIfIndex = buf.DecodeUint32()
1446 m.UuFwdSwIfIndex = buf.DecodeUint32()
1447 m.NSwIfs = buf.DecodeUint32()
1448 m.SwIfDetails = make([]BridgeDomainSwIf, m.NSwIfs)
1449 for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
1450 m.SwIfDetails[j0].Context = buf.DecodeUint32()
1451 m.SwIfDetails[j0].SwIfIndex = buf.DecodeUint32()
1452 m.SwIfDetails[j0].Shg = buf.DecodeUint8()
1457 // BridgeDomainDump defines message 'bridge_domain_dump'.
1458 type BridgeDomainDump struct {
1459 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1462 func (m *BridgeDomainDump) Reset() { *m = BridgeDomainDump{} }
1463 func (*BridgeDomainDump) GetMessageName() string { return "bridge_domain_dump" }
1464 func (*BridgeDomainDump) GetCrcString() string { return "c25fdce6" }
1465 func (*BridgeDomainDump) GetMessageType() api.MessageType {
1466 return api.RequestMessage
1469 func (m *BridgeDomainDump) Size() (size int) {
1476 func (m *BridgeDomainDump) Marshal(b []byte) ([]byte, error) {
1478 b = make([]byte, m.Size())
1480 buf := codec.NewBuffer(b)
1481 buf.EncodeUint32(m.BdID)
1482 return buf.Bytes(), nil
1484 func (m *BridgeDomainDump) Unmarshal(b []byte) error {
1485 buf := codec.NewBuffer(b)
1486 m.BdID = buf.DecodeUint32()
1490 // BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'.
1491 type BridgeDomainSetMacAge struct {
1492 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1493 MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
1496 func (m *BridgeDomainSetMacAge) Reset() { *m = BridgeDomainSetMacAge{} }
1497 func (*BridgeDomainSetMacAge) GetMessageName() string { return "bridge_domain_set_mac_age" }
1498 func (*BridgeDomainSetMacAge) GetCrcString() string { return "b537ad7b" }
1499 func (*BridgeDomainSetMacAge) GetMessageType() api.MessageType {
1500 return api.RequestMessage
1503 func (m *BridgeDomainSetMacAge) Size() (size int) {
1508 size += 1 // m.MacAge
1511 func (m *BridgeDomainSetMacAge) Marshal(b []byte) ([]byte, error) {
1513 b = make([]byte, m.Size())
1515 buf := codec.NewBuffer(b)
1516 buf.EncodeUint32(m.BdID)
1517 buf.EncodeUint8(m.MacAge)
1518 return buf.Bytes(), nil
1520 func (m *BridgeDomainSetMacAge) Unmarshal(b []byte) error {
1521 buf := codec.NewBuffer(b)
1522 m.BdID = buf.DecodeUint32()
1523 m.MacAge = buf.DecodeUint8()
1527 // BridgeDomainSetMacAgeReply defines message 'bridge_domain_set_mac_age_reply'.
1528 type BridgeDomainSetMacAgeReply struct {
1529 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1532 func (m *BridgeDomainSetMacAgeReply) Reset() { *m = BridgeDomainSetMacAgeReply{} }
1533 func (*BridgeDomainSetMacAgeReply) GetMessageName() string { return "bridge_domain_set_mac_age_reply" }
1534 func (*BridgeDomainSetMacAgeReply) GetCrcString() string { return "e8d4e804" }
1535 func (*BridgeDomainSetMacAgeReply) GetMessageType() api.MessageType {
1536 return api.ReplyMessage
1539 func (m *BridgeDomainSetMacAgeReply) Size() (size int) {
1543 size += 4 // m.Retval
1546 func (m *BridgeDomainSetMacAgeReply) Marshal(b []byte) ([]byte, error) {
1548 b = make([]byte, m.Size())
1550 buf := codec.NewBuffer(b)
1551 buf.EncodeInt32(m.Retval)
1552 return buf.Bytes(), nil
1554 func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error {
1555 buf := codec.NewBuffer(b)
1556 m.Retval = buf.DecodeInt32()
1560 // BridgeFlags defines message 'bridge_flags'.
1561 type BridgeFlags struct {
1562 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1563 IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
1564 Flags BdFlags `binapi:"bd_flags,name=flags" json:"flags,omitempty"`
1567 func (m *BridgeFlags) Reset() { *m = BridgeFlags{} }
1568 func (*BridgeFlags) GetMessageName() string { return "bridge_flags" }
1569 func (*BridgeFlags) GetCrcString() string { return "2eb9b76c" }
1570 func (*BridgeFlags) GetMessageType() api.MessageType {
1571 return api.RequestMessage
1574 func (m *BridgeFlags) Size() (size int) {
1579 size += 1 // m.IsSet
1580 size += 4 // m.Flags
1583 func (m *BridgeFlags) Marshal(b []byte) ([]byte, error) {
1585 b = make([]byte, m.Size())
1587 buf := codec.NewBuffer(b)
1588 buf.EncodeUint32(m.BdID)
1589 buf.EncodeUint8(m.IsSet)
1590 buf.EncodeUint32(uint32(m.Flags))
1591 return buf.Bytes(), nil
1593 func (m *BridgeFlags) Unmarshal(b []byte) error {
1594 buf := codec.NewBuffer(b)
1595 m.BdID = buf.DecodeUint32()
1596 m.IsSet = buf.DecodeUint8()
1597 m.Flags = BdFlags(buf.DecodeUint32())
1601 // BridgeFlagsReply defines message 'bridge_flags_reply'.
1602 type BridgeFlagsReply struct {
1603 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1604 ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
1607 func (m *BridgeFlagsReply) Reset() { *m = BridgeFlagsReply{} }
1608 func (*BridgeFlagsReply) GetMessageName() string { return "bridge_flags_reply" }
1609 func (*BridgeFlagsReply) GetCrcString() string { return "29b2a2b3" }
1610 func (*BridgeFlagsReply) GetMessageType() api.MessageType {
1611 return api.ReplyMessage
1614 func (m *BridgeFlagsReply) Size() (size int) {
1618 size += 4 // m.Retval
1619 size += 4 // m.ResultingFeatureBitmap
1622 func (m *BridgeFlagsReply) Marshal(b []byte) ([]byte, error) {
1624 b = make([]byte, m.Size())
1626 buf := codec.NewBuffer(b)
1627 buf.EncodeInt32(m.Retval)
1628 buf.EncodeUint32(m.ResultingFeatureBitmap)
1629 return buf.Bytes(), nil
1631 func (m *BridgeFlagsReply) Unmarshal(b []byte) error {
1632 buf := codec.NewBuffer(b)
1633 m.Retval = buf.DecodeInt32()
1634 m.ResultingFeatureBitmap = buf.DecodeUint32()
1638 // BviCreate defines message 'bvi_create'.
1639 type BviCreate struct {
1640 Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1641 UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
1644 func (m *BviCreate) Reset() { *m = BviCreate{} }
1645 func (*BviCreate) GetMessageName() string { return "bvi_create" }
1646 func (*BviCreate) GetCrcString() string { return "f5398559" }
1647 func (*BviCreate) GetMessageType() api.MessageType {
1648 return api.RequestMessage
1651 func (m *BviCreate) Size() (size int) {
1655 size += 1 * 6 // m.Mac
1656 size += 4 // m.UserInstance
1659 func (m *BviCreate) Marshal(b []byte) ([]byte, error) {
1661 b = make([]byte, m.Size())
1663 buf := codec.NewBuffer(b)
1664 buf.EncodeBytes(m.Mac[:], 6)
1665 buf.EncodeUint32(m.UserInstance)
1666 return buf.Bytes(), nil
1668 func (m *BviCreate) Unmarshal(b []byte) error {
1669 buf := codec.NewBuffer(b)
1670 copy(m.Mac[:], buf.DecodeBytes(6))
1671 m.UserInstance = buf.DecodeUint32()
1675 // BviCreateReply defines message 'bvi_create_reply'.
1676 type BviCreateReply struct {
1677 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1678 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1681 func (m *BviCreateReply) Reset() { *m = BviCreateReply{} }
1682 func (*BviCreateReply) GetMessageName() string { return "bvi_create_reply" }
1683 func (*BviCreateReply) GetCrcString() string { return "fda5941f" }
1684 func (*BviCreateReply) GetMessageType() api.MessageType {
1685 return api.ReplyMessage
1688 func (m *BviCreateReply) Size() (size int) {
1692 size += 4 // m.Retval
1693 size += 4 // m.SwIfIndex
1696 func (m *BviCreateReply) Marshal(b []byte) ([]byte, error) {
1698 b = make([]byte, m.Size())
1700 buf := codec.NewBuffer(b)
1701 buf.EncodeInt32(m.Retval)
1702 buf.EncodeUint32(m.SwIfIndex)
1703 return buf.Bytes(), nil
1705 func (m *BviCreateReply) Unmarshal(b []byte) error {
1706 buf := codec.NewBuffer(b)
1707 m.Retval = buf.DecodeInt32()
1708 m.SwIfIndex = buf.DecodeUint32()
1712 // BviDelete defines message 'bvi_delete'.
1713 type BviDelete struct {
1714 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1717 func (m *BviDelete) Reset() { *m = BviDelete{} }
1718 func (*BviDelete) GetMessageName() string { return "bvi_delete" }
1719 func (*BviDelete) GetCrcString() string { return "529cb13f" }
1720 func (*BviDelete) GetMessageType() api.MessageType {
1721 return api.RequestMessage
1724 func (m *BviDelete) Size() (size int) {
1728 size += 4 // m.SwIfIndex
1731 func (m *BviDelete) Marshal(b []byte) ([]byte, error) {
1733 b = make([]byte, m.Size())
1735 buf := codec.NewBuffer(b)
1736 buf.EncodeUint32(m.SwIfIndex)
1737 return buf.Bytes(), nil
1739 func (m *BviDelete) Unmarshal(b []byte) error {
1740 buf := codec.NewBuffer(b)
1741 m.SwIfIndex = buf.DecodeUint32()
1745 // BviDeleteReply defines message 'bvi_delete_reply'.
1746 type BviDeleteReply struct {
1747 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1750 func (m *BviDeleteReply) Reset() { *m = BviDeleteReply{} }
1751 func (*BviDeleteReply) GetMessageName() string { return "bvi_delete_reply" }
1752 func (*BviDeleteReply) GetCrcString() string { return "e8d4e804" }
1753 func (*BviDeleteReply) GetMessageType() api.MessageType {
1754 return api.ReplyMessage
1757 func (m *BviDeleteReply) Size() (size int) {
1761 size += 4 // m.Retval
1764 func (m *BviDeleteReply) Marshal(b []byte) ([]byte, error) {
1766 b = make([]byte, m.Size())
1768 buf := codec.NewBuffer(b)
1769 buf.EncodeInt32(m.Retval)
1770 return buf.Bytes(), nil
1772 func (m *BviDeleteReply) Unmarshal(b []byte) error {
1773 buf := codec.NewBuffer(b)
1774 m.Retval = buf.DecodeInt32()
1778 // L2ArpTermEvent defines message 'l2_arp_term_event'.
1779 type L2ArpTermEvent struct {
1780 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1781 IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
1782 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1783 Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1786 func (m *L2ArpTermEvent) Reset() { *m = L2ArpTermEvent{} }
1787 func (*L2ArpTermEvent) GetMessageName() string { return "l2_arp_term_event" }
1788 func (*L2ArpTermEvent) GetCrcString() string { return "85ff71ea" }
1789 func (*L2ArpTermEvent) GetMessageType() api.MessageType {
1790 return api.EventMessage
1793 func (m *L2ArpTermEvent) Size() (size int) {
1798 size += 4 // m.IP.Af
1799 size += 1 * 16 // m.IP.Un
1800 size += 4 // m.SwIfIndex
1801 size += 1 * 6 // m.Mac
1804 func (m *L2ArpTermEvent) Marshal(b []byte) ([]byte, error) {
1806 b = make([]byte, m.Size())
1808 buf := codec.NewBuffer(b)
1809 buf.EncodeUint32(m.PID)
1810 buf.EncodeUint32(uint32(m.IP.Af))
1811 buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
1812 buf.EncodeUint32(uint32(m.SwIfIndex))
1813 buf.EncodeBytes(m.Mac[:], 6)
1814 return buf.Bytes(), nil
1816 func (m *L2ArpTermEvent) Unmarshal(b []byte) error {
1817 buf := codec.NewBuffer(b)
1818 m.PID = buf.DecodeUint32()
1819 m.IP.Af = AddressFamily(buf.DecodeUint32())
1820 copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1821 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1822 copy(m.Mac[:], buf.DecodeBytes(6))
1826 // L2FibClearTable defines message 'l2_fib_clear_table'.
1827 type L2FibClearTable struct{}
1829 func (m *L2FibClearTable) Reset() { *m = L2FibClearTable{} }
1830 func (*L2FibClearTable) GetMessageName() string { return "l2_fib_clear_table" }
1831 func (*L2FibClearTable) GetCrcString() string { return "51077d14" }
1832 func (*L2FibClearTable) GetMessageType() api.MessageType {
1833 return api.RequestMessage
1836 func (m *L2FibClearTable) Size() (size int) {
1842 func (m *L2FibClearTable) Marshal(b []byte) ([]byte, error) {
1844 b = make([]byte, m.Size())
1846 buf := codec.NewBuffer(b)
1847 return buf.Bytes(), nil
1849 func (m *L2FibClearTable) Unmarshal(b []byte) error {
1853 // L2FibClearTableReply defines message 'l2_fib_clear_table_reply'.
1854 type L2FibClearTableReply struct {
1855 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1858 func (m *L2FibClearTableReply) Reset() { *m = L2FibClearTableReply{} }
1859 func (*L2FibClearTableReply) GetMessageName() string { return "l2_fib_clear_table_reply" }
1860 func (*L2FibClearTableReply) GetCrcString() string { return "e8d4e804" }
1861 func (*L2FibClearTableReply) GetMessageType() api.MessageType {
1862 return api.ReplyMessage
1865 func (m *L2FibClearTableReply) Size() (size int) {
1869 size += 4 // m.Retval
1872 func (m *L2FibClearTableReply) Marshal(b []byte) ([]byte, error) {
1874 b = make([]byte, m.Size())
1876 buf := codec.NewBuffer(b)
1877 buf.EncodeInt32(m.Retval)
1878 return buf.Bytes(), nil
1880 func (m *L2FibClearTableReply) Unmarshal(b []byte) error {
1881 buf := codec.NewBuffer(b)
1882 m.Retval = buf.DecodeInt32()
1886 // L2FibTableDetails defines message 'l2_fib_table_details'.
1887 type L2FibTableDetails struct {
1888 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1889 Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
1890 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1891 StaticMac uint8 `binapi:"u8,name=static_mac" json:"static_mac,omitempty"`
1892 FilterMac uint8 `binapi:"u8,name=filter_mac" json:"filter_mac,omitempty"`
1893 BviMac uint8 `binapi:"u8,name=bvi_mac" json:"bvi_mac,omitempty"`
1896 func (m *L2FibTableDetails) Reset() { *m = L2FibTableDetails{} }
1897 func (*L2FibTableDetails) GetMessageName() string { return "l2_fib_table_details" }
1898 func (*L2FibTableDetails) GetCrcString() string { return "c7392706" }
1899 func (*L2FibTableDetails) GetMessageType() api.MessageType {
1900 return api.ReplyMessage
1903 func (m *L2FibTableDetails) Size() (size int) {
1908 size += 1 * 6 // m.Mac
1909 size += 4 // m.SwIfIndex
1910 size += 1 // m.StaticMac
1911 size += 1 // m.FilterMac
1912 size += 1 // m.BviMac
1915 func (m *L2FibTableDetails) Marshal(b []byte) ([]byte, error) {
1917 b = make([]byte, m.Size())
1919 buf := codec.NewBuffer(b)
1920 buf.EncodeUint32(m.BdID)
1921 buf.EncodeBytes(m.Mac, 6)
1922 buf.EncodeUint32(m.SwIfIndex)
1923 buf.EncodeUint8(m.StaticMac)
1924 buf.EncodeUint8(m.FilterMac)
1925 buf.EncodeUint8(m.BviMac)
1926 return buf.Bytes(), nil
1928 func (m *L2FibTableDetails) Unmarshal(b []byte) error {
1929 buf := codec.NewBuffer(b)
1930 m.BdID = buf.DecodeUint32()
1931 m.Mac = make([]byte, 6)
1932 copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
1933 m.SwIfIndex = buf.DecodeUint32()
1934 m.StaticMac = buf.DecodeUint8()
1935 m.FilterMac = buf.DecodeUint8()
1936 m.BviMac = buf.DecodeUint8()
1940 // L2FibTableDump defines message 'l2_fib_table_dump'.
1941 type L2FibTableDump struct {
1942 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1945 func (m *L2FibTableDump) Reset() { *m = L2FibTableDump{} }
1946 func (*L2FibTableDump) GetMessageName() string { return "l2_fib_table_dump" }
1947 func (*L2FibTableDump) GetCrcString() string { return "c25fdce6" }
1948 func (*L2FibTableDump) GetMessageType() api.MessageType {
1949 return api.RequestMessage
1952 func (m *L2FibTableDump) Size() (size int) {
1959 func (m *L2FibTableDump) Marshal(b []byte) ([]byte, error) {
1961 b = make([]byte, m.Size())
1963 buf := codec.NewBuffer(b)
1964 buf.EncodeUint32(m.BdID)
1965 return buf.Bytes(), nil
1967 func (m *L2FibTableDump) Unmarshal(b []byte) error {
1968 buf := codec.NewBuffer(b)
1969 m.BdID = buf.DecodeUint32()
1973 // L2Flags defines message 'l2_flags'.
1974 type L2Flags struct {
1975 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1976 IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
1977 FeatureBitmap uint32 `binapi:"u32,name=feature_bitmap" json:"feature_bitmap,omitempty"`
1980 func (m *L2Flags) Reset() { *m = L2Flags{} }
1981 func (*L2Flags) GetMessageName() string { return "l2_flags" }
1982 func (*L2Flags) GetCrcString() string { return "0e889fb9" }
1983 func (*L2Flags) GetMessageType() api.MessageType {
1984 return api.RequestMessage
1987 func (m *L2Flags) Size() (size int) {
1991 size += 4 // m.SwIfIndex
1992 size += 1 // m.IsSet
1993 size += 4 // m.FeatureBitmap
1996 func (m *L2Flags) Marshal(b []byte) ([]byte, error) {
1998 b = make([]byte, m.Size())
2000 buf := codec.NewBuffer(b)
2001 buf.EncodeUint32(m.SwIfIndex)
2002 buf.EncodeUint8(m.IsSet)
2003 buf.EncodeUint32(m.FeatureBitmap)
2004 return buf.Bytes(), nil
2006 func (m *L2Flags) Unmarshal(b []byte) error {
2007 buf := codec.NewBuffer(b)
2008 m.SwIfIndex = buf.DecodeUint32()
2009 m.IsSet = buf.DecodeUint8()
2010 m.FeatureBitmap = buf.DecodeUint32()
2014 // L2FlagsReply defines message 'l2_flags_reply'.
2015 type L2FlagsReply struct {
2016 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2017 ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
2020 func (m *L2FlagsReply) Reset() { *m = L2FlagsReply{} }
2021 func (*L2FlagsReply) GetMessageName() string { return "l2_flags_reply" }
2022 func (*L2FlagsReply) GetCrcString() string { return "29b2a2b3" }
2023 func (*L2FlagsReply) GetMessageType() api.MessageType {
2024 return api.ReplyMessage
2027 func (m *L2FlagsReply) Size() (size int) {
2031 size += 4 // m.Retval
2032 size += 4 // m.ResultingFeatureBitmap
2035 func (m *L2FlagsReply) Marshal(b []byte) ([]byte, error) {
2037 b = make([]byte, m.Size())
2039 buf := codec.NewBuffer(b)
2040 buf.EncodeInt32(m.Retval)
2041 buf.EncodeUint32(m.ResultingFeatureBitmap)
2042 return buf.Bytes(), nil
2044 func (m *L2FlagsReply) Unmarshal(b []byte) error {
2045 buf := codec.NewBuffer(b)
2046 m.Retval = buf.DecodeInt32()
2047 m.ResultingFeatureBitmap = buf.DecodeUint32()
2051 // L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'.
2052 type L2InterfaceEfpFilter struct {
2053 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2054 EnableDisable uint8 `binapi:"u8,name=enable_disable" json:"enable_disable,omitempty"`
2057 func (m *L2InterfaceEfpFilter) Reset() { *m = L2InterfaceEfpFilter{} }
2058 func (*L2InterfaceEfpFilter) GetMessageName() string { return "l2_interface_efp_filter" }
2059 func (*L2InterfaceEfpFilter) GetCrcString() string { return "69d24598" }
2060 func (*L2InterfaceEfpFilter) GetMessageType() api.MessageType {
2061 return api.RequestMessage
2064 func (m *L2InterfaceEfpFilter) Size() (size int) {
2068 size += 4 // m.SwIfIndex
2069 size += 1 // m.EnableDisable
2072 func (m *L2InterfaceEfpFilter) Marshal(b []byte) ([]byte, error) {
2074 b = make([]byte, m.Size())
2076 buf := codec.NewBuffer(b)
2077 buf.EncodeUint32(m.SwIfIndex)
2078 buf.EncodeUint8(m.EnableDisable)
2079 return buf.Bytes(), nil
2081 func (m *L2InterfaceEfpFilter) Unmarshal(b []byte) error {
2082 buf := codec.NewBuffer(b)
2083 m.SwIfIndex = buf.DecodeUint32()
2084 m.EnableDisable = buf.DecodeUint8()
2088 // L2InterfaceEfpFilterReply defines message 'l2_interface_efp_filter_reply'.
2089 type L2InterfaceEfpFilterReply struct {
2090 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2093 func (m *L2InterfaceEfpFilterReply) Reset() { *m = L2InterfaceEfpFilterReply{} }
2094 func (*L2InterfaceEfpFilterReply) GetMessageName() string { return "l2_interface_efp_filter_reply" }
2095 func (*L2InterfaceEfpFilterReply) GetCrcString() string { return "e8d4e804" }
2096 func (*L2InterfaceEfpFilterReply) GetMessageType() api.MessageType {
2097 return api.ReplyMessage
2100 func (m *L2InterfaceEfpFilterReply) Size() (size int) {
2104 size += 4 // m.Retval
2107 func (m *L2InterfaceEfpFilterReply) Marshal(b []byte) ([]byte, error) {
2109 b = make([]byte, m.Size())
2111 buf := codec.NewBuffer(b)
2112 buf.EncodeInt32(m.Retval)
2113 return buf.Bytes(), nil
2115 func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error {
2116 buf := codec.NewBuffer(b)
2117 m.Retval = buf.DecodeInt32()
2121 // L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'.
2122 type L2InterfacePbbTagRewrite struct {
2123 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2124 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
2125 OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
2126 BDmac []byte `binapi:"u8[6],name=b_dmac" json:"b_dmac,omitempty"`
2127 BSmac []byte `binapi:"u8[6],name=b_smac" json:"b_smac,omitempty"`
2128 BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
2129 ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
2132 func (m *L2InterfacePbbTagRewrite) Reset() { *m = L2InterfacePbbTagRewrite{} }
2133 func (*L2InterfacePbbTagRewrite) GetMessageName() string { return "l2_interface_pbb_tag_rewrite" }
2134 func (*L2InterfacePbbTagRewrite) GetCrcString() string { return "6cf815f9" }
2135 func (*L2InterfacePbbTagRewrite) GetMessageType() api.MessageType {
2136 return api.RequestMessage
2139 func (m *L2InterfacePbbTagRewrite) Size() (size int) {
2143 size += 4 // m.SwIfIndex
2144 size += 4 // m.VtrOp
2145 size += 2 // m.OuterTag
2146 size += 1 * 6 // m.BDmac
2147 size += 1 * 6 // m.BSmac
2148 size += 2 // m.BVlanid
2152 func (m *L2InterfacePbbTagRewrite) Marshal(b []byte) ([]byte, error) {
2154 b = make([]byte, m.Size())
2156 buf := codec.NewBuffer(b)
2157 buf.EncodeUint32(m.SwIfIndex)
2158 buf.EncodeUint32(m.VtrOp)
2159 buf.EncodeUint16(m.OuterTag)
2160 buf.EncodeBytes(m.BDmac, 6)
2161 buf.EncodeBytes(m.BSmac, 6)
2162 buf.EncodeUint16(m.BVlanid)
2163 buf.EncodeUint32(m.ISid)
2164 return buf.Bytes(), nil
2166 func (m *L2InterfacePbbTagRewrite) Unmarshal(b []byte) error {
2167 buf := codec.NewBuffer(b)
2168 m.SwIfIndex = buf.DecodeUint32()
2169 m.VtrOp = buf.DecodeUint32()
2170 m.OuterTag = buf.DecodeUint16()
2171 m.BDmac = make([]byte, 6)
2172 copy(m.BDmac, buf.DecodeBytes(len(m.BDmac)))
2173 m.BSmac = make([]byte, 6)
2174 copy(m.BSmac, buf.DecodeBytes(len(m.BSmac)))
2175 m.BVlanid = buf.DecodeUint16()
2176 m.ISid = buf.DecodeUint32()
2180 // L2InterfacePbbTagRewriteReply defines message 'l2_interface_pbb_tag_rewrite_reply'.
2181 type L2InterfacePbbTagRewriteReply struct {
2182 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2185 func (m *L2InterfacePbbTagRewriteReply) Reset() { *m = L2InterfacePbbTagRewriteReply{} }
2186 func (*L2InterfacePbbTagRewriteReply) GetMessageName() string {
2187 return "l2_interface_pbb_tag_rewrite_reply"
2189 func (*L2InterfacePbbTagRewriteReply) GetCrcString() string { return "e8d4e804" }
2190 func (*L2InterfacePbbTagRewriteReply) GetMessageType() api.MessageType {
2191 return api.ReplyMessage
2194 func (m *L2InterfacePbbTagRewriteReply) Size() (size int) {
2198 size += 4 // m.Retval
2201 func (m *L2InterfacePbbTagRewriteReply) Marshal(b []byte) ([]byte, error) {
2203 b = make([]byte, m.Size())
2205 buf := codec.NewBuffer(b)
2206 buf.EncodeInt32(m.Retval)
2207 return buf.Bytes(), nil
2209 func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error {
2210 buf := codec.NewBuffer(b)
2211 m.Retval = buf.DecodeInt32()
2215 // L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'.
2216 type L2InterfaceVlanTagRewrite struct {
2217 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2218 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
2219 PushDot1q uint32 `binapi:"u32,name=push_dot1q" json:"push_dot1q,omitempty"`
2220 Tag1 uint32 `binapi:"u32,name=tag1" json:"tag1,omitempty"`
2221 Tag2 uint32 `binapi:"u32,name=tag2" json:"tag2,omitempty"`
2224 func (m *L2InterfaceVlanTagRewrite) Reset() { *m = L2InterfaceVlanTagRewrite{} }
2225 func (*L2InterfaceVlanTagRewrite) GetMessageName() string { return "l2_interface_vlan_tag_rewrite" }
2226 func (*L2InterfaceVlanTagRewrite) GetCrcString() string { return "b90be6b4" }
2227 func (*L2InterfaceVlanTagRewrite) GetMessageType() api.MessageType {
2228 return api.RequestMessage
2231 func (m *L2InterfaceVlanTagRewrite) Size() (size int) {
2235 size += 4 // m.SwIfIndex
2236 size += 4 // m.VtrOp
2237 size += 4 // m.PushDot1q
2242 func (m *L2InterfaceVlanTagRewrite) Marshal(b []byte) ([]byte, error) {
2244 b = make([]byte, m.Size())
2246 buf := codec.NewBuffer(b)
2247 buf.EncodeUint32(m.SwIfIndex)
2248 buf.EncodeUint32(m.VtrOp)
2249 buf.EncodeUint32(m.PushDot1q)
2250 buf.EncodeUint32(m.Tag1)
2251 buf.EncodeUint32(m.Tag2)
2252 return buf.Bytes(), nil
2254 func (m *L2InterfaceVlanTagRewrite) Unmarshal(b []byte) error {
2255 buf := codec.NewBuffer(b)
2256 m.SwIfIndex = buf.DecodeUint32()
2257 m.VtrOp = buf.DecodeUint32()
2258 m.PushDot1q = buf.DecodeUint32()
2259 m.Tag1 = buf.DecodeUint32()
2260 m.Tag2 = buf.DecodeUint32()
2264 // L2InterfaceVlanTagRewriteReply defines message 'l2_interface_vlan_tag_rewrite_reply'.
2265 type L2InterfaceVlanTagRewriteReply struct {
2266 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2269 func (m *L2InterfaceVlanTagRewriteReply) Reset() { *m = L2InterfaceVlanTagRewriteReply{} }
2270 func (*L2InterfaceVlanTagRewriteReply) GetMessageName() string {
2271 return "l2_interface_vlan_tag_rewrite_reply"
2273 func (*L2InterfaceVlanTagRewriteReply) GetCrcString() string { return "e8d4e804" }
2274 func (*L2InterfaceVlanTagRewriteReply) GetMessageType() api.MessageType {
2275 return api.ReplyMessage
2278 func (m *L2InterfaceVlanTagRewriteReply) Size() (size int) {
2282 size += 4 // m.Retval
2285 func (m *L2InterfaceVlanTagRewriteReply) Marshal(b []byte) ([]byte, error) {
2287 b = make([]byte, m.Size())
2289 buf := codec.NewBuffer(b)
2290 buf.EncodeInt32(m.Retval)
2291 return buf.Bytes(), nil
2293 func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error {
2294 buf := codec.NewBuffer(b)
2295 m.Retval = buf.DecodeInt32()
2299 // L2MacsEvent defines message 'l2_macs_event'.
2300 type L2MacsEvent struct {
2301 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2302 NMacs uint32 `binapi:"u32,name=n_macs" json:"-"`
2303 Mac []MacEntry `binapi:"mac_entry[n_macs],name=mac" json:"mac,omitempty"`
2306 func (m *L2MacsEvent) Reset() { *m = L2MacsEvent{} }
2307 func (*L2MacsEvent) GetMessageName() string { return "l2_macs_event" }
2308 func (*L2MacsEvent) GetCrcString() string { return "afc74a60" }
2309 func (*L2MacsEvent) GetMessageType() api.MessageType {
2310 return api.EventMessage
2313 func (m *L2MacsEvent) Size() (size int) {
2318 size += 4 // m.NMacs
2319 for j1 := 0; j1 < len(m.Mac); j1++ {
2322 if j1 < len(m.Mac) {
2325 size += 4 // s1.SwIfIndex
2326 size += 1 * 6 // s1.MacAddr
2327 size += 1 // s1.Action
2328 size += 1 // s1.Flags
2332 func (m *L2MacsEvent) Marshal(b []byte) ([]byte, error) {
2334 b = make([]byte, m.Size())
2336 buf := codec.NewBuffer(b)
2337 buf.EncodeUint32(m.PID)
2338 buf.EncodeUint32(uint32(len(m.Mac)))
2339 for j0 := 0; j0 < len(m.Mac); j0++ {
2340 var v0 MacEntry // Mac
2341 if j0 < len(m.Mac) {
2344 buf.EncodeUint32(v0.SwIfIndex)
2345 buf.EncodeBytes(v0.MacAddr, 6)
2346 buf.EncodeUint8(v0.Action)
2347 buf.EncodeUint8(v0.Flags)
2349 return buf.Bytes(), nil
2351 func (m *L2MacsEvent) Unmarshal(b []byte) error {
2352 buf := codec.NewBuffer(b)
2353 m.PID = buf.DecodeUint32()
2354 m.NMacs = buf.DecodeUint32()
2355 m.Mac = make([]MacEntry, m.NMacs)
2356 for j0 := 0; j0 < len(m.Mac); j0++ {
2357 m.Mac[j0].SwIfIndex = buf.DecodeUint32()
2358 m.Mac[j0].MacAddr = make([]byte, 6)
2359 copy(m.Mac[j0].MacAddr, buf.DecodeBytes(len(m.Mac[j0].MacAddr)))
2360 m.Mac[j0].Action = buf.DecodeUint8()
2361 m.Mac[j0].Flags = buf.DecodeUint8()
2366 // L2PatchAddDel defines message 'l2_patch_add_del'.
2367 type L2PatchAddDel struct {
2368 RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
2369 TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
2370 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
2373 func (m *L2PatchAddDel) Reset() { *m = L2PatchAddDel{} }
2374 func (*L2PatchAddDel) GetMessageName() string { return "l2_patch_add_del" }
2375 func (*L2PatchAddDel) GetCrcString() string { return "62506e63" }
2376 func (*L2PatchAddDel) GetMessageType() api.MessageType {
2377 return api.RequestMessage
2380 func (m *L2PatchAddDel) Size() (size int) {
2384 size += 4 // m.RxSwIfIndex
2385 size += 4 // m.TxSwIfIndex
2386 size += 1 // m.IsAdd
2389 func (m *L2PatchAddDel) Marshal(b []byte) ([]byte, error) {
2391 b = make([]byte, m.Size())
2393 buf := codec.NewBuffer(b)
2394 buf.EncodeUint32(m.RxSwIfIndex)
2395 buf.EncodeUint32(m.TxSwIfIndex)
2396 buf.EncodeUint8(m.IsAdd)
2397 return buf.Bytes(), nil
2399 func (m *L2PatchAddDel) Unmarshal(b []byte) error {
2400 buf := codec.NewBuffer(b)
2401 m.RxSwIfIndex = buf.DecodeUint32()
2402 m.TxSwIfIndex = buf.DecodeUint32()
2403 m.IsAdd = buf.DecodeUint8()
2407 // L2PatchAddDelReply defines message 'l2_patch_add_del_reply'.
2408 type L2PatchAddDelReply struct {
2409 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2412 func (m *L2PatchAddDelReply) Reset() { *m = L2PatchAddDelReply{} }
2413 func (*L2PatchAddDelReply) GetMessageName() string { return "l2_patch_add_del_reply" }
2414 func (*L2PatchAddDelReply) GetCrcString() string { return "e8d4e804" }
2415 func (*L2PatchAddDelReply) GetMessageType() api.MessageType {
2416 return api.ReplyMessage
2419 func (m *L2PatchAddDelReply) Size() (size int) {
2423 size += 4 // m.Retval
2426 func (m *L2PatchAddDelReply) Marshal(b []byte) ([]byte, error) {
2428 b = make([]byte, m.Size())
2430 buf := codec.NewBuffer(b)
2431 buf.EncodeInt32(m.Retval)
2432 return buf.Bytes(), nil
2434 func (m *L2PatchAddDelReply) Unmarshal(b []byte) error {
2435 buf := codec.NewBuffer(b)
2436 m.Retval = buf.DecodeInt32()
2440 // L2XconnectDetails defines message 'l2_xconnect_details'.
2441 type L2XconnectDetails struct {
2442 RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
2443 TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
2446 func (m *L2XconnectDetails) Reset() { *m = L2XconnectDetails{} }
2447 func (*L2XconnectDetails) GetMessageName() string { return "l2_xconnect_details" }
2448 func (*L2XconnectDetails) GetCrcString() string { return "722e2378" }
2449 func (*L2XconnectDetails) GetMessageType() api.MessageType {
2450 return api.ReplyMessage
2453 func (m *L2XconnectDetails) Size() (size int) {
2457 size += 4 // m.RxSwIfIndex
2458 size += 4 // m.TxSwIfIndex
2461 func (m *L2XconnectDetails) Marshal(b []byte) ([]byte, error) {
2463 b = make([]byte, m.Size())
2465 buf := codec.NewBuffer(b)
2466 buf.EncodeUint32(m.RxSwIfIndex)
2467 buf.EncodeUint32(m.TxSwIfIndex)
2468 return buf.Bytes(), nil
2470 func (m *L2XconnectDetails) Unmarshal(b []byte) error {
2471 buf := codec.NewBuffer(b)
2472 m.RxSwIfIndex = buf.DecodeUint32()
2473 m.TxSwIfIndex = buf.DecodeUint32()
2477 // L2XconnectDump defines message 'l2_xconnect_dump'.
2478 type L2XconnectDump struct{}
2480 func (m *L2XconnectDump) Reset() { *m = L2XconnectDump{} }
2481 func (*L2XconnectDump) GetMessageName() string { return "l2_xconnect_dump" }
2482 func (*L2XconnectDump) GetCrcString() string { return "51077d14" }
2483 func (*L2XconnectDump) GetMessageType() api.MessageType {
2484 return api.RequestMessage
2487 func (m *L2XconnectDump) Size() (size int) {
2493 func (m *L2XconnectDump) Marshal(b []byte) ([]byte, error) {
2495 b = make([]byte, m.Size())
2497 buf := codec.NewBuffer(b)
2498 return buf.Bytes(), nil
2500 func (m *L2XconnectDump) Unmarshal(b []byte) error {
2504 // L2fibAddDel defines message 'l2fib_add_del'.
2505 type L2fibAddDel struct {
2506 Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
2507 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
2508 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2509 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
2510 StaticMac uint8 `binapi:"u8,name=static_mac" json:"static_mac,omitempty"`
2511 FilterMac uint8 `binapi:"u8,name=filter_mac" json:"filter_mac,omitempty"`
2512 BviMac uint8 `binapi:"u8,name=bvi_mac" json:"bvi_mac,omitempty"`
2515 func (m *L2fibAddDel) Reset() { *m = L2fibAddDel{} }
2516 func (*L2fibAddDel) GetMessageName() string { return "l2fib_add_del" }
2517 func (*L2fibAddDel) GetCrcString() string { return "34ced3eb" }
2518 func (*L2fibAddDel) GetMessageType() api.MessageType {
2519 return api.RequestMessage
2522 func (m *L2fibAddDel) Size() (size int) {
2526 size += 1 * 6 // m.Mac
2528 size += 4 // m.SwIfIndex
2529 size += 1 // m.IsAdd
2530 size += 1 // m.StaticMac
2531 size += 1 // m.FilterMac
2532 size += 1 // m.BviMac
2535 func (m *L2fibAddDel) Marshal(b []byte) ([]byte, error) {
2537 b = make([]byte, m.Size())
2539 buf := codec.NewBuffer(b)
2540 buf.EncodeBytes(m.Mac, 6)
2541 buf.EncodeUint32(m.BdID)
2542 buf.EncodeUint32(m.SwIfIndex)
2543 buf.EncodeUint8(m.IsAdd)
2544 buf.EncodeUint8(m.StaticMac)
2545 buf.EncodeUint8(m.FilterMac)
2546 buf.EncodeUint8(m.BviMac)
2547 return buf.Bytes(), nil
2549 func (m *L2fibAddDel) Unmarshal(b []byte) error {
2550 buf := codec.NewBuffer(b)
2551 m.Mac = make([]byte, 6)
2552 copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
2553 m.BdID = buf.DecodeUint32()
2554 m.SwIfIndex = buf.DecodeUint32()
2555 m.IsAdd = buf.DecodeUint8()
2556 m.StaticMac = buf.DecodeUint8()
2557 m.FilterMac = buf.DecodeUint8()
2558 m.BviMac = buf.DecodeUint8()
2562 // L2fibAddDelReply defines message 'l2fib_add_del_reply'.
2563 type L2fibAddDelReply struct {
2564 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2567 func (m *L2fibAddDelReply) Reset() { *m = L2fibAddDelReply{} }
2568 func (*L2fibAddDelReply) GetMessageName() string { return "l2fib_add_del_reply" }
2569 func (*L2fibAddDelReply) GetCrcString() string { return "e8d4e804" }
2570 func (*L2fibAddDelReply) GetMessageType() api.MessageType {
2571 return api.ReplyMessage
2574 func (m *L2fibAddDelReply) Size() (size int) {
2578 size += 4 // m.Retval
2581 func (m *L2fibAddDelReply) Marshal(b []byte) ([]byte, error) {
2583 b = make([]byte, m.Size())
2585 buf := codec.NewBuffer(b)
2586 buf.EncodeInt32(m.Retval)
2587 return buf.Bytes(), nil
2589 func (m *L2fibAddDelReply) Unmarshal(b []byte) error {
2590 buf := codec.NewBuffer(b)
2591 m.Retval = buf.DecodeInt32()
2595 // L2fibFlushAll defines message 'l2fib_flush_all'.
2596 type L2fibFlushAll struct{}
2598 func (m *L2fibFlushAll) Reset() { *m = L2fibFlushAll{} }
2599 func (*L2fibFlushAll) GetMessageName() string { return "l2fib_flush_all" }
2600 func (*L2fibFlushAll) GetCrcString() string { return "51077d14" }
2601 func (*L2fibFlushAll) GetMessageType() api.MessageType {
2602 return api.RequestMessage
2605 func (m *L2fibFlushAll) Size() (size int) {
2611 func (m *L2fibFlushAll) Marshal(b []byte) ([]byte, error) {
2613 b = make([]byte, m.Size())
2615 buf := codec.NewBuffer(b)
2616 return buf.Bytes(), nil
2618 func (m *L2fibFlushAll) Unmarshal(b []byte) error {
2622 // L2fibFlushAllReply defines message 'l2fib_flush_all_reply'.
2623 type L2fibFlushAllReply struct {
2624 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2627 func (m *L2fibFlushAllReply) Reset() { *m = L2fibFlushAllReply{} }
2628 func (*L2fibFlushAllReply) GetMessageName() string { return "l2fib_flush_all_reply" }
2629 func (*L2fibFlushAllReply) GetCrcString() string { return "e8d4e804" }
2630 func (*L2fibFlushAllReply) GetMessageType() api.MessageType {
2631 return api.ReplyMessage
2634 func (m *L2fibFlushAllReply) Size() (size int) {
2638 size += 4 // m.Retval
2641 func (m *L2fibFlushAllReply) Marshal(b []byte) ([]byte, error) {
2643 b = make([]byte, m.Size())
2645 buf := codec.NewBuffer(b)
2646 buf.EncodeInt32(m.Retval)
2647 return buf.Bytes(), nil
2649 func (m *L2fibFlushAllReply) Unmarshal(b []byte) error {
2650 buf := codec.NewBuffer(b)
2651 m.Retval = buf.DecodeInt32()
2655 // L2fibFlushBd defines message 'l2fib_flush_bd'.
2656 type L2fibFlushBd struct {
2657 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
2660 func (m *L2fibFlushBd) Reset() { *m = L2fibFlushBd{} }
2661 func (*L2fibFlushBd) GetMessageName() string { return "l2fib_flush_bd" }
2662 func (*L2fibFlushBd) GetCrcString() string { return "c25fdce6" }
2663 func (*L2fibFlushBd) GetMessageType() api.MessageType {
2664 return api.RequestMessage
2667 func (m *L2fibFlushBd) Size() (size int) {
2674 func (m *L2fibFlushBd) Marshal(b []byte) ([]byte, error) {
2676 b = make([]byte, m.Size())
2678 buf := codec.NewBuffer(b)
2679 buf.EncodeUint32(m.BdID)
2680 return buf.Bytes(), nil
2682 func (m *L2fibFlushBd) Unmarshal(b []byte) error {
2683 buf := codec.NewBuffer(b)
2684 m.BdID = buf.DecodeUint32()
2688 // L2fibFlushBdReply defines message 'l2fib_flush_bd_reply'.
2689 type L2fibFlushBdReply struct {
2690 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2693 func (m *L2fibFlushBdReply) Reset() { *m = L2fibFlushBdReply{} }
2694 func (*L2fibFlushBdReply) GetMessageName() string { return "l2fib_flush_bd_reply" }
2695 func (*L2fibFlushBdReply) GetCrcString() string { return "e8d4e804" }
2696 func (*L2fibFlushBdReply) GetMessageType() api.MessageType {
2697 return api.ReplyMessage
2700 func (m *L2fibFlushBdReply) Size() (size int) {
2704 size += 4 // m.Retval
2707 func (m *L2fibFlushBdReply) Marshal(b []byte) ([]byte, error) {
2709 b = make([]byte, m.Size())
2711 buf := codec.NewBuffer(b)
2712 buf.EncodeInt32(m.Retval)
2713 return buf.Bytes(), nil
2715 func (m *L2fibFlushBdReply) Unmarshal(b []byte) error {
2716 buf := codec.NewBuffer(b)
2717 m.Retval = buf.DecodeInt32()
2721 // L2fibFlushInt defines message 'l2fib_flush_int'.
2722 type L2fibFlushInt struct {
2723 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2726 func (m *L2fibFlushInt) Reset() { *m = L2fibFlushInt{} }
2727 func (*L2fibFlushInt) GetMessageName() string { return "l2fib_flush_int" }
2728 func (*L2fibFlushInt) GetCrcString() string { return "529cb13f" }
2729 func (*L2fibFlushInt) GetMessageType() api.MessageType {
2730 return api.RequestMessage
2733 func (m *L2fibFlushInt) Size() (size int) {
2737 size += 4 // m.SwIfIndex
2740 func (m *L2fibFlushInt) Marshal(b []byte) ([]byte, error) {
2742 b = make([]byte, m.Size())
2744 buf := codec.NewBuffer(b)
2745 buf.EncodeUint32(m.SwIfIndex)
2746 return buf.Bytes(), nil
2748 func (m *L2fibFlushInt) Unmarshal(b []byte) error {
2749 buf := codec.NewBuffer(b)
2750 m.SwIfIndex = buf.DecodeUint32()
2754 // L2fibFlushIntReply defines message 'l2fib_flush_int_reply'.
2755 type L2fibFlushIntReply struct {
2756 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2759 func (m *L2fibFlushIntReply) Reset() { *m = L2fibFlushIntReply{} }
2760 func (*L2fibFlushIntReply) GetMessageName() string { return "l2fib_flush_int_reply" }
2761 func (*L2fibFlushIntReply) GetCrcString() string { return "e8d4e804" }
2762 func (*L2fibFlushIntReply) GetMessageType() api.MessageType {
2763 return api.ReplyMessage
2766 func (m *L2fibFlushIntReply) Size() (size int) {
2770 size += 4 // m.Retval
2773 func (m *L2fibFlushIntReply) Marshal(b []byte) ([]byte, error) {
2775 b = make([]byte, m.Size())
2777 buf := codec.NewBuffer(b)
2778 buf.EncodeInt32(m.Retval)
2779 return buf.Bytes(), nil
2781 func (m *L2fibFlushIntReply) Unmarshal(b []byte) error {
2782 buf := codec.NewBuffer(b)
2783 m.Retval = buf.DecodeInt32()
2787 // SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'.
2788 type SwInterfaceSetL2Bridge struct {
2789 RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
2790 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
2791 PortType L2PortType `binapi:"l2_port_type,name=port_type" json:"port_type,omitempty"`
2792 Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"`
2793 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
2796 func (m *SwInterfaceSetL2Bridge) Reset() { *m = SwInterfaceSetL2Bridge{} }
2797 func (*SwInterfaceSetL2Bridge) GetMessageName() string { return "sw_interface_set_l2_bridge" }
2798 func (*SwInterfaceSetL2Bridge) GetCrcString() string { return "5579f809" }
2799 func (*SwInterfaceSetL2Bridge) GetMessageType() api.MessageType {
2800 return api.RequestMessage
2803 func (m *SwInterfaceSetL2Bridge) Size() (size int) {
2807 size += 4 // m.RxSwIfIndex
2809 size += 4 // m.PortType
2811 size += 1 // m.Enable
2814 func (m *SwInterfaceSetL2Bridge) Marshal(b []byte) ([]byte, error) {
2816 b = make([]byte, m.Size())
2818 buf := codec.NewBuffer(b)
2819 buf.EncodeUint32(m.RxSwIfIndex)
2820 buf.EncodeUint32(m.BdID)
2821 buf.EncodeUint32(uint32(m.PortType))
2822 buf.EncodeUint8(m.Shg)
2823 buf.EncodeUint8(m.Enable)
2824 return buf.Bytes(), nil
2826 func (m *SwInterfaceSetL2Bridge) Unmarshal(b []byte) error {
2827 buf := codec.NewBuffer(b)
2828 m.RxSwIfIndex = buf.DecodeUint32()
2829 m.BdID = buf.DecodeUint32()
2830 m.PortType = L2PortType(buf.DecodeUint32())
2831 m.Shg = buf.DecodeUint8()
2832 m.Enable = buf.DecodeUint8()
2836 // SwInterfaceSetL2BridgeReply defines message 'sw_interface_set_l2_bridge_reply'.
2837 type SwInterfaceSetL2BridgeReply struct {
2838 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2841 func (m *SwInterfaceSetL2BridgeReply) Reset() { *m = SwInterfaceSetL2BridgeReply{} }
2842 func (*SwInterfaceSetL2BridgeReply) GetMessageName() string {
2843 return "sw_interface_set_l2_bridge_reply"
2845 func (*SwInterfaceSetL2BridgeReply) GetCrcString() string { return "e8d4e804" }
2846 func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType {
2847 return api.ReplyMessage
2850 func (m *SwInterfaceSetL2BridgeReply) Size() (size int) {
2854 size += 4 // m.Retval
2857 func (m *SwInterfaceSetL2BridgeReply) Marshal(b []byte) ([]byte, error) {
2859 b = make([]byte, m.Size())
2861 buf := codec.NewBuffer(b)
2862 buf.EncodeInt32(m.Retval)
2863 return buf.Bytes(), nil
2865 func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error {
2866 buf := codec.NewBuffer(b)
2867 m.Retval = buf.DecodeInt32()
2871 // SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'.
2872 type SwInterfaceSetL2Xconnect struct {
2873 RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
2874 TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
2875 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
2878 func (m *SwInterfaceSetL2Xconnect) Reset() { *m = SwInterfaceSetL2Xconnect{} }
2879 func (*SwInterfaceSetL2Xconnect) GetMessageName() string { return "sw_interface_set_l2_xconnect" }
2880 func (*SwInterfaceSetL2Xconnect) GetCrcString() string { return "95de3988" }
2881 func (*SwInterfaceSetL2Xconnect) GetMessageType() api.MessageType {
2882 return api.RequestMessage
2885 func (m *SwInterfaceSetL2Xconnect) Size() (size int) {
2889 size += 4 // m.RxSwIfIndex
2890 size += 4 // m.TxSwIfIndex
2891 size += 1 // m.Enable
2894 func (m *SwInterfaceSetL2Xconnect) Marshal(b []byte) ([]byte, error) {
2896 b = make([]byte, m.Size())
2898 buf := codec.NewBuffer(b)
2899 buf.EncodeUint32(m.RxSwIfIndex)
2900 buf.EncodeUint32(m.TxSwIfIndex)
2901 buf.EncodeUint8(m.Enable)
2902 return buf.Bytes(), nil
2904 func (m *SwInterfaceSetL2Xconnect) Unmarshal(b []byte) error {
2905 buf := codec.NewBuffer(b)
2906 m.RxSwIfIndex = buf.DecodeUint32()
2907 m.TxSwIfIndex = buf.DecodeUint32()
2908 m.Enable = buf.DecodeUint8()
2912 // SwInterfaceSetL2XconnectReply defines message 'sw_interface_set_l2_xconnect_reply'.
2913 type SwInterfaceSetL2XconnectReply struct {
2914 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2917 func (m *SwInterfaceSetL2XconnectReply) Reset() { *m = SwInterfaceSetL2XconnectReply{} }
2918 func (*SwInterfaceSetL2XconnectReply) GetMessageName() string {
2919 return "sw_interface_set_l2_xconnect_reply"
2921 func (*SwInterfaceSetL2XconnectReply) GetCrcString() string { return "e8d4e804" }
2922 func (*SwInterfaceSetL2XconnectReply) GetMessageType() api.MessageType {
2923 return api.ReplyMessage
2926 func (m *SwInterfaceSetL2XconnectReply) Size() (size int) {
2930 size += 4 // m.Retval
2933 func (m *SwInterfaceSetL2XconnectReply) Marshal(b []byte) ([]byte, error) {
2935 b = make([]byte, m.Size())
2937 buf := codec.NewBuffer(b)
2938 buf.EncodeInt32(m.Retval)
2939 return buf.Bytes(), nil
2941 func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error {
2942 buf := codec.NewBuffer(b)
2943 m.Retval = buf.DecodeInt32()
2947 // SwInterfaceSetVpath defines message 'sw_interface_set_vpath'.
2948 type SwInterfaceSetVpath struct {
2949 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2950 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
2953 func (m *SwInterfaceSetVpath) Reset() { *m = SwInterfaceSetVpath{} }
2954 func (*SwInterfaceSetVpath) GetMessageName() string { return "sw_interface_set_vpath" }
2955 func (*SwInterfaceSetVpath) GetCrcString() string { return "a36fadc0" }
2956 func (*SwInterfaceSetVpath) GetMessageType() api.MessageType {
2957 return api.RequestMessage
2960 func (m *SwInterfaceSetVpath) Size() (size int) {
2964 size += 4 // m.SwIfIndex
2965 size += 1 // m.Enable
2968 func (m *SwInterfaceSetVpath) Marshal(b []byte) ([]byte, error) {
2970 b = make([]byte, m.Size())
2972 buf := codec.NewBuffer(b)
2973 buf.EncodeUint32(m.SwIfIndex)
2974 buf.EncodeUint8(m.Enable)
2975 return buf.Bytes(), nil
2977 func (m *SwInterfaceSetVpath) Unmarshal(b []byte) error {
2978 buf := codec.NewBuffer(b)
2979 m.SwIfIndex = buf.DecodeUint32()
2980 m.Enable = buf.DecodeUint8()
2984 // SwInterfaceSetVpathReply defines message 'sw_interface_set_vpath_reply'.
2985 type SwInterfaceSetVpathReply struct {
2986 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2989 func (m *SwInterfaceSetVpathReply) Reset() { *m = SwInterfaceSetVpathReply{} }
2990 func (*SwInterfaceSetVpathReply) GetMessageName() string { return "sw_interface_set_vpath_reply" }
2991 func (*SwInterfaceSetVpathReply) GetCrcString() string { return "e8d4e804" }
2992 func (*SwInterfaceSetVpathReply) GetMessageType() api.MessageType {
2993 return api.ReplyMessage
2996 func (m *SwInterfaceSetVpathReply) Size() (size int) {
3000 size += 4 // m.Retval
3003 func (m *SwInterfaceSetVpathReply) Marshal(b []byte) ([]byte, error) {
3005 b = make([]byte, m.Size())
3007 buf := codec.NewBuffer(b)
3008 buf.EncodeInt32(m.Retval)
3009 return buf.Bytes(), nil
3011 func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error {
3012 buf := codec.NewBuffer(b)
3013 m.Retval = buf.DecodeInt32()
3017 // WantL2ArpTermEvents defines message 'want_l2_arp_term_events'.
3018 type WantL2ArpTermEvents struct {
3019 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
3020 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
3023 func (m *WantL2ArpTermEvents) Reset() { *m = WantL2ArpTermEvents{} }
3024 func (*WantL2ArpTermEvents) GetMessageName() string { return "want_l2_arp_term_events" }
3025 func (*WantL2ArpTermEvents) GetCrcString() string { return "3ec6d6c2" }
3026 func (*WantL2ArpTermEvents) GetMessageType() api.MessageType {
3027 return api.RequestMessage
3030 func (m *WantL2ArpTermEvents) Size() (size int) {
3034 size += 1 // m.Enable
3038 func (m *WantL2ArpTermEvents) Marshal(b []byte) ([]byte, error) {
3040 b = make([]byte, m.Size())
3042 buf := codec.NewBuffer(b)
3043 buf.EncodeBool(m.Enable)
3044 buf.EncodeUint32(m.PID)
3045 return buf.Bytes(), nil
3047 func (m *WantL2ArpTermEvents) Unmarshal(b []byte) error {
3048 buf := codec.NewBuffer(b)
3049 m.Enable = buf.DecodeBool()
3050 m.PID = buf.DecodeUint32()
3054 // WantL2ArpTermEventsReply defines message 'want_l2_arp_term_events_reply'.
3055 type WantL2ArpTermEventsReply struct {
3056 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3059 func (m *WantL2ArpTermEventsReply) Reset() { *m = WantL2ArpTermEventsReply{} }
3060 func (*WantL2ArpTermEventsReply) GetMessageName() string { return "want_l2_arp_term_events_reply" }
3061 func (*WantL2ArpTermEventsReply) GetCrcString() string { return "e8d4e804" }
3062 func (*WantL2ArpTermEventsReply) GetMessageType() api.MessageType {
3063 return api.ReplyMessage
3066 func (m *WantL2ArpTermEventsReply) Size() (size int) {
3070 size += 4 // m.Retval
3073 func (m *WantL2ArpTermEventsReply) Marshal(b []byte) ([]byte, error) {
3075 b = make([]byte, m.Size())
3077 buf := codec.NewBuffer(b)
3078 buf.EncodeInt32(m.Retval)
3079 return buf.Bytes(), nil
3081 func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error {
3082 buf := codec.NewBuffer(b)
3083 m.Retval = buf.DecodeInt32()
3087 // WantL2MacsEvents defines message 'want_l2_macs_events'.
3088 type WantL2MacsEvents struct {
3089 LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"`
3090 ScanDelay uint8 `binapi:"u8,name=scan_delay" json:"scan_delay,omitempty"`
3091 MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event" json:"max_macs_in_event,omitempty"`
3092 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
3093 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
3096 func (m *WantL2MacsEvents) Reset() { *m = WantL2MacsEvents{} }
3097 func (*WantL2MacsEvents) GetMessageName() string { return "want_l2_macs_events" }
3098 func (*WantL2MacsEvents) GetCrcString() string { return "9aabdfde" }
3099 func (*WantL2MacsEvents) GetMessageType() api.MessageType {
3100 return api.RequestMessage
3103 func (m *WantL2MacsEvents) Size() (size int) {
3107 size += 4 // m.LearnLimit
3108 size += 1 // m.ScanDelay
3109 size += 1 // m.MaxMacsInEvent
3110 size += 1 // m.EnableDisable
3114 func (m *WantL2MacsEvents) Marshal(b []byte) ([]byte, error) {
3116 b = make([]byte, m.Size())
3118 buf := codec.NewBuffer(b)
3119 buf.EncodeUint32(m.LearnLimit)
3120 buf.EncodeUint8(m.ScanDelay)
3121 buf.EncodeUint8(m.MaxMacsInEvent)
3122 buf.EncodeBool(m.EnableDisable)
3123 buf.EncodeUint32(m.PID)
3124 return buf.Bytes(), nil
3126 func (m *WantL2MacsEvents) Unmarshal(b []byte) error {
3127 buf := codec.NewBuffer(b)
3128 m.LearnLimit = buf.DecodeUint32()
3129 m.ScanDelay = buf.DecodeUint8()
3130 m.MaxMacsInEvent = buf.DecodeUint8()
3131 m.EnableDisable = buf.DecodeBool()
3132 m.PID = buf.DecodeUint32()
3136 // WantL2MacsEventsReply defines message 'want_l2_macs_events_reply'.
3137 type WantL2MacsEventsReply struct {
3138 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3141 func (m *WantL2MacsEventsReply) Reset() { *m = WantL2MacsEventsReply{} }
3142 func (*WantL2MacsEventsReply) GetMessageName() string { return "want_l2_macs_events_reply" }
3143 func (*WantL2MacsEventsReply) GetCrcString() string { return "e8d4e804" }
3144 func (*WantL2MacsEventsReply) GetMessageType() api.MessageType {
3145 return api.ReplyMessage
3148 func (m *WantL2MacsEventsReply) Size() (size int) {
3152 size += 4 // m.Retval
3155 func (m *WantL2MacsEventsReply) Marshal(b []byte) ([]byte, error) {
3157 b = make([]byte, m.Size())
3159 buf := codec.NewBuffer(b)
3160 buf.EncodeInt32(m.Retval)
3161 return buf.Bytes(), nil
3163 func (m *WantL2MacsEventsReply) Unmarshal(b []byte) error {
3164 buf := codec.NewBuffer(b)
3165 m.Retval = buf.DecodeInt32()
3169 func init() { file_l2_binapi_init() }
3170 func file_l2_binapi_init() {
3171 api.RegisterMessage((*BdIPMacAddDel)(nil), "bd_ip_mac_add_del_25bf4063")
3172 api.RegisterMessage((*BdIPMacAddDelReply)(nil), "bd_ip_mac_add_del_reply_e8d4e804")
3173 api.RegisterMessage((*BdIPMacDetails)(nil), "bd_ip_mac_details_a52f8044")
3174 api.RegisterMessage((*BdIPMacDump)(nil), "bd_ip_mac_dump_c25fdce6")
3175 api.RegisterMessage((*BdIPMacFlush)(nil), "bd_ip_mac_flush_c25fdce6")
3176 api.RegisterMessage((*BdIPMacFlushReply)(nil), "bd_ip_mac_flush_reply_e8d4e804")
3177 api.RegisterMessage((*BridgeDomainAddDel)(nil), "bridge_domain_add_del_c6360720")
3178 api.RegisterMessage((*BridgeDomainAddDelReply)(nil), "bridge_domain_add_del_reply_e8d4e804")
3179 api.RegisterMessage((*BridgeDomainDetails)(nil), "bridge_domain_details_748c854a")
3180 api.RegisterMessage((*BridgeDomainDump)(nil), "bridge_domain_dump_c25fdce6")
3181 api.RegisterMessage((*BridgeDomainSetMacAge)(nil), "bridge_domain_set_mac_age_b537ad7b")
3182 api.RegisterMessage((*BridgeDomainSetMacAgeReply)(nil), "bridge_domain_set_mac_age_reply_e8d4e804")
3183 api.RegisterMessage((*BridgeFlags)(nil), "bridge_flags_2eb9b76c")
3184 api.RegisterMessage((*BridgeFlagsReply)(nil), "bridge_flags_reply_29b2a2b3")
3185 api.RegisterMessage((*BviCreate)(nil), "bvi_create_f5398559")
3186 api.RegisterMessage((*BviCreateReply)(nil), "bvi_create_reply_fda5941f")
3187 api.RegisterMessage((*BviDelete)(nil), "bvi_delete_529cb13f")
3188 api.RegisterMessage((*BviDeleteReply)(nil), "bvi_delete_reply_e8d4e804")
3189 api.RegisterMessage((*L2ArpTermEvent)(nil), "l2_arp_term_event_85ff71ea")
3190 api.RegisterMessage((*L2FibClearTable)(nil), "l2_fib_clear_table_51077d14")
3191 api.RegisterMessage((*L2FibClearTableReply)(nil), "l2_fib_clear_table_reply_e8d4e804")
3192 api.RegisterMessage((*L2FibTableDetails)(nil), "l2_fib_table_details_c7392706")
3193 api.RegisterMessage((*L2FibTableDump)(nil), "l2_fib_table_dump_c25fdce6")
3194 api.RegisterMessage((*L2Flags)(nil), "l2_flags_0e889fb9")
3195 api.RegisterMessage((*L2FlagsReply)(nil), "l2_flags_reply_29b2a2b3")
3196 api.RegisterMessage((*L2InterfaceEfpFilter)(nil), "l2_interface_efp_filter_69d24598")
3197 api.RegisterMessage((*L2InterfaceEfpFilterReply)(nil), "l2_interface_efp_filter_reply_e8d4e804")
3198 api.RegisterMessage((*L2InterfacePbbTagRewrite)(nil), "l2_interface_pbb_tag_rewrite_6cf815f9")
3199 api.RegisterMessage((*L2InterfacePbbTagRewriteReply)(nil), "l2_interface_pbb_tag_rewrite_reply_e8d4e804")
3200 api.RegisterMessage((*L2InterfaceVlanTagRewrite)(nil), "l2_interface_vlan_tag_rewrite_b90be6b4")
3201 api.RegisterMessage((*L2InterfaceVlanTagRewriteReply)(nil), "l2_interface_vlan_tag_rewrite_reply_e8d4e804")
3202 api.RegisterMessage((*L2MacsEvent)(nil), "l2_macs_event_afc74a60")
3203 api.RegisterMessage((*L2PatchAddDel)(nil), "l2_patch_add_del_62506e63")
3204 api.RegisterMessage((*L2PatchAddDelReply)(nil), "l2_patch_add_del_reply_e8d4e804")
3205 api.RegisterMessage((*L2XconnectDetails)(nil), "l2_xconnect_details_722e2378")
3206 api.RegisterMessage((*L2XconnectDump)(nil), "l2_xconnect_dump_51077d14")
3207 api.RegisterMessage((*L2fibAddDel)(nil), "l2fib_add_del_34ced3eb")
3208 api.RegisterMessage((*L2fibAddDelReply)(nil), "l2fib_add_del_reply_e8d4e804")
3209 api.RegisterMessage((*L2fibFlushAll)(nil), "l2fib_flush_all_51077d14")
3210 api.RegisterMessage((*L2fibFlushAllReply)(nil), "l2fib_flush_all_reply_e8d4e804")
3211 api.RegisterMessage((*L2fibFlushBd)(nil), "l2fib_flush_bd_c25fdce6")
3212 api.RegisterMessage((*L2fibFlushBdReply)(nil), "l2fib_flush_bd_reply_e8d4e804")
3213 api.RegisterMessage((*L2fibFlushInt)(nil), "l2fib_flush_int_529cb13f")
3214 api.RegisterMessage((*L2fibFlushIntReply)(nil), "l2fib_flush_int_reply_e8d4e804")
3215 api.RegisterMessage((*SwInterfaceSetL2Bridge)(nil), "sw_interface_set_l2_bridge_5579f809")
3216 api.RegisterMessage((*SwInterfaceSetL2BridgeReply)(nil), "sw_interface_set_l2_bridge_reply_e8d4e804")
3217 api.RegisterMessage((*SwInterfaceSetL2Xconnect)(nil), "sw_interface_set_l2_xconnect_95de3988")
3218 api.RegisterMessage((*SwInterfaceSetL2XconnectReply)(nil), "sw_interface_set_l2_xconnect_reply_e8d4e804")
3219 api.RegisterMessage((*SwInterfaceSetVpath)(nil), "sw_interface_set_vpath_a36fadc0")
3220 api.RegisterMessage((*SwInterfaceSetVpathReply)(nil), "sw_interface_set_vpath_reply_e8d4e804")
3221 api.RegisterMessage((*WantL2ArpTermEvents)(nil), "want_l2_arp_term_events_3ec6d6c2")
3222 api.RegisterMessage((*WantL2ArpTermEventsReply)(nil), "want_l2_arp_term_events_reply_e8d4e804")
3223 api.RegisterMessage((*WantL2MacsEvents)(nil), "want_l2_macs_events_9aabdfde")
3224 api.RegisterMessage((*WantL2MacsEventsReply)(nil), "want_l2_macs_events_reply_e8d4e804")
3227 // Messages returns list of all messages in this module.
3228 func AllMessages() []api.Message {
3229 return []api.Message{
3230 (*BdIPMacAddDel)(nil),
3231 (*BdIPMacAddDelReply)(nil),
3232 (*BdIPMacDetails)(nil),
3233 (*BdIPMacDump)(nil),
3234 (*BdIPMacFlush)(nil),
3235 (*BdIPMacFlushReply)(nil),
3236 (*BridgeDomainAddDel)(nil),
3237 (*BridgeDomainAddDelReply)(nil),
3238 (*BridgeDomainDetails)(nil),
3239 (*BridgeDomainDump)(nil),
3240 (*BridgeDomainSetMacAge)(nil),
3241 (*BridgeDomainSetMacAgeReply)(nil),
3242 (*BridgeFlags)(nil),
3243 (*BridgeFlagsReply)(nil),
3245 (*BviCreateReply)(nil),
3247 (*BviDeleteReply)(nil),
3248 (*L2ArpTermEvent)(nil),
3249 (*L2FibClearTable)(nil),
3250 (*L2FibClearTableReply)(nil),
3251 (*L2FibTableDetails)(nil),
3252 (*L2FibTableDump)(nil),
3254 (*L2FlagsReply)(nil),
3255 (*L2InterfaceEfpFilter)(nil),
3256 (*L2InterfaceEfpFilterReply)(nil),
3257 (*L2InterfacePbbTagRewrite)(nil),
3258 (*L2InterfacePbbTagRewriteReply)(nil),
3259 (*L2InterfaceVlanTagRewrite)(nil),
3260 (*L2InterfaceVlanTagRewriteReply)(nil),
3261 (*L2MacsEvent)(nil),
3262 (*L2PatchAddDel)(nil),
3263 (*L2PatchAddDelReply)(nil),
3264 (*L2XconnectDetails)(nil),
3265 (*L2XconnectDump)(nil),
3266 (*L2fibAddDel)(nil),
3267 (*L2fibAddDelReply)(nil),
3268 (*L2fibFlushAll)(nil),
3269 (*L2fibFlushAllReply)(nil),
3270 (*L2fibFlushBd)(nil),
3271 (*L2fibFlushBdReply)(nil),
3272 (*L2fibFlushInt)(nil),
3273 (*L2fibFlushIntReply)(nil),
3274 (*SwInterfaceSetL2Bridge)(nil),
3275 (*SwInterfaceSetL2BridgeReply)(nil),
3276 (*SwInterfaceSetL2Xconnect)(nil),
3277 (*SwInterfaceSetL2XconnectReply)(nil),
3278 (*SwInterfaceSetVpath)(nil),
3279 (*SwInterfaceSetVpathReply)(nil),
3280 (*WantL2ArpTermEvents)(nil),
3281 (*WantL2ArpTermEventsReply)(nil),
3282 (*WantL2MacsEvents)(nil),
3283 (*WantL2MacsEventsReply)(nil),