1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/core/interface.api.json
7 // Package interfaces contains generated bindings for API file interface.api.
20 api "git.fd.io/govpp.git/api"
21 codec "git.fd.io/govpp.git/codec"
27 // This is a compile-time assertion to ensure that this generated file
28 // is compatible with the GoVPP api package it is being compiled against.
29 // A compilation error at this line likely means your copy of the
30 // GoVPP api package needs to be updated.
31 const _ = api.GoVppAPIPackageIsVersion2
36 VersionCrc = 0xfebc3ffa
39 // AddressFamily defines enum 'address_family'.
40 type AddressFamily uint32
43 ADDRESS_IP4 AddressFamily = 0
44 ADDRESS_IP6 AddressFamily = 1
48 AddressFamily_name = map[uint32]string{
52 AddressFamily_value = map[string]uint32{
58 func (x AddressFamily) String() string {
59 s, ok := AddressFamily_name[uint32(x)]
63 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
66 // IfStatusFlags defines enum 'if_status_flags'.
67 type IfStatusFlags uint32
70 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
71 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
75 IfStatusFlags_name = map[uint32]string{
76 1: "IF_STATUS_API_FLAG_ADMIN_UP",
77 2: "IF_STATUS_API_FLAG_LINK_UP",
79 IfStatusFlags_value = map[string]uint32{
80 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
81 "IF_STATUS_API_FLAG_LINK_UP": 2,
85 func (x IfStatusFlags) String() string {
86 s, ok := IfStatusFlags_name[uint32(x)]
90 str := func(n uint32) string {
91 s, ok := IfStatusFlags_name[uint32(n)]
95 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
97 for i := uint32(0); i <= 32; i++ {
107 return str(uint32(x))
112 // IfType defines enum 'if_type'.
116 IF_API_TYPE_HARDWARE IfType = 1
117 IF_API_TYPE_SUB IfType = 2
118 IF_API_TYPE_P2P IfType = 3
119 IF_API_TYPE_PIPE IfType = 4
123 IfType_name = map[uint32]string{
124 1: "IF_API_TYPE_HARDWARE",
125 2: "IF_API_TYPE_SUB",
126 3: "IF_API_TYPE_P2P",
127 4: "IF_API_TYPE_PIPE",
129 IfType_value = map[string]uint32{
130 "IF_API_TYPE_HARDWARE": 1,
131 "IF_API_TYPE_SUB": 2,
132 "IF_API_TYPE_P2P": 3,
133 "IF_API_TYPE_PIPE": 4,
137 func (x IfType) String() string {
138 s, ok := IfType_name[uint32(x)]
142 return "IfType(" + strconv.Itoa(int(x)) + ")"
145 // IPDscp defines enum 'ip_dscp'.
149 IP_API_DSCP_CS0 IPDscp = 0
150 IP_API_DSCP_CS1 IPDscp = 8
151 IP_API_DSCP_AF11 IPDscp = 10
152 IP_API_DSCP_AF12 IPDscp = 12
153 IP_API_DSCP_AF13 IPDscp = 14
154 IP_API_DSCP_CS2 IPDscp = 16
155 IP_API_DSCP_AF21 IPDscp = 18
156 IP_API_DSCP_AF22 IPDscp = 20
157 IP_API_DSCP_AF23 IPDscp = 22
158 IP_API_DSCP_CS3 IPDscp = 24
159 IP_API_DSCP_AF31 IPDscp = 26
160 IP_API_DSCP_AF32 IPDscp = 28
161 IP_API_DSCP_AF33 IPDscp = 30
162 IP_API_DSCP_CS4 IPDscp = 32
163 IP_API_DSCP_AF41 IPDscp = 34
164 IP_API_DSCP_AF42 IPDscp = 36
165 IP_API_DSCP_AF43 IPDscp = 38
166 IP_API_DSCP_CS5 IPDscp = 40
167 IP_API_DSCP_EF IPDscp = 46
168 IP_API_DSCP_CS6 IPDscp = 48
169 IP_API_DSCP_CS7 IPDscp = 50
173 IPDscp_name = map[uint8]string{
174 0: "IP_API_DSCP_CS0",
175 8: "IP_API_DSCP_CS1",
176 10: "IP_API_DSCP_AF11",
177 12: "IP_API_DSCP_AF12",
178 14: "IP_API_DSCP_AF13",
179 16: "IP_API_DSCP_CS2",
180 18: "IP_API_DSCP_AF21",
181 20: "IP_API_DSCP_AF22",
182 22: "IP_API_DSCP_AF23",
183 24: "IP_API_DSCP_CS3",
184 26: "IP_API_DSCP_AF31",
185 28: "IP_API_DSCP_AF32",
186 30: "IP_API_DSCP_AF33",
187 32: "IP_API_DSCP_CS4",
188 34: "IP_API_DSCP_AF41",
189 36: "IP_API_DSCP_AF42",
190 38: "IP_API_DSCP_AF43",
191 40: "IP_API_DSCP_CS5",
192 46: "IP_API_DSCP_EF",
193 48: "IP_API_DSCP_CS6",
194 50: "IP_API_DSCP_CS7",
196 IPDscp_value = map[string]uint8{
197 "IP_API_DSCP_CS0": 0,
198 "IP_API_DSCP_CS1": 8,
199 "IP_API_DSCP_AF11": 10,
200 "IP_API_DSCP_AF12": 12,
201 "IP_API_DSCP_AF13": 14,
202 "IP_API_DSCP_CS2": 16,
203 "IP_API_DSCP_AF21": 18,
204 "IP_API_DSCP_AF22": 20,
205 "IP_API_DSCP_AF23": 22,
206 "IP_API_DSCP_CS3": 24,
207 "IP_API_DSCP_AF31": 26,
208 "IP_API_DSCP_AF32": 28,
209 "IP_API_DSCP_AF33": 30,
210 "IP_API_DSCP_CS4": 32,
211 "IP_API_DSCP_AF41": 34,
212 "IP_API_DSCP_AF42": 36,
213 "IP_API_DSCP_AF43": 38,
214 "IP_API_DSCP_CS5": 40,
215 "IP_API_DSCP_EF": 46,
216 "IP_API_DSCP_CS6": 48,
217 "IP_API_DSCP_CS7": 50,
221 func (x IPDscp) String() string {
222 s, ok := IPDscp_name[uint8(x)]
226 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
229 // IPEcn defines enum 'ip_ecn'.
233 IP_API_ECN_NONE IPEcn = 0
234 IP_API_ECN_ECT0 IPEcn = 1
235 IP_API_ECN_ECT1 IPEcn = 2
236 IP_API_ECN_CE IPEcn = 3
240 IPEcn_name = map[uint8]string{
241 0: "IP_API_ECN_NONE",
242 1: "IP_API_ECN_ECT0",
243 2: "IP_API_ECN_ECT1",
246 IPEcn_value = map[string]uint8{
247 "IP_API_ECN_NONE": 0,
248 "IP_API_ECN_ECT0": 1,
249 "IP_API_ECN_ECT1": 2,
254 func (x IPEcn) String() string {
255 s, ok := IPEcn_name[uint8(x)]
259 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
262 // IPProto defines enum 'ip_proto'.
266 IP_API_PROTO_HOPOPT IPProto = 0
267 IP_API_PROTO_ICMP IPProto = 1
268 IP_API_PROTO_IGMP IPProto = 2
269 IP_API_PROTO_TCP IPProto = 6
270 IP_API_PROTO_UDP IPProto = 17
271 IP_API_PROTO_GRE IPProto = 47
272 IP_API_PROTO_AH IPProto = 50
273 IP_API_PROTO_ESP IPProto = 51
274 IP_API_PROTO_EIGRP IPProto = 88
275 IP_API_PROTO_OSPF IPProto = 89
276 IP_API_PROTO_SCTP IPProto = 132
277 IP_API_PROTO_RESERVED IPProto = 255
281 IPProto_name = map[uint32]string{
282 0: "IP_API_PROTO_HOPOPT",
283 1: "IP_API_PROTO_ICMP",
284 2: "IP_API_PROTO_IGMP",
285 6: "IP_API_PROTO_TCP",
286 17: "IP_API_PROTO_UDP",
287 47: "IP_API_PROTO_GRE",
288 50: "IP_API_PROTO_AH",
289 51: "IP_API_PROTO_ESP",
290 88: "IP_API_PROTO_EIGRP",
291 89: "IP_API_PROTO_OSPF",
292 132: "IP_API_PROTO_SCTP",
293 255: "IP_API_PROTO_RESERVED",
295 IPProto_value = map[string]uint32{
296 "IP_API_PROTO_HOPOPT": 0,
297 "IP_API_PROTO_ICMP": 1,
298 "IP_API_PROTO_IGMP": 2,
299 "IP_API_PROTO_TCP": 6,
300 "IP_API_PROTO_UDP": 17,
301 "IP_API_PROTO_GRE": 47,
302 "IP_API_PROTO_AH": 50,
303 "IP_API_PROTO_ESP": 51,
304 "IP_API_PROTO_EIGRP": 88,
305 "IP_API_PROTO_OSPF": 89,
306 "IP_API_PROTO_SCTP": 132,
307 "IP_API_PROTO_RESERVED": 255,
311 func (x IPProto) String() string {
312 s, ok := IPProto_name[uint32(x)]
316 return "IPProto(" + strconv.Itoa(int(x)) + ")"
319 // LinkDuplex defines enum 'link_duplex'.
320 type LinkDuplex uint32
323 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
324 LINK_DUPLEX_API_HALF LinkDuplex = 1
325 LINK_DUPLEX_API_FULL LinkDuplex = 2
329 LinkDuplex_name = map[uint32]string{
330 0: "LINK_DUPLEX_API_UNKNOWN",
331 1: "LINK_DUPLEX_API_HALF",
332 2: "LINK_DUPLEX_API_FULL",
334 LinkDuplex_value = map[string]uint32{
335 "LINK_DUPLEX_API_UNKNOWN": 0,
336 "LINK_DUPLEX_API_HALF": 1,
337 "LINK_DUPLEX_API_FULL": 2,
341 func (x LinkDuplex) String() string {
342 s, ok := LinkDuplex_name[uint32(x)]
346 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
349 // MtuProto defines enum 'mtu_proto'.
353 MTU_PROTO_API_L3 MtuProto = 1
354 MTU_PROTO_API_IP4 MtuProto = 2
355 MTU_PROTO_API_IP6 MtuProto = 3
356 MTU_PROTO_API_MPLS MtuProto = 4
357 MTU_PROTO_API_N MtuProto = 5
361 MtuProto_name = map[uint32]string{
362 1: "MTU_PROTO_API_L3",
363 2: "MTU_PROTO_API_IP4",
364 3: "MTU_PROTO_API_IP6",
365 4: "MTU_PROTO_API_MPLS",
366 5: "MTU_PROTO_API_N",
368 MtuProto_value = map[string]uint32{
369 "MTU_PROTO_API_L3": 1,
370 "MTU_PROTO_API_IP4": 2,
371 "MTU_PROTO_API_IP6": 3,
372 "MTU_PROTO_API_MPLS": 4,
373 "MTU_PROTO_API_N": 5,
377 func (x MtuProto) String() string {
378 s, ok := MtuProto_name[uint32(x)]
382 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
385 // RxMode defines enum 'rx_mode'.
389 RX_MODE_API_UNKNOWN RxMode = 0
390 RX_MODE_API_POLLING RxMode = 1
391 RX_MODE_API_INTERRUPT RxMode = 2
392 RX_MODE_API_ADAPTIVE RxMode = 3
393 RX_MODE_API_DEFAULT RxMode = 4
397 RxMode_name = map[uint32]string{
398 0: "RX_MODE_API_UNKNOWN",
399 1: "RX_MODE_API_POLLING",
400 2: "RX_MODE_API_INTERRUPT",
401 3: "RX_MODE_API_ADAPTIVE",
402 4: "RX_MODE_API_DEFAULT",
404 RxMode_value = map[string]uint32{
405 "RX_MODE_API_UNKNOWN": 0,
406 "RX_MODE_API_POLLING": 1,
407 "RX_MODE_API_INTERRUPT": 2,
408 "RX_MODE_API_ADAPTIVE": 3,
409 "RX_MODE_API_DEFAULT": 4,
413 func (x RxMode) String() string {
414 s, ok := RxMode_name[uint32(x)]
418 return "RxMode(" + strconv.Itoa(int(x)) + ")"
421 // SubIfFlags defines enum 'sub_if_flags'.
422 type SubIfFlags uint32
425 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
426 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
427 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
428 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
429 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
430 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
431 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
432 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
433 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
434 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
438 SubIfFlags_name = map[uint32]string{
439 1: "SUB_IF_API_FLAG_NO_TAGS",
440 2: "SUB_IF_API_FLAG_ONE_TAG",
441 4: "SUB_IF_API_FLAG_TWO_TAGS",
442 8: "SUB_IF_API_FLAG_DOT1AD",
443 16: "SUB_IF_API_FLAG_EXACT_MATCH",
444 32: "SUB_IF_API_FLAG_DEFAULT",
445 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
446 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
447 254: "SUB_IF_API_FLAG_MASK_VNET",
448 256: "SUB_IF_API_FLAG_DOT1AH",
450 SubIfFlags_value = map[string]uint32{
451 "SUB_IF_API_FLAG_NO_TAGS": 1,
452 "SUB_IF_API_FLAG_ONE_TAG": 2,
453 "SUB_IF_API_FLAG_TWO_TAGS": 4,
454 "SUB_IF_API_FLAG_DOT1AD": 8,
455 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
456 "SUB_IF_API_FLAG_DEFAULT": 32,
457 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
458 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
459 "SUB_IF_API_FLAG_MASK_VNET": 254,
460 "SUB_IF_API_FLAG_DOT1AH": 256,
464 func (x SubIfFlags) String() string {
465 s, ok := SubIfFlags_name[uint32(x)]
469 str := func(n uint32) string {
470 s, ok := SubIfFlags_name[uint32(n)]
474 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
476 for i := uint32(0); i <= 32; i++ {
486 return str(uint32(x))
491 // AddressWithPrefix defines alias 'address_with_prefix'.
492 type AddressWithPrefix Prefix
494 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
495 prefix, err := ParsePrefix(s)
497 return AddressWithPrefix{}, err
499 return AddressWithPrefix(prefix), nil
501 func (x AddressWithPrefix) String() string {
502 return Prefix(x).String()
504 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
505 return []byte(x.String()), nil
507 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
508 prefix, err := ParseAddressWithPrefix(string(text))
516 // InterfaceIndex defines alias 'interface_index'.
517 type InterfaceIndex uint32
519 // IP4Address defines alias 'ip4_address'.
520 type IP4Address [4]uint8
522 func ParseIP4Address(s string) (IP4Address, error) {
523 ip := net.ParseIP(s).To4()
525 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
527 var ipaddr IP4Address
528 copy(ipaddr[:], ip.To4())
532 func (x IP4Address) ToIP() net.IP {
533 return net.IP(x[:]).To4()
535 func (x IP4Address) String() string {
536 return x.ToIP().String()
538 func (x *IP4Address) MarshalText() ([]byte, error) {
539 return []byte(x.String()), nil
541 func (x *IP4Address) UnmarshalText(text []byte) error {
542 ipaddr, err := ParseIP4Address(string(text))
550 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
551 type IP4AddressWithPrefix IP4Prefix
553 // IP6Address defines alias 'ip6_address'.
554 type IP6Address [16]uint8
556 func ParseIP6Address(s string) (IP6Address, error) {
557 ip := net.ParseIP(s).To16()
559 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
561 var ipaddr IP6Address
562 copy(ipaddr[:], ip.To16())
566 func (x IP6Address) ToIP() net.IP {
567 return net.IP(x[:]).To16()
569 func (x IP6Address) String() string {
570 return x.ToIP().String()
572 func (x *IP6Address) MarshalText() ([]byte, error) {
573 return []byte(x.String()), nil
575 func (x *IP6Address) UnmarshalText(text []byte) error {
576 ipaddr, err := ParseIP6Address(string(text))
584 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
585 type IP6AddressWithPrefix IP6Prefix
587 // MacAddress defines alias 'mac_address'.
588 type MacAddress [6]uint8
590 func ParseMacAddress(s string) (MacAddress, error) {
591 var macaddr MacAddress
592 mac, err := net.ParseMAC(s)
596 copy(macaddr[:], mac[:])
599 func (x MacAddress) ToMAC() net.HardwareAddr {
600 return net.HardwareAddr(x[:])
602 func (x MacAddress) String() string {
603 return x.ToMAC().String()
605 func (x *MacAddress) MarshalText() ([]byte, error) {
606 return []byte(x.String()), nil
608 func (x *MacAddress) UnmarshalText(text []byte) error {
609 mac, err := ParseMacAddress(string(text))
617 // Address defines type 'address'.
618 type Address struct {
619 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
620 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
623 func ParseAddress(s string) (Address, error) {
626 return Address{}, fmt.Errorf("invalid address: %s", s)
630 addr.Af = ADDRESS_IP6
632 copy(ip6[:], ip.To16())
635 addr.Af = ADDRESS_IP4
637 copy(ip4[:], ip.To4())
642 func (x Address) ToIP() net.IP {
643 if x.Af == ADDRESS_IP6 {
645 return net.IP(ip6[:]).To16()
648 return net.IP(ip4[:]).To4()
651 func (x Address) String() string {
652 return x.ToIP().String()
654 func (x *Address) MarshalText() ([]byte, error) {
655 return []byte(x.String()), nil
657 func (x *Address) UnmarshalText(text []byte) error {
658 addr, err := ParseAddress(string(text))
666 // IP4Prefix defines type 'ip4_prefix'.
667 type IP4Prefix struct {
668 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
669 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
672 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
673 hasPrefix := strings.Contains(s, "/")
675 ip, network, err := net.ParseCIDR(s)
677 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
679 maskSize, _ := network.Mask.Size()
680 prefix.Len = byte(maskSize)
681 prefix.Address, err = ParseIP4Address(ip.String())
683 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
687 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
689 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
691 prefix.Len = byte(defaultMaskSize)
692 prefix.Address, err = ParseIP4Address(ip.String())
694 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
699 func (x IP4Prefix) ToIPNet() *net.IPNet {
700 mask := net.CIDRMask(int(x.Len), 32)
701 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
704 func (x IP4Prefix) String() string {
705 ip := x.Address.String()
706 return ip + "/" + strconv.Itoa(int(x.Len))
708 func (x *IP4Prefix) MarshalText() ([]byte, error) {
709 return []byte(x.String()), nil
711 func (x *IP4Prefix) UnmarshalText(text []byte) error {
712 prefix, err := ParseIP4Prefix(string(text))
720 // IP6Prefix defines type 'ip6_prefix'.
721 type IP6Prefix struct {
722 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
723 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
726 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
727 hasPrefix := strings.Contains(s, "/")
729 ip, network, err := net.ParseCIDR(s)
731 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
733 maskSize, _ := network.Mask.Size()
734 prefix.Len = byte(maskSize)
735 prefix.Address, err = ParseIP6Address(ip.String())
737 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
741 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
743 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
745 prefix.Len = byte(defaultMaskSize)
746 prefix.Address, err = ParseIP6Address(ip.String())
748 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
753 func (x IP6Prefix) ToIPNet() *net.IPNet {
754 mask := net.CIDRMask(int(x.Len), 128)
755 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
758 func (x IP6Prefix) String() string {
759 ip := x.Address.String()
760 return ip + "/" + strconv.Itoa(int(x.Len))
762 func (x *IP6Prefix) MarshalText() ([]byte, error) {
763 return []byte(x.String()), nil
765 func (x *IP6Prefix) UnmarshalText(text []byte) error {
766 prefix, err := ParseIP6Prefix(string(text))
774 // Mprefix defines type 'mprefix'.
775 type Mprefix struct {
776 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
777 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
778 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
779 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
782 // Prefix defines type 'prefix'.
784 Address Address `binapi:"address,name=address" json:"address,omitempty"`
785 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
788 func ParsePrefix(ip string) (prefix Prefix, err error) {
789 hasPrefix := strings.Contains(ip, "/")
791 netIP, network, err := net.ParseCIDR(ip)
793 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
795 maskSize, _ := network.Mask.Size()
796 prefix.Len = byte(maskSize)
797 prefix.Address, err = ParseAddress(netIP.String())
799 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
802 netIP := net.ParseIP(ip)
803 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
804 if netIP.To4() == nil {
805 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
807 prefix.Len = byte(defaultMaskSize)
808 prefix.Address, err = ParseAddress(netIP.String())
810 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
815 func (x Prefix) ToIPNet() *net.IPNet {
817 if x.Address.Af == ADDRESS_IP4 {
818 mask = net.CIDRMask(int(x.Len), 32)
820 mask = net.CIDRMask(int(x.Len), 128)
822 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
825 func (x Prefix) String() string {
826 ip := x.Address.String()
827 return ip + "/" + strconv.Itoa(int(x.Len))
829 func (x *Prefix) MarshalText() ([]byte, error) {
830 return []byte(x.String()), nil
832 func (x *Prefix) UnmarshalText(text []byte) error {
833 prefix, err := ParsePrefix(string(text))
841 // PrefixMatcher defines type 'prefix_matcher'.
842 type PrefixMatcher struct {
843 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
844 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
847 // AddressUnion defines union 'address_union'.
848 type AddressUnion struct {
851 XXX_UnionData [16]byte
854 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
858 func (u *AddressUnion) SetIP4(a IP4Address) {
859 buf := codec.NewBuffer(u.XXX_UnionData[:])
860 buf.EncodeBytes(a[:], 4)
862 func (u *AddressUnion) GetIP4() (a IP4Address) {
863 buf := codec.NewBuffer(u.XXX_UnionData[:])
864 copy(a[:], buf.DecodeBytes(4))
868 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
872 func (u *AddressUnion) SetIP6(a IP6Address) {
873 buf := codec.NewBuffer(u.XXX_UnionData[:])
874 buf.EncodeBytes(a[:], 16)
876 func (u *AddressUnion) GetIP6() (a IP6Address) {
877 buf := codec.NewBuffer(u.XXX_UnionData[:])
878 copy(a[:], buf.DecodeBytes(16))
882 // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'.
883 type CollectDetailedInterfaceStats struct {
884 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
885 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
888 func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
889 func (*CollectDetailedInterfaceStats) GetMessageName() string {
890 return "collect_detailed_interface_stats"
892 func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" }
893 func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType {
894 return api.RequestMessage
897 func (m *CollectDetailedInterfaceStats) Size() (size int) {
901 size += 4 // m.SwIfIndex
902 size += 1 // m.EnableDisable
905 func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) {
907 b = make([]byte, m.Size())
909 buf := codec.NewBuffer(b)
910 buf.EncodeUint32(uint32(m.SwIfIndex))
911 buf.EncodeBool(m.EnableDisable)
912 return buf.Bytes(), nil
914 func (m *CollectDetailedInterfaceStats) Unmarshal(b []byte) error {
915 buf := codec.NewBuffer(b)
916 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
917 m.EnableDisable = buf.DecodeBool()
921 // CollectDetailedInterfaceStatsReply defines message 'collect_detailed_interface_stats_reply'.
922 type CollectDetailedInterfaceStatsReply struct {
923 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
926 func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} }
927 func (*CollectDetailedInterfaceStatsReply) GetMessageName() string {
928 return "collect_detailed_interface_stats_reply"
930 func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" }
931 func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType {
932 return api.ReplyMessage
935 func (m *CollectDetailedInterfaceStatsReply) Size() (size int) {
939 size += 4 // m.Retval
942 func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) {
944 b = make([]byte, m.Size())
946 buf := codec.NewBuffer(b)
947 buf.EncodeInt32(m.Retval)
948 return buf.Bytes(), nil
950 func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error {
951 buf := codec.NewBuffer(b)
952 m.Retval = buf.DecodeInt32()
956 // CreateLoopback defines message 'create_loopback'.
957 type CreateLoopback struct {
958 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
961 func (m *CreateLoopback) Reset() { *m = CreateLoopback{} }
962 func (*CreateLoopback) GetMessageName() string { return "create_loopback" }
963 func (*CreateLoopback) GetCrcString() string { return "42bb5d22" }
964 func (*CreateLoopback) GetMessageType() api.MessageType {
965 return api.RequestMessage
968 func (m *CreateLoopback) Size() (size int) {
972 size += 1 * 6 // m.MacAddress
975 func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) {
977 b = make([]byte, m.Size())
979 buf := codec.NewBuffer(b)
980 buf.EncodeBytes(m.MacAddress[:], 6)
981 return buf.Bytes(), nil
983 func (m *CreateLoopback) Unmarshal(b []byte) error {
984 buf := codec.NewBuffer(b)
985 copy(m.MacAddress[:], buf.DecodeBytes(6))
989 // CreateLoopbackInstance defines message 'create_loopback_instance'.
990 type CreateLoopbackInstance struct {
991 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
992 IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
993 UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
996 func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} }
997 func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" }
998 func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" }
999 func (*CreateLoopbackInstance) GetMessageType() api.MessageType {
1000 return api.RequestMessage
1003 func (m *CreateLoopbackInstance) Size() (size int) {
1007 size += 1 * 6 // m.MacAddress
1008 size += 1 // m.IsSpecified
1009 size += 4 // m.UserInstance
1012 func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) {
1014 b = make([]byte, m.Size())
1016 buf := codec.NewBuffer(b)
1017 buf.EncodeBytes(m.MacAddress[:], 6)
1018 buf.EncodeBool(m.IsSpecified)
1019 buf.EncodeUint32(m.UserInstance)
1020 return buf.Bytes(), nil
1022 func (m *CreateLoopbackInstance) Unmarshal(b []byte) error {
1023 buf := codec.NewBuffer(b)
1024 copy(m.MacAddress[:], buf.DecodeBytes(6))
1025 m.IsSpecified = buf.DecodeBool()
1026 m.UserInstance = buf.DecodeUint32()
1030 // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'.
1031 type CreateLoopbackInstanceReply struct {
1032 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1033 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1036 func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} }
1037 func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" }
1038 func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" }
1039 func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType {
1040 return api.ReplyMessage
1043 func (m *CreateLoopbackInstanceReply) Size() (size int) {
1047 size += 4 // m.Retval
1048 size += 4 // m.SwIfIndex
1051 func (m *CreateLoopbackInstanceReply) Marshal(b []byte) ([]byte, error) {
1053 b = make([]byte, m.Size())
1055 buf := codec.NewBuffer(b)
1056 buf.EncodeInt32(m.Retval)
1057 buf.EncodeUint32(uint32(m.SwIfIndex))
1058 return buf.Bytes(), nil
1060 func (m *CreateLoopbackInstanceReply) Unmarshal(b []byte) error {
1061 buf := codec.NewBuffer(b)
1062 m.Retval = buf.DecodeInt32()
1063 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1067 // CreateLoopbackReply defines message 'create_loopback_reply'.
1068 type CreateLoopbackReply struct {
1069 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1070 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1073 func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} }
1074 func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" }
1075 func (*CreateLoopbackReply) GetCrcString() string { return "5383d31f" }
1076 func (*CreateLoopbackReply) GetMessageType() api.MessageType {
1077 return api.ReplyMessage
1080 func (m *CreateLoopbackReply) Size() (size int) {
1084 size += 4 // m.Retval
1085 size += 4 // m.SwIfIndex
1088 func (m *CreateLoopbackReply) Marshal(b []byte) ([]byte, error) {
1090 b = make([]byte, m.Size())
1092 buf := codec.NewBuffer(b)
1093 buf.EncodeInt32(m.Retval)
1094 buf.EncodeUint32(uint32(m.SwIfIndex))
1095 return buf.Bytes(), nil
1097 func (m *CreateLoopbackReply) Unmarshal(b []byte) error {
1098 buf := codec.NewBuffer(b)
1099 m.Retval = buf.DecodeInt32()
1100 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1104 // CreateSubif defines message 'create_subif'.
1105 type CreateSubif struct {
1106 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1107 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
1108 SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
1109 OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
1110 InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
1113 func (m *CreateSubif) Reset() { *m = CreateSubif{} }
1114 func (*CreateSubif) GetMessageName() string { return "create_subif" }
1115 func (*CreateSubif) GetCrcString() string { return "cb371063" }
1116 func (*CreateSubif) GetMessageType() api.MessageType {
1117 return api.RequestMessage
1120 func (m *CreateSubif) Size() (size int) {
1124 size += 4 // m.SwIfIndex
1125 size += 4 // m.SubID
1126 size += 4 // m.SubIfFlags
1127 size += 2 // m.OuterVlanID
1128 size += 2 // m.InnerVlanID
1131 func (m *CreateSubif) Marshal(b []byte) ([]byte, error) {
1133 b = make([]byte, m.Size())
1135 buf := codec.NewBuffer(b)
1136 buf.EncodeUint32(uint32(m.SwIfIndex))
1137 buf.EncodeUint32(m.SubID)
1138 buf.EncodeUint32(uint32(m.SubIfFlags))
1139 buf.EncodeUint16(m.OuterVlanID)
1140 buf.EncodeUint16(m.InnerVlanID)
1141 return buf.Bytes(), nil
1143 func (m *CreateSubif) Unmarshal(b []byte) error {
1144 buf := codec.NewBuffer(b)
1145 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1146 m.SubID = buf.DecodeUint32()
1147 m.SubIfFlags = SubIfFlags(buf.DecodeUint32())
1148 m.OuterVlanID = buf.DecodeUint16()
1149 m.InnerVlanID = buf.DecodeUint16()
1153 // CreateSubifReply defines message 'create_subif_reply'.
1154 type CreateSubifReply struct {
1155 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1156 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1159 func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} }
1160 func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" }
1161 func (*CreateSubifReply) GetCrcString() string { return "5383d31f" }
1162 func (*CreateSubifReply) GetMessageType() api.MessageType {
1163 return api.ReplyMessage
1166 func (m *CreateSubifReply) Size() (size int) {
1170 size += 4 // m.Retval
1171 size += 4 // m.SwIfIndex
1174 func (m *CreateSubifReply) Marshal(b []byte) ([]byte, error) {
1176 b = make([]byte, m.Size())
1178 buf := codec.NewBuffer(b)
1179 buf.EncodeInt32(m.Retval)
1180 buf.EncodeUint32(uint32(m.SwIfIndex))
1181 return buf.Bytes(), nil
1183 func (m *CreateSubifReply) Unmarshal(b []byte) error {
1184 buf := codec.NewBuffer(b)
1185 m.Retval = buf.DecodeInt32()
1186 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1190 // CreateVlanSubif defines message 'create_vlan_subif'.
1191 type CreateVlanSubif struct {
1192 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1193 VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
1196 func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} }
1197 func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" }
1198 func (*CreateVlanSubif) GetCrcString() string { return "af34ac8b" }
1199 func (*CreateVlanSubif) GetMessageType() api.MessageType {
1200 return api.RequestMessage
1203 func (m *CreateVlanSubif) Size() (size int) {
1207 size += 4 // m.SwIfIndex
1208 size += 4 // m.VlanID
1211 func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) {
1213 b = make([]byte, m.Size())
1215 buf := codec.NewBuffer(b)
1216 buf.EncodeUint32(uint32(m.SwIfIndex))
1217 buf.EncodeUint32(m.VlanID)
1218 return buf.Bytes(), nil
1220 func (m *CreateVlanSubif) Unmarshal(b []byte) error {
1221 buf := codec.NewBuffer(b)
1222 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1223 m.VlanID = buf.DecodeUint32()
1227 // CreateVlanSubifReply defines message 'create_vlan_subif_reply'.
1228 type CreateVlanSubifReply struct {
1229 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1230 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1233 func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} }
1234 func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" }
1235 func (*CreateVlanSubifReply) GetCrcString() string { return "5383d31f" }
1236 func (*CreateVlanSubifReply) GetMessageType() api.MessageType {
1237 return api.ReplyMessage
1240 func (m *CreateVlanSubifReply) Size() (size int) {
1244 size += 4 // m.Retval
1245 size += 4 // m.SwIfIndex
1248 func (m *CreateVlanSubifReply) Marshal(b []byte) ([]byte, error) {
1250 b = make([]byte, m.Size())
1252 buf := codec.NewBuffer(b)
1253 buf.EncodeInt32(m.Retval)
1254 buf.EncodeUint32(uint32(m.SwIfIndex))
1255 return buf.Bytes(), nil
1257 func (m *CreateVlanSubifReply) Unmarshal(b []byte) error {
1258 buf := codec.NewBuffer(b)
1259 m.Retval = buf.DecodeInt32()
1260 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1264 // DeleteLoopback defines message 'delete_loopback'.
1265 type DeleteLoopback struct {
1266 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1269 func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} }
1270 func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" }
1271 func (*DeleteLoopback) GetCrcString() string { return "f9e6675e" }
1272 func (*DeleteLoopback) GetMessageType() api.MessageType {
1273 return api.RequestMessage
1276 func (m *DeleteLoopback) Size() (size int) {
1280 size += 4 // m.SwIfIndex
1283 func (m *DeleteLoopback) Marshal(b []byte) ([]byte, error) {
1285 b = make([]byte, m.Size())
1287 buf := codec.NewBuffer(b)
1288 buf.EncodeUint32(uint32(m.SwIfIndex))
1289 return buf.Bytes(), nil
1291 func (m *DeleteLoopback) Unmarshal(b []byte) error {
1292 buf := codec.NewBuffer(b)
1293 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1297 // DeleteLoopbackReply defines message 'delete_loopback_reply'.
1298 type DeleteLoopbackReply struct {
1299 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1302 func (m *DeleteLoopbackReply) Reset() { *m = DeleteLoopbackReply{} }
1303 func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" }
1304 func (*DeleteLoopbackReply) GetCrcString() string { return "e8d4e804" }
1305 func (*DeleteLoopbackReply) GetMessageType() api.MessageType {
1306 return api.ReplyMessage
1309 func (m *DeleteLoopbackReply) Size() (size int) {
1313 size += 4 // m.Retval
1316 func (m *DeleteLoopbackReply) Marshal(b []byte) ([]byte, error) {
1318 b = make([]byte, m.Size())
1320 buf := codec.NewBuffer(b)
1321 buf.EncodeInt32(m.Retval)
1322 return buf.Bytes(), nil
1324 func (m *DeleteLoopbackReply) Unmarshal(b []byte) error {
1325 buf := codec.NewBuffer(b)
1326 m.Retval = buf.DecodeInt32()
1330 // DeleteSubif defines message 'delete_subif'.
1331 type DeleteSubif struct {
1332 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1335 func (m *DeleteSubif) Reset() { *m = DeleteSubif{} }
1336 func (*DeleteSubif) GetMessageName() string { return "delete_subif" }
1337 func (*DeleteSubif) GetCrcString() string { return "f9e6675e" }
1338 func (*DeleteSubif) GetMessageType() api.MessageType {
1339 return api.RequestMessage
1342 func (m *DeleteSubif) Size() (size int) {
1346 size += 4 // m.SwIfIndex
1349 func (m *DeleteSubif) Marshal(b []byte) ([]byte, error) {
1351 b = make([]byte, m.Size())
1353 buf := codec.NewBuffer(b)
1354 buf.EncodeUint32(uint32(m.SwIfIndex))
1355 return buf.Bytes(), nil
1357 func (m *DeleteSubif) Unmarshal(b []byte) error {
1358 buf := codec.NewBuffer(b)
1359 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1363 // DeleteSubifReply defines message 'delete_subif_reply'.
1364 type DeleteSubifReply struct {
1365 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1368 func (m *DeleteSubifReply) Reset() { *m = DeleteSubifReply{} }
1369 func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" }
1370 func (*DeleteSubifReply) GetCrcString() string { return "e8d4e804" }
1371 func (*DeleteSubifReply) GetMessageType() api.MessageType {
1372 return api.ReplyMessage
1375 func (m *DeleteSubifReply) Size() (size int) {
1379 size += 4 // m.Retval
1382 func (m *DeleteSubifReply) Marshal(b []byte) ([]byte, error) {
1384 b = make([]byte, m.Size())
1386 buf := codec.NewBuffer(b)
1387 buf.EncodeInt32(m.Retval)
1388 return buf.Bytes(), nil
1390 func (m *DeleteSubifReply) Unmarshal(b []byte) error {
1391 buf := codec.NewBuffer(b)
1392 m.Retval = buf.DecodeInt32()
1396 // HwInterfaceSetMtu defines message 'hw_interface_set_mtu'.
1397 type HwInterfaceSetMtu struct {
1398 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1399 Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
1402 func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} }
1403 func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interface_set_mtu" }
1404 func (*HwInterfaceSetMtu) GetCrcString() string { return "e6746899" }
1405 func (*HwInterfaceSetMtu) GetMessageType() api.MessageType {
1406 return api.RequestMessage
1409 func (m *HwInterfaceSetMtu) Size() (size int) {
1413 size += 4 // m.SwIfIndex
1417 func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
1419 b = make([]byte, m.Size())
1421 buf := codec.NewBuffer(b)
1422 buf.EncodeUint32(uint32(m.SwIfIndex))
1423 buf.EncodeUint16(m.Mtu)
1424 return buf.Bytes(), nil
1426 func (m *HwInterfaceSetMtu) Unmarshal(b []byte) error {
1427 buf := codec.NewBuffer(b)
1428 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1429 m.Mtu = buf.DecodeUint16()
1433 // HwInterfaceSetMtuReply defines message 'hw_interface_set_mtu_reply'.
1434 type HwInterfaceSetMtuReply struct {
1435 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1438 func (m *HwInterfaceSetMtuReply) Reset() { *m = HwInterfaceSetMtuReply{} }
1439 func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_interface_set_mtu_reply" }
1440 func (*HwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
1441 func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType {
1442 return api.ReplyMessage
1445 func (m *HwInterfaceSetMtuReply) Size() (size int) {
1449 size += 4 // m.Retval
1452 func (m *HwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
1454 b = make([]byte, m.Size())
1456 buf := codec.NewBuffer(b)
1457 buf.EncodeInt32(m.Retval)
1458 return buf.Bytes(), nil
1460 func (m *HwInterfaceSetMtuReply) Unmarshal(b []byte) error {
1461 buf := codec.NewBuffer(b)
1462 m.Retval = buf.DecodeInt32()
1466 // InterfaceNameRenumber defines message 'interface_name_renumber'.
1467 type InterfaceNameRenumber struct {
1468 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1469 NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
1472 func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} }
1473 func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" }
1474 func (*InterfaceNameRenumber) GetCrcString() string { return "2b8858b8" }
1475 func (*InterfaceNameRenumber) GetMessageType() api.MessageType {
1476 return api.RequestMessage
1479 func (m *InterfaceNameRenumber) Size() (size int) {
1483 size += 4 // m.SwIfIndex
1484 size += 4 // m.NewShowDevInstance
1487 func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) {
1489 b = make([]byte, m.Size())
1491 buf := codec.NewBuffer(b)
1492 buf.EncodeUint32(uint32(m.SwIfIndex))
1493 buf.EncodeUint32(m.NewShowDevInstance)
1494 return buf.Bytes(), nil
1496 func (m *InterfaceNameRenumber) Unmarshal(b []byte) error {
1497 buf := codec.NewBuffer(b)
1498 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1499 m.NewShowDevInstance = buf.DecodeUint32()
1503 // InterfaceNameRenumberReply defines message 'interface_name_renumber_reply'.
1504 type InterfaceNameRenumberReply struct {
1505 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1508 func (m *InterfaceNameRenumberReply) Reset() { *m = InterfaceNameRenumberReply{} }
1509 func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" }
1510 func (*InterfaceNameRenumberReply) GetCrcString() string { return "e8d4e804" }
1511 func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType {
1512 return api.ReplyMessage
1515 func (m *InterfaceNameRenumberReply) Size() (size int) {
1519 size += 4 // m.Retval
1522 func (m *InterfaceNameRenumberReply) Marshal(b []byte) ([]byte, error) {
1524 b = make([]byte, m.Size())
1526 buf := codec.NewBuffer(b)
1527 buf.EncodeInt32(m.Retval)
1528 return buf.Bytes(), nil
1530 func (m *InterfaceNameRenumberReply) Unmarshal(b []byte) error {
1531 buf := codec.NewBuffer(b)
1532 m.Retval = buf.DecodeInt32()
1536 // SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'.
1537 type SwInterfaceAddDelAddress struct {
1538 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1539 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1540 DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"`
1541 Prefix AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
1544 func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} }
1545 func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_interface_add_del_address" }
1546 func (*SwInterfaceAddDelAddress) GetCrcString() string { return "5803d5c4" }
1547 func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType {
1548 return api.RequestMessage
1551 func (m *SwInterfaceAddDelAddress) Size() (size int) {
1555 size += 4 // m.SwIfIndex
1556 size += 1 // m.IsAdd
1557 size += 1 // m.DelAll
1558 size += 4 // m.Prefix.Address.Af
1559 size += 1 * 16 // m.Prefix.Address.Un
1560 size += 1 // m.Prefix.Len
1563 func (m *SwInterfaceAddDelAddress) Marshal(b []byte) ([]byte, error) {
1565 b = make([]byte, m.Size())
1567 buf := codec.NewBuffer(b)
1568 buf.EncodeUint32(uint32(m.SwIfIndex))
1569 buf.EncodeBool(m.IsAdd)
1570 buf.EncodeBool(m.DelAll)
1571 buf.EncodeUint32(uint32(m.Prefix.Address.Af))
1572 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
1573 buf.EncodeUint8(m.Prefix.Len)
1574 return buf.Bytes(), nil
1576 func (m *SwInterfaceAddDelAddress) Unmarshal(b []byte) error {
1577 buf := codec.NewBuffer(b)
1578 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1579 m.IsAdd = buf.DecodeBool()
1580 m.DelAll = buf.DecodeBool()
1581 m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
1582 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1583 m.Prefix.Len = buf.DecodeUint8()
1587 // SwInterfaceAddDelAddressReply defines message 'sw_interface_add_del_address_reply'.
1588 type SwInterfaceAddDelAddressReply struct {
1589 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1592 func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} }
1593 func (*SwInterfaceAddDelAddressReply) GetMessageName() string {
1594 return "sw_interface_add_del_address_reply"
1596 func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" }
1597 func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType {
1598 return api.ReplyMessage
1601 func (m *SwInterfaceAddDelAddressReply) Size() (size int) {
1605 size += 4 // m.Retval
1608 func (m *SwInterfaceAddDelAddressReply) Marshal(b []byte) ([]byte, error) {
1610 b = make([]byte, m.Size())
1612 buf := codec.NewBuffer(b)
1613 buf.EncodeInt32(m.Retval)
1614 return buf.Bytes(), nil
1616 func (m *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error {
1617 buf := codec.NewBuffer(b)
1618 m.Retval = buf.DecodeInt32()
1622 // SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'.
1623 type SwInterfaceAddDelMacAddress struct {
1624 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1625 Addr MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"`
1626 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1629 func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} }
1630 func (*SwInterfaceAddDelMacAddress) GetMessageName() string {
1631 return "sw_interface_add_del_mac_address"
1633 func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" }
1634 func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType {
1635 return api.RequestMessage
1638 func (m *SwInterfaceAddDelMacAddress) Size() (size int) {
1642 size += 4 // m.SwIfIndex
1643 size += 1 * 6 // m.Addr
1644 size += 1 // m.IsAdd
1647 func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) {
1649 b = make([]byte, m.Size())
1651 buf := codec.NewBuffer(b)
1652 buf.EncodeUint32(m.SwIfIndex)
1653 buf.EncodeBytes(m.Addr[:], 6)
1654 buf.EncodeUint8(m.IsAdd)
1655 return buf.Bytes(), nil
1657 func (m *SwInterfaceAddDelMacAddress) Unmarshal(b []byte) error {
1658 buf := codec.NewBuffer(b)
1659 m.SwIfIndex = buf.DecodeUint32()
1660 copy(m.Addr[:], buf.DecodeBytes(6))
1661 m.IsAdd = buf.DecodeUint8()
1665 // SwInterfaceAddDelMacAddressReply defines message 'sw_interface_add_del_mac_address_reply'.
1666 type SwInterfaceAddDelMacAddressReply struct {
1667 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1670 func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} }
1671 func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string {
1672 return "sw_interface_add_del_mac_address_reply"
1674 func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" }
1675 func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType {
1676 return api.ReplyMessage
1679 func (m *SwInterfaceAddDelMacAddressReply) Size() (size int) {
1683 size += 4 // m.Retval
1686 func (m *SwInterfaceAddDelMacAddressReply) Marshal(b []byte) ([]byte, error) {
1688 b = make([]byte, m.Size())
1690 buf := codec.NewBuffer(b)
1691 buf.EncodeInt32(m.Retval)
1692 return buf.Bytes(), nil
1694 func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error {
1695 buf := codec.NewBuffer(b)
1696 m.Retval = buf.DecodeInt32()
1700 // SwInterfaceClearStats defines message 'sw_interface_clear_stats'.
1701 type SwInterfaceClearStats struct {
1702 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1705 func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} }
1706 func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" }
1707 func (*SwInterfaceClearStats) GetCrcString() string { return "f9e6675e" }
1708 func (*SwInterfaceClearStats) GetMessageType() api.MessageType {
1709 return api.RequestMessage
1712 func (m *SwInterfaceClearStats) Size() (size int) {
1716 size += 4 // m.SwIfIndex
1719 func (m *SwInterfaceClearStats) Marshal(b []byte) ([]byte, error) {
1721 b = make([]byte, m.Size())
1723 buf := codec.NewBuffer(b)
1724 buf.EncodeUint32(uint32(m.SwIfIndex))
1725 return buf.Bytes(), nil
1727 func (m *SwInterfaceClearStats) Unmarshal(b []byte) error {
1728 buf := codec.NewBuffer(b)
1729 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1733 // SwInterfaceClearStatsReply defines message 'sw_interface_clear_stats_reply'.
1734 type SwInterfaceClearStatsReply struct {
1735 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1738 func (m *SwInterfaceClearStatsReply) Reset() { *m = SwInterfaceClearStatsReply{} }
1739 func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw_interface_clear_stats_reply" }
1740 func (*SwInterfaceClearStatsReply) GetCrcString() string { return "e8d4e804" }
1741 func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType {
1742 return api.ReplyMessage
1745 func (m *SwInterfaceClearStatsReply) Size() (size int) {
1749 size += 4 // m.Retval
1752 func (m *SwInterfaceClearStatsReply) Marshal(b []byte) ([]byte, error) {
1754 b = make([]byte, m.Size())
1756 buf := codec.NewBuffer(b)
1757 buf.EncodeInt32(m.Retval)
1758 return buf.Bytes(), nil
1760 func (m *SwInterfaceClearStatsReply) Unmarshal(b []byte) error {
1761 buf := codec.NewBuffer(b)
1762 m.Retval = buf.DecodeInt32()
1766 // SwInterfaceDetails defines message 'sw_interface_details'.
1767 type SwInterfaceDetails struct {
1768 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1769 SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
1770 L2Address MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
1771 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1772 Type IfType `binapi:"if_type,name=type" json:"type,omitempty"`
1773 LinkDuplex LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
1774 LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
1775 LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
1776 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
1777 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
1778 SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
1779 SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
1780 SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
1781 SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
1782 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1783 VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
1784 VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
1785 VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
1786 OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
1787 BDmac MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
1788 BSmac MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
1789 BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
1790 ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
1791 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
1792 InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty"`
1793 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1796 func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} }
1797 func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" }
1798 func (*SwInterfaceDetails) GetCrcString() string { return "17b69fa2" }
1799 func (*SwInterfaceDetails) GetMessageType() api.MessageType {
1800 return api.ReplyMessage
1803 func (m *SwInterfaceDetails) Size() (size int) {
1807 size += 4 // m.SwIfIndex
1808 size += 4 // m.SupSwIfIndex
1809 size += 1 * 6 // m.L2Address
1810 size += 4 // m.Flags
1812 size += 4 // m.LinkDuplex
1813 size += 4 // m.LinkSpeed
1814 size += 2 // m.LinkMtu
1815 size += 4 * 4 // m.Mtu
1816 size += 4 // m.SubID
1817 size += 1 // m.SubNumberOfTags
1818 size += 2 // m.SubOuterVlanID
1819 size += 2 // m.SubInnerVlanID
1820 size += 4 // m.SubIfFlags
1821 size += 4 // m.VtrOp
1822 size += 4 // m.VtrPushDot1q
1823 size += 4 // m.VtrTag1
1824 size += 4 // m.VtrTag2
1825 size += 2 // m.OuterTag
1826 size += 1 * 6 // m.BDmac
1827 size += 1 * 6 // m.BSmac
1828 size += 2 // m.BVlanid
1830 size += 64 // m.InterfaceName
1831 size += 64 // m.InterfaceDevType
1835 func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) {
1837 b = make([]byte, m.Size())
1839 buf := codec.NewBuffer(b)
1840 buf.EncodeUint32(uint32(m.SwIfIndex))
1841 buf.EncodeUint32(m.SupSwIfIndex)
1842 buf.EncodeBytes(m.L2Address[:], 6)
1843 buf.EncodeUint32(uint32(m.Flags))
1844 buf.EncodeUint32(uint32(m.Type))
1845 buf.EncodeUint32(uint32(m.LinkDuplex))
1846 buf.EncodeUint32(m.LinkSpeed)
1847 buf.EncodeUint16(m.LinkMtu)
1848 for i := 0; i < 4; i++ {
1851 x = uint32(m.Mtu[i])
1855 buf.EncodeUint32(m.SubID)
1856 buf.EncodeUint8(m.SubNumberOfTags)
1857 buf.EncodeUint16(m.SubOuterVlanID)
1858 buf.EncodeUint16(m.SubInnerVlanID)
1859 buf.EncodeUint32(uint32(m.SubIfFlags))
1860 buf.EncodeUint32(m.VtrOp)
1861 buf.EncodeUint32(m.VtrPushDot1q)
1862 buf.EncodeUint32(m.VtrTag1)
1863 buf.EncodeUint32(m.VtrTag2)
1864 buf.EncodeUint16(m.OuterTag)
1865 buf.EncodeBytes(m.BDmac[:], 6)
1866 buf.EncodeBytes(m.BSmac[:], 6)
1867 buf.EncodeUint16(m.BVlanid)
1868 buf.EncodeUint32(m.ISid)
1869 buf.EncodeString(m.InterfaceName, 64)
1870 buf.EncodeString(m.InterfaceDevType, 64)
1871 buf.EncodeString(m.Tag, 64)
1872 return buf.Bytes(), nil
1874 func (m *SwInterfaceDetails) Unmarshal(b []byte) error {
1875 buf := codec.NewBuffer(b)
1876 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1877 m.SupSwIfIndex = buf.DecodeUint32()
1878 copy(m.L2Address[:], buf.DecodeBytes(6))
1879 m.Flags = IfStatusFlags(buf.DecodeUint32())
1880 m.Type = IfType(buf.DecodeUint32())
1881 m.LinkDuplex = LinkDuplex(buf.DecodeUint32())
1882 m.LinkSpeed = buf.DecodeUint32()
1883 m.LinkMtu = buf.DecodeUint16()
1884 m.Mtu = make([]uint32, 4)
1885 for i := 0; i < len(m.Mtu); i++ {
1886 m.Mtu[i] = buf.DecodeUint32()
1888 m.SubID = buf.DecodeUint32()
1889 m.SubNumberOfTags = buf.DecodeUint8()
1890 m.SubOuterVlanID = buf.DecodeUint16()
1891 m.SubInnerVlanID = buf.DecodeUint16()
1892 m.SubIfFlags = SubIfFlags(buf.DecodeUint32())
1893 m.VtrOp = buf.DecodeUint32()
1894 m.VtrPushDot1q = buf.DecodeUint32()
1895 m.VtrTag1 = buf.DecodeUint32()
1896 m.VtrTag2 = buf.DecodeUint32()
1897 m.OuterTag = buf.DecodeUint16()
1898 copy(m.BDmac[:], buf.DecodeBytes(6))
1899 copy(m.BSmac[:], buf.DecodeBytes(6))
1900 m.BVlanid = buf.DecodeUint16()
1901 m.ISid = buf.DecodeUint32()
1902 m.InterfaceName = buf.DecodeString(64)
1903 m.InterfaceDevType = buf.DecodeString(64)
1904 m.Tag = buf.DecodeString(64)
1908 // SwInterfaceDump defines message 'sw_interface_dump'.
1909 type SwInterfaceDump struct {
1910 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
1911 NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
1912 NameFilter string `binapi:"string[],name=name_filter" json:"name_filter,omitempty"`
1915 func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} }
1916 func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" }
1917 func (*SwInterfaceDump) GetCrcString() string { return "aa610c27" }
1918 func (*SwInterfaceDump) GetMessageType() api.MessageType {
1919 return api.RequestMessage
1922 func (m *SwInterfaceDump) Size() (size int) {
1926 size += 4 // m.SwIfIndex
1927 size += 1 // m.NameFilterValid
1928 size += 4 + len(m.NameFilter) // m.NameFilter
1931 func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) {
1933 b = make([]byte, m.Size())
1935 buf := codec.NewBuffer(b)
1936 buf.EncodeUint32(uint32(m.SwIfIndex))
1937 buf.EncodeBool(m.NameFilterValid)
1938 buf.EncodeString(m.NameFilter, 0)
1939 return buf.Bytes(), nil
1941 func (m *SwInterfaceDump) Unmarshal(b []byte) error {
1942 buf := codec.NewBuffer(b)
1943 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1944 m.NameFilterValid = buf.DecodeBool()
1945 m.NameFilter = buf.DecodeString(0)
1949 // SwInterfaceEvent defines message 'sw_interface_event'.
1950 type SwInterfaceEvent struct {
1951 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1952 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1953 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1954 Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"`
1957 func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} }
1958 func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" }
1959 func (*SwInterfaceEvent) GetCrcString() string { return "f709f78d" }
1960 func (*SwInterfaceEvent) GetMessageType() api.MessageType {
1961 return api.EventMessage
1964 func (m *SwInterfaceEvent) Size() (size int) {
1969 size += 4 // m.SwIfIndex
1970 size += 4 // m.Flags
1971 size += 1 // m.Deleted
1974 func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) {
1976 b = make([]byte, m.Size())
1978 buf := codec.NewBuffer(b)
1979 buf.EncodeUint32(m.PID)
1980 buf.EncodeUint32(uint32(m.SwIfIndex))
1981 buf.EncodeUint32(uint32(m.Flags))
1982 buf.EncodeBool(m.Deleted)
1983 return buf.Bytes(), nil
1985 func (m *SwInterfaceEvent) Unmarshal(b []byte) error {
1986 buf := codec.NewBuffer(b)
1987 m.PID = buf.DecodeUint32()
1988 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1989 m.Flags = IfStatusFlags(buf.DecodeUint32())
1990 m.Deleted = buf.DecodeBool()
1994 // SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'.
1995 type SwInterfaceGetMacAddress struct {
1996 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1999 func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} }
2000 func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_interface_get_mac_address" }
2001 func (*SwInterfaceGetMacAddress) GetCrcString() string { return "f9e6675e" }
2002 func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType {
2003 return api.RequestMessage
2006 func (m *SwInterfaceGetMacAddress) Size() (size int) {
2010 size += 4 // m.SwIfIndex
2013 func (m *SwInterfaceGetMacAddress) Marshal(b []byte) ([]byte, error) {
2015 b = make([]byte, m.Size())
2017 buf := codec.NewBuffer(b)
2018 buf.EncodeUint32(uint32(m.SwIfIndex))
2019 return buf.Bytes(), nil
2021 func (m *SwInterfaceGetMacAddress) Unmarshal(b []byte) error {
2022 buf := codec.NewBuffer(b)
2023 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2027 // SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'.
2028 type SwInterfaceGetMacAddressReply struct {
2029 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2030 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
2033 func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} }
2034 func (*SwInterfaceGetMacAddressReply) GetMessageName() string {
2035 return "sw_interface_get_mac_address_reply"
2037 func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" }
2038 func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType {
2039 return api.ReplyMessage
2042 func (m *SwInterfaceGetMacAddressReply) Size() (size int) {
2046 size += 4 // m.Retval
2047 size += 1 * 6 // m.MacAddress
2050 func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) {
2052 b = make([]byte, m.Size())
2054 buf := codec.NewBuffer(b)
2055 buf.EncodeInt32(m.Retval)
2056 buf.EncodeBytes(m.MacAddress[:], 6)
2057 return buf.Bytes(), nil
2059 func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error {
2060 buf := codec.NewBuffer(b)
2061 m.Retval = buf.DecodeInt32()
2062 copy(m.MacAddress[:], buf.DecodeBytes(6))
2066 // SwInterfaceGetTable defines message 'sw_interface_get_table'.
2067 type SwInterfaceGetTable struct {
2068 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2069 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2072 func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} }
2073 func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interface_get_table" }
2074 func (*SwInterfaceGetTable) GetCrcString() string { return "2d033de4" }
2075 func (*SwInterfaceGetTable) GetMessageType() api.MessageType {
2076 return api.RequestMessage
2079 func (m *SwInterfaceGetTable) Size() (size int) {
2083 size += 4 // m.SwIfIndex
2084 size += 1 // m.IsIPv6
2087 func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) {
2089 b = make([]byte, m.Size())
2091 buf := codec.NewBuffer(b)
2092 buf.EncodeUint32(uint32(m.SwIfIndex))
2093 buf.EncodeBool(m.IsIPv6)
2094 return buf.Bytes(), nil
2096 func (m *SwInterfaceGetTable) Unmarshal(b []byte) error {
2097 buf := codec.NewBuffer(b)
2098 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2099 m.IsIPv6 = buf.DecodeBool()
2103 // SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'.
2104 type SwInterfaceGetTableReply struct {
2105 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2106 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2109 func (m *SwInterfaceGetTableReply) Reset() { *m = SwInterfaceGetTableReply{} }
2110 func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_interface_get_table_reply" }
2111 func (*SwInterfaceGetTableReply) GetCrcString() string { return "a6eb0109" }
2112 func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType {
2113 return api.ReplyMessage
2116 func (m *SwInterfaceGetTableReply) Size() (size int) {
2120 size += 4 // m.Retval
2121 size += 4 // m.VrfID
2124 func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) {
2126 b = make([]byte, m.Size())
2128 buf := codec.NewBuffer(b)
2129 buf.EncodeInt32(m.Retval)
2130 buf.EncodeUint32(m.VrfID)
2131 return buf.Bytes(), nil
2133 func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error {
2134 buf := codec.NewBuffer(b)
2135 m.Retval = buf.DecodeInt32()
2136 m.VrfID = buf.DecodeUint32()
2140 // SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'.
2141 type SwInterfaceRxPlacementDetails struct {
2142 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2143 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2144 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
2145 Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
2148 func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
2149 func (*SwInterfaceRxPlacementDetails) GetMessageName() string {
2150 return "sw_interface_rx_placement_details"
2152 func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "f6d7d024" }
2153 func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType {
2154 return api.RequestMessage
2157 func (m *SwInterfaceRxPlacementDetails) Size() (size int) {
2161 size += 4 // m.SwIfIndex
2162 size += 4 // m.QueueID
2163 size += 4 // m.WorkerID
2167 func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) {
2169 b = make([]byte, m.Size())
2171 buf := codec.NewBuffer(b)
2172 buf.EncodeUint32(uint32(m.SwIfIndex))
2173 buf.EncodeUint32(m.QueueID)
2174 buf.EncodeUint32(m.WorkerID)
2175 buf.EncodeUint32(uint32(m.Mode))
2176 return buf.Bytes(), nil
2178 func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error {
2179 buf := codec.NewBuffer(b)
2180 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2181 m.QueueID = buf.DecodeUint32()
2182 m.WorkerID = buf.DecodeUint32()
2183 m.Mode = RxMode(buf.DecodeUint32())
2187 // SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'.
2188 type SwInterfaceRxPlacementDump struct {
2189 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2192 func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} }
2193 func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw_interface_rx_placement_dump" }
2194 func (*SwInterfaceRxPlacementDump) GetCrcString() string { return "f9e6675e" }
2195 func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType {
2196 return api.RequestMessage
2199 func (m *SwInterfaceRxPlacementDump) Size() (size int) {
2203 size += 4 // m.SwIfIndex
2206 func (m *SwInterfaceRxPlacementDump) Marshal(b []byte) ([]byte, error) {
2208 b = make([]byte, m.Size())
2210 buf := codec.NewBuffer(b)
2211 buf.EncodeUint32(uint32(m.SwIfIndex))
2212 return buf.Bytes(), nil
2214 func (m *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error {
2215 buf := codec.NewBuffer(b)
2216 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2220 // SwInterfaceSetFlags defines message 'sw_interface_set_flags'.
2221 type SwInterfaceSetFlags struct {
2222 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2223 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
2226 func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} }
2227 func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" }
2228 func (*SwInterfaceSetFlags) GetCrcString() string { return "6a2b491a" }
2229 func (*SwInterfaceSetFlags) GetMessageType() api.MessageType {
2230 return api.RequestMessage
2233 func (m *SwInterfaceSetFlags) Size() (size int) {
2237 size += 4 // m.SwIfIndex
2238 size += 4 // m.Flags
2241 func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) {
2243 b = make([]byte, m.Size())
2245 buf := codec.NewBuffer(b)
2246 buf.EncodeUint32(uint32(m.SwIfIndex))
2247 buf.EncodeUint32(uint32(m.Flags))
2248 return buf.Bytes(), nil
2250 func (m *SwInterfaceSetFlags) Unmarshal(b []byte) error {
2251 buf := codec.NewBuffer(b)
2252 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2253 m.Flags = IfStatusFlags(buf.DecodeUint32())
2257 // SwInterfaceSetFlagsReply defines message 'sw_interface_set_flags_reply'.
2258 type SwInterfaceSetFlagsReply struct {
2259 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2262 func (m *SwInterfaceSetFlagsReply) Reset() { *m = SwInterfaceSetFlagsReply{} }
2263 func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_interface_set_flags_reply" }
2264 func (*SwInterfaceSetFlagsReply) GetCrcString() string { return "e8d4e804" }
2265 func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType {
2266 return api.ReplyMessage
2269 func (m *SwInterfaceSetFlagsReply) Size() (size int) {
2273 size += 4 // m.Retval
2276 func (m *SwInterfaceSetFlagsReply) Marshal(b []byte) ([]byte, error) {
2278 b = make([]byte, m.Size())
2280 buf := codec.NewBuffer(b)
2281 buf.EncodeInt32(m.Retval)
2282 return buf.Bytes(), nil
2284 func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error {
2285 buf := codec.NewBuffer(b)
2286 m.Retval = buf.DecodeInt32()
2290 // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'.
2291 type SwInterfaceSetIPDirectedBroadcast struct {
2292 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2293 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2296 func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
2297 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
2298 return "sw_interface_set_ip_directed_broadcast"
2300 func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" }
2301 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType {
2302 return api.RequestMessage
2305 func (m *SwInterfaceSetIPDirectedBroadcast) Size() (size int) {
2309 size += 4 // m.SwIfIndex
2310 size += 1 // m.Enable
2313 func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
2315 b = make([]byte, m.Size())
2317 buf := codec.NewBuffer(b)
2318 buf.EncodeUint32(uint32(m.SwIfIndex))
2319 buf.EncodeBool(m.Enable)
2320 return buf.Bytes(), nil
2322 func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(b []byte) error {
2323 buf := codec.NewBuffer(b)
2324 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2325 m.Enable = buf.DecodeBool()
2329 // SwInterfaceSetIPDirectedBroadcastReply defines message 'sw_interface_set_ip_directed_broadcast_reply'.
2330 type SwInterfaceSetIPDirectedBroadcastReply struct {
2331 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2334 func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
2335 *m = SwInterfaceSetIPDirectedBroadcastReply{}
2337 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string {
2338 return "sw_interface_set_ip_directed_broadcast_reply"
2340 func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" }
2341 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType {
2342 return api.ReplyMessage
2345 func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() (size int) {
2349 size += 4 // m.Retval
2352 func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) {
2354 b = make([]byte, m.Size())
2356 buf := codec.NewBuffer(b)
2357 buf.EncodeInt32(m.Retval)
2358 return buf.Bytes(), nil
2360 func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error {
2361 buf := codec.NewBuffer(b)
2362 m.Retval = buf.DecodeInt32()
2366 // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'.
2367 type SwInterfaceSetMacAddress struct {
2368 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2369 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
2372 func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} }
2373 func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" }
2374 func (*SwInterfaceSetMacAddress) GetCrcString() string { return "6aca746a" }
2375 func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType {
2376 return api.RequestMessage
2379 func (m *SwInterfaceSetMacAddress) Size() (size int) {
2383 size += 4 // m.SwIfIndex
2384 size += 1 * 6 // m.MacAddress
2387 func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
2389 b = make([]byte, m.Size())
2391 buf := codec.NewBuffer(b)
2392 buf.EncodeUint32(uint32(m.SwIfIndex))
2393 buf.EncodeBytes(m.MacAddress[:], 6)
2394 return buf.Bytes(), nil
2396 func (m *SwInterfaceSetMacAddress) Unmarshal(b []byte) error {
2397 buf := codec.NewBuffer(b)
2398 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2399 copy(m.MacAddress[:], buf.DecodeBytes(6))
2403 // SwInterfaceSetMacAddressReply defines message 'sw_interface_set_mac_address_reply'.
2404 type SwInterfaceSetMacAddressReply struct {
2405 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2408 func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
2409 func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
2410 return "sw_interface_set_mac_address_reply"
2412 func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" }
2413 func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType {
2414 return api.ReplyMessage
2417 func (m *SwInterfaceSetMacAddressReply) Size() (size int) {
2421 size += 4 // m.Retval
2424 func (m *SwInterfaceSetMacAddressReply) Marshal(b []byte) ([]byte, error) {
2426 b = make([]byte, m.Size())
2428 buf := codec.NewBuffer(b)
2429 buf.EncodeInt32(m.Retval)
2430 return buf.Bytes(), nil
2432 func (m *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error {
2433 buf := codec.NewBuffer(b)
2434 m.Retval = buf.DecodeInt32()
2438 // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'.
2439 type SwInterfaceSetMtu struct {
2440 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2441 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
2444 func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} }
2445 func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" }
2446 func (*SwInterfaceSetMtu) GetCrcString() string { return "5cbe85e5" }
2447 func (*SwInterfaceSetMtu) GetMessageType() api.MessageType {
2448 return api.RequestMessage
2451 func (m *SwInterfaceSetMtu) Size() (size int) {
2455 size += 4 // m.SwIfIndex
2456 size += 4 * 4 // m.Mtu
2459 func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
2461 b = make([]byte, m.Size())
2463 buf := codec.NewBuffer(b)
2464 buf.EncodeUint32(uint32(m.SwIfIndex))
2465 for i := 0; i < 4; i++ {
2468 x = uint32(m.Mtu[i])
2472 return buf.Bytes(), nil
2474 func (m *SwInterfaceSetMtu) Unmarshal(b []byte) error {
2475 buf := codec.NewBuffer(b)
2476 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2477 m.Mtu = make([]uint32, 4)
2478 for i := 0; i < len(m.Mtu); i++ {
2479 m.Mtu[i] = buf.DecodeUint32()
2484 // SwInterfaceSetMtuReply defines message 'sw_interface_set_mtu_reply'.
2485 type SwInterfaceSetMtuReply struct {
2486 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2489 func (m *SwInterfaceSetMtuReply) Reset() { *m = SwInterfaceSetMtuReply{} }
2490 func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" }
2491 func (*SwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
2492 func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType {
2493 return api.ReplyMessage
2496 func (m *SwInterfaceSetMtuReply) Size() (size int) {
2500 size += 4 // m.Retval
2503 func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
2505 b = make([]byte, m.Size())
2507 buf := codec.NewBuffer(b)
2508 buf.EncodeInt32(m.Retval)
2509 return buf.Bytes(), nil
2511 func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error {
2512 buf := codec.NewBuffer(b)
2513 m.Retval = buf.DecodeInt32()
2517 // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'.
2518 type SwInterfaceSetRxMode struct {
2519 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2520 QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
2521 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2522 Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
2525 func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} }
2526 func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" }
2527 func (*SwInterfaceSetRxMode) GetCrcString() string { return "780f5cee" }
2528 func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType {
2529 return api.RequestMessage
2532 func (m *SwInterfaceSetRxMode) Size() (size int) {
2536 size += 4 // m.SwIfIndex
2537 size += 1 // m.QueueIDValid
2538 size += 4 // m.QueueID
2542 func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
2544 b = make([]byte, m.Size())
2546 buf := codec.NewBuffer(b)
2547 buf.EncodeUint32(uint32(m.SwIfIndex))
2548 buf.EncodeBool(m.QueueIDValid)
2549 buf.EncodeUint32(m.QueueID)
2550 buf.EncodeUint32(uint32(m.Mode))
2551 return buf.Bytes(), nil
2553 func (m *SwInterfaceSetRxMode) Unmarshal(b []byte) error {
2554 buf := codec.NewBuffer(b)
2555 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2556 m.QueueIDValid = buf.DecodeBool()
2557 m.QueueID = buf.DecodeUint32()
2558 m.Mode = RxMode(buf.DecodeUint32())
2562 // SwInterfaceSetRxModeReply defines message 'sw_interface_set_rx_mode_reply'.
2563 type SwInterfaceSetRxModeReply struct {
2564 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2567 func (m *SwInterfaceSetRxModeReply) Reset() { *m = SwInterfaceSetRxModeReply{} }
2568 func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" }
2569 func (*SwInterfaceSetRxModeReply) GetCrcString() string { return "e8d4e804" }
2570 func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType {
2571 return api.ReplyMessage
2574 func (m *SwInterfaceSetRxModeReply) Size() (size int) {
2578 size += 4 // m.Retval
2581 func (m *SwInterfaceSetRxModeReply) 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 *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error {
2590 buf := codec.NewBuffer(b)
2591 m.Retval = buf.DecodeInt32()
2595 // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'.
2596 type SwInterfaceSetRxPlacement struct {
2597 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2598 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2599 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
2600 IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"`
2603 func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} }
2604 func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" }
2605 func (*SwInterfaceSetRxPlacement) GetCrcString() string { return "db65f3c9" }
2606 func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType {
2607 return api.RequestMessage
2610 func (m *SwInterfaceSetRxPlacement) Size() (size int) {
2614 size += 4 // m.SwIfIndex
2615 size += 4 // m.QueueID
2616 size += 4 // m.WorkerID
2617 size += 1 // m.IsMain
2620 func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
2622 b = make([]byte, m.Size())
2624 buf := codec.NewBuffer(b)
2625 buf.EncodeUint32(uint32(m.SwIfIndex))
2626 buf.EncodeUint32(m.QueueID)
2627 buf.EncodeUint32(m.WorkerID)
2628 buf.EncodeBool(m.IsMain)
2629 return buf.Bytes(), nil
2631 func (m *SwInterfaceSetRxPlacement) Unmarshal(b []byte) error {
2632 buf := codec.NewBuffer(b)
2633 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2634 m.QueueID = buf.DecodeUint32()
2635 m.WorkerID = buf.DecodeUint32()
2636 m.IsMain = buf.DecodeBool()
2640 // SwInterfaceSetRxPlacementReply defines message 'sw_interface_set_rx_placement_reply'.
2641 type SwInterfaceSetRxPlacementReply struct {
2642 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2645 func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
2646 func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
2647 return "sw_interface_set_rx_placement_reply"
2649 func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" }
2650 func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType {
2651 return api.ReplyMessage
2654 func (m *SwInterfaceSetRxPlacementReply) Size() (size int) {
2658 size += 4 // m.Retval
2661 func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) {
2663 b = make([]byte, m.Size())
2665 buf := codec.NewBuffer(b)
2666 buf.EncodeInt32(m.Retval)
2667 return buf.Bytes(), nil
2669 func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error {
2670 buf := codec.NewBuffer(b)
2671 m.Retval = buf.DecodeInt32()
2675 // SwInterfaceSetTable defines message 'sw_interface_set_table'.
2676 type SwInterfaceSetTable struct {
2677 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2678 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2679 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2682 func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} }
2683 func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" }
2684 func (*SwInterfaceSetTable) GetCrcString() string { return "df42a577" }
2685 func (*SwInterfaceSetTable) GetMessageType() api.MessageType {
2686 return api.RequestMessage
2689 func (m *SwInterfaceSetTable) Size() (size int) {
2693 size += 4 // m.SwIfIndex
2694 size += 1 // m.IsIPv6
2695 size += 4 // m.VrfID
2698 func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
2700 b = make([]byte, m.Size())
2702 buf := codec.NewBuffer(b)
2703 buf.EncodeUint32(uint32(m.SwIfIndex))
2704 buf.EncodeBool(m.IsIPv6)
2705 buf.EncodeUint32(m.VrfID)
2706 return buf.Bytes(), nil
2708 func (m *SwInterfaceSetTable) Unmarshal(b []byte) error {
2709 buf := codec.NewBuffer(b)
2710 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2711 m.IsIPv6 = buf.DecodeBool()
2712 m.VrfID = buf.DecodeUint32()
2716 // SwInterfaceSetTableReply defines message 'sw_interface_set_table_reply'.
2717 type SwInterfaceSetTableReply struct {
2718 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2721 func (m *SwInterfaceSetTableReply) Reset() { *m = SwInterfaceSetTableReply{} }
2722 func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" }
2723 func (*SwInterfaceSetTableReply) GetCrcString() string { return "e8d4e804" }
2724 func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType {
2725 return api.ReplyMessage
2728 func (m *SwInterfaceSetTableReply) Size() (size int) {
2732 size += 4 // m.Retval
2735 func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) {
2737 b = make([]byte, m.Size())
2739 buf := codec.NewBuffer(b)
2740 buf.EncodeInt32(m.Retval)
2741 return buf.Bytes(), nil
2743 func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error {
2744 buf := codec.NewBuffer(b)
2745 m.Retval = buf.DecodeInt32()
2749 // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'.
2750 type SwInterfaceSetUnnumbered struct {
2751 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2752 UnnumberedSwIfIndex InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
2753 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2756 func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} }
2757 func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" }
2758 func (*SwInterfaceSetUnnumbered) GetCrcString() string { return "938ef33b" }
2759 func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType {
2760 return api.RequestMessage
2763 func (m *SwInterfaceSetUnnumbered) Size() (size int) {
2767 size += 4 // m.SwIfIndex
2768 size += 4 // m.UnnumberedSwIfIndex
2769 size += 1 // m.IsAdd
2772 func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
2774 b = make([]byte, m.Size())
2776 buf := codec.NewBuffer(b)
2777 buf.EncodeUint32(uint32(m.SwIfIndex))
2778 buf.EncodeUint32(uint32(m.UnnumberedSwIfIndex))
2779 buf.EncodeBool(m.IsAdd)
2780 return buf.Bytes(), nil
2782 func (m *SwInterfaceSetUnnumbered) Unmarshal(b []byte) error {
2783 buf := codec.NewBuffer(b)
2784 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2785 m.UnnumberedSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2786 m.IsAdd = buf.DecodeBool()
2790 // SwInterfaceSetUnnumberedReply defines message 'sw_interface_set_unnumbered_reply'.
2791 type SwInterfaceSetUnnumberedReply struct {
2792 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2795 func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
2796 func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
2797 return "sw_interface_set_unnumbered_reply"
2799 func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" }
2800 func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType {
2801 return api.ReplyMessage
2804 func (m *SwInterfaceSetUnnumberedReply) Size() (size int) {
2808 size += 4 // m.Retval
2811 func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) {
2813 b = make([]byte, m.Size())
2815 buf := codec.NewBuffer(b)
2816 buf.EncodeInt32(m.Retval)
2817 return buf.Bytes(), nil
2819 func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error {
2820 buf := codec.NewBuffer(b)
2821 m.Retval = buf.DecodeInt32()
2825 // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'.
2826 type SwInterfaceTagAddDel struct {
2827 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2828 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2829 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
2832 func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} }
2833 func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" }
2834 func (*SwInterfaceTagAddDel) GetCrcString() string { return "426f8bc1" }
2835 func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType {
2836 return api.RequestMessage
2839 func (m *SwInterfaceTagAddDel) Size() (size int) {
2843 size += 1 // m.IsAdd
2844 size += 4 // m.SwIfIndex
2848 func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
2850 b = make([]byte, m.Size())
2852 buf := codec.NewBuffer(b)
2853 buf.EncodeBool(m.IsAdd)
2854 buf.EncodeUint32(uint32(m.SwIfIndex))
2855 buf.EncodeString(m.Tag, 64)
2856 return buf.Bytes(), nil
2858 func (m *SwInterfaceTagAddDel) Unmarshal(b []byte) error {
2859 buf := codec.NewBuffer(b)
2860 m.IsAdd = buf.DecodeBool()
2861 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2862 m.Tag = buf.DecodeString(64)
2866 // SwInterfaceTagAddDelReply defines message 'sw_interface_tag_add_del_reply'.
2867 type SwInterfaceTagAddDelReply struct {
2868 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2871 func (m *SwInterfaceTagAddDelReply) Reset() { *m = SwInterfaceTagAddDelReply{} }
2872 func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" }
2873 func (*SwInterfaceTagAddDelReply) GetCrcString() string { return "e8d4e804" }
2874 func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType {
2875 return api.ReplyMessage
2878 func (m *SwInterfaceTagAddDelReply) Size() (size int) {
2882 size += 4 // m.Retval
2885 func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) {
2887 b = make([]byte, m.Size())
2889 buf := codec.NewBuffer(b)
2890 buf.EncodeInt32(m.Retval)
2891 return buf.Bytes(), nil
2893 func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error {
2894 buf := codec.NewBuffer(b)
2895 m.Retval = buf.DecodeInt32()
2899 // WantInterfaceEvents defines message 'want_interface_events'.
2900 type WantInterfaceEvents struct {
2901 EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
2902 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2905 func (m *WantInterfaceEvents) Reset() { *m = WantInterfaceEvents{} }
2906 func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" }
2907 func (*WantInterfaceEvents) GetCrcString() string { return "476f5a08" }
2908 func (*WantInterfaceEvents) GetMessageType() api.MessageType {
2909 return api.RequestMessage
2912 func (m *WantInterfaceEvents) Size() (size int) {
2916 size += 4 // m.EnableDisable
2920 func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
2922 b = make([]byte, m.Size())
2924 buf := codec.NewBuffer(b)
2925 buf.EncodeUint32(m.EnableDisable)
2926 buf.EncodeUint32(m.PID)
2927 return buf.Bytes(), nil
2929 func (m *WantInterfaceEvents) Unmarshal(b []byte) error {
2930 buf := codec.NewBuffer(b)
2931 m.EnableDisable = buf.DecodeUint32()
2932 m.PID = buf.DecodeUint32()
2936 // WantInterfaceEventsReply defines message 'want_interface_events_reply'.
2937 type WantInterfaceEventsReply struct {
2938 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2941 func (m *WantInterfaceEventsReply) Reset() { *m = WantInterfaceEventsReply{} }
2942 func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" }
2943 func (*WantInterfaceEventsReply) GetCrcString() string { return "e8d4e804" }
2944 func (*WantInterfaceEventsReply) GetMessageType() api.MessageType {
2945 return api.ReplyMessage
2948 func (m *WantInterfaceEventsReply) Size() (size int) {
2952 size += 4 // m.Retval
2955 func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) {
2957 b = make([]byte, m.Size())
2959 buf := codec.NewBuffer(b)
2960 buf.EncodeInt32(m.Retval)
2961 return buf.Bytes(), nil
2963 func (m *WantInterfaceEventsReply) Unmarshal(b []byte) error {
2964 buf := codec.NewBuffer(b)
2965 m.Retval = buf.DecodeInt32()
2969 func init() { file_interfaces_binapi_init() }
2970 func file_interfaces_binapi_init() {
2971 api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "collect_detailed_interface_stats_5501adee")
2972 api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "collect_detailed_interface_stats_reply_e8d4e804")
2973 api.RegisterMessage((*CreateLoopback)(nil), "create_loopback_42bb5d22")
2974 api.RegisterMessage((*CreateLoopbackInstance)(nil), "create_loopback_instance_d36a3ee2")
2975 api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "create_loopback_instance_reply_5383d31f")
2976 api.RegisterMessage((*CreateLoopbackReply)(nil), "create_loopback_reply_5383d31f")
2977 api.RegisterMessage((*CreateSubif)(nil), "create_subif_cb371063")
2978 api.RegisterMessage((*CreateSubifReply)(nil), "create_subif_reply_5383d31f")
2979 api.RegisterMessage((*CreateVlanSubif)(nil), "create_vlan_subif_af34ac8b")
2980 api.RegisterMessage((*CreateVlanSubifReply)(nil), "create_vlan_subif_reply_5383d31f")
2981 api.RegisterMessage((*DeleteLoopback)(nil), "delete_loopback_f9e6675e")
2982 api.RegisterMessage((*DeleteLoopbackReply)(nil), "delete_loopback_reply_e8d4e804")
2983 api.RegisterMessage((*DeleteSubif)(nil), "delete_subif_f9e6675e")
2984 api.RegisterMessage((*DeleteSubifReply)(nil), "delete_subif_reply_e8d4e804")
2985 api.RegisterMessage((*HwInterfaceSetMtu)(nil), "hw_interface_set_mtu_e6746899")
2986 api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804")
2987 api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8")
2988 api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804")
2989 api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5803d5c4")
2990 api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804")
2991 api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4")
2992 api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "sw_interface_add_del_mac_address_reply_e8d4e804")
2993 api.RegisterMessage((*SwInterfaceClearStats)(nil), "sw_interface_clear_stats_f9e6675e")
2994 api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "sw_interface_clear_stats_reply_e8d4e804")
2995 api.RegisterMessage((*SwInterfaceDetails)(nil), "sw_interface_details_17b69fa2")
2996 api.RegisterMessage((*SwInterfaceDump)(nil), "sw_interface_dump_aa610c27")
2997 api.RegisterMessage((*SwInterfaceEvent)(nil), "sw_interface_event_f709f78d")
2998 api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "sw_interface_get_mac_address_f9e6675e")
2999 api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "sw_interface_get_mac_address_reply_40ef2c08")
3000 api.RegisterMessage((*SwInterfaceGetTable)(nil), "sw_interface_get_table_2d033de4")
3001 api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "sw_interface_get_table_reply_a6eb0109")
3002 api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "sw_interface_rx_placement_details_f6d7d024")
3003 api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e")
3004 api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_6a2b491a")
3005 api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804")
3006 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb")
3007 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804")
3008 api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_6aca746a")
3009 api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "sw_interface_set_mac_address_reply_e8d4e804")
3010 api.RegisterMessage((*SwInterfaceSetMtu)(nil), "sw_interface_set_mtu_5cbe85e5")
3011 api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "sw_interface_set_mtu_reply_e8d4e804")
3012 api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "sw_interface_set_rx_mode_780f5cee")
3013 api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "sw_interface_set_rx_mode_reply_e8d4e804")
3014 api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "sw_interface_set_rx_placement_db65f3c9")
3015 api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804")
3016 api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577")
3017 api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804")
3018 api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_938ef33b")
3019 api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804")
3020 api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1")
3021 api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804")
3022 api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08")
3023 api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804")
3026 // Messages returns list of all messages in this module.
3027 func AllMessages() []api.Message {
3028 return []api.Message{
3029 (*CollectDetailedInterfaceStats)(nil),
3030 (*CollectDetailedInterfaceStatsReply)(nil),
3031 (*CreateLoopback)(nil),
3032 (*CreateLoopbackInstance)(nil),
3033 (*CreateLoopbackInstanceReply)(nil),
3034 (*CreateLoopbackReply)(nil),
3035 (*CreateSubif)(nil),
3036 (*CreateSubifReply)(nil),
3037 (*CreateVlanSubif)(nil),
3038 (*CreateVlanSubifReply)(nil),
3039 (*DeleteLoopback)(nil),
3040 (*DeleteLoopbackReply)(nil),
3041 (*DeleteSubif)(nil),
3042 (*DeleteSubifReply)(nil),
3043 (*HwInterfaceSetMtu)(nil),
3044 (*HwInterfaceSetMtuReply)(nil),
3045 (*InterfaceNameRenumber)(nil),
3046 (*InterfaceNameRenumberReply)(nil),
3047 (*SwInterfaceAddDelAddress)(nil),
3048 (*SwInterfaceAddDelAddressReply)(nil),
3049 (*SwInterfaceAddDelMacAddress)(nil),
3050 (*SwInterfaceAddDelMacAddressReply)(nil),
3051 (*SwInterfaceClearStats)(nil),
3052 (*SwInterfaceClearStatsReply)(nil),
3053 (*SwInterfaceDetails)(nil),
3054 (*SwInterfaceDump)(nil),
3055 (*SwInterfaceEvent)(nil),
3056 (*SwInterfaceGetMacAddress)(nil),
3057 (*SwInterfaceGetMacAddressReply)(nil),
3058 (*SwInterfaceGetTable)(nil),
3059 (*SwInterfaceGetTableReply)(nil),
3060 (*SwInterfaceRxPlacementDetails)(nil),
3061 (*SwInterfaceRxPlacementDump)(nil),
3062 (*SwInterfaceSetFlags)(nil),
3063 (*SwInterfaceSetFlagsReply)(nil),
3064 (*SwInterfaceSetIPDirectedBroadcast)(nil),
3065 (*SwInterfaceSetIPDirectedBroadcastReply)(nil),
3066 (*SwInterfaceSetMacAddress)(nil),
3067 (*SwInterfaceSetMacAddressReply)(nil),
3068 (*SwInterfaceSetMtu)(nil),
3069 (*SwInterfaceSetMtuReply)(nil),
3070 (*SwInterfaceSetRxMode)(nil),
3071 (*SwInterfaceSetRxModeReply)(nil),
3072 (*SwInterfaceSetRxPlacement)(nil),
3073 (*SwInterfaceSetRxPlacementReply)(nil),
3074 (*SwInterfaceSetTable)(nil),
3075 (*SwInterfaceSetTableReply)(nil),
3076 (*SwInterfaceSetUnnumbered)(nil),
3077 (*SwInterfaceSetUnnumberedReply)(nil),
3078 (*SwInterfaceTagAddDel)(nil),
3079 (*SwInterfaceTagAddDelReply)(nil),
3080 (*WantInterfaceEvents)(nil),
3081 (*WantInterfaceEventsReply)(nil),