1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/interface.api.json
7 // Package interfaces contains generated bindings for API file interface.api.
24 api "git.fd.io/govpp.git/api"
25 codec "git.fd.io/govpp.git/codec"
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
37 VersionCrc = 0xfebc3ffa
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
44 ADDRESS_IP4 AddressFamily = 0
45 ADDRESS_IP6 AddressFamily = 1
49 AddressFamily_name = map[uint32]string{
53 AddressFamily_value = map[string]uint32{
59 func (x AddressFamily) String() string {
60 s, ok := AddressFamily_name[uint32(x)]
64 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
67 // IfStatusFlags defines enum 'if_status_flags'.
68 type IfStatusFlags uint32
71 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
72 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
76 IfStatusFlags_name = map[uint32]string{
77 1: "IF_STATUS_API_FLAG_ADMIN_UP",
78 2: "IF_STATUS_API_FLAG_LINK_UP",
80 IfStatusFlags_value = map[string]uint32{
81 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
82 "IF_STATUS_API_FLAG_LINK_UP": 2,
86 func (x IfStatusFlags) String() string {
87 s, ok := IfStatusFlags_name[uint32(x)]
91 str := func(n uint32) string {
92 s, ok := IfStatusFlags_name[uint32(n)]
96 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
98 for i := uint32(0); i <= 32; i++ {
108 return str(uint32(x))
113 // IfType defines enum 'if_type'.
117 IF_API_TYPE_HARDWARE IfType = 1
118 IF_API_TYPE_SUB IfType = 2
119 IF_API_TYPE_P2P IfType = 3
120 IF_API_TYPE_PIPE IfType = 4
124 IfType_name = map[uint32]string{
125 1: "IF_API_TYPE_HARDWARE",
126 2: "IF_API_TYPE_SUB",
127 3: "IF_API_TYPE_P2P",
128 4: "IF_API_TYPE_PIPE",
130 IfType_value = map[string]uint32{
131 "IF_API_TYPE_HARDWARE": 1,
132 "IF_API_TYPE_SUB": 2,
133 "IF_API_TYPE_P2P": 3,
134 "IF_API_TYPE_PIPE": 4,
138 func (x IfType) String() string {
139 s, ok := IfType_name[uint32(x)]
143 return "IfType(" + strconv.Itoa(int(x)) + ")"
146 // IPDscp defines enum 'ip_dscp'.
150 IP_API_DSCP_CS0 IPDscp = 0
151 IP_API_DSCP_CS1 IPDscp = 8
152 IP_API_DSCP_AF11 IPDscp = 10
153 IP_API_DSCP_AF12 IPDscp = 12
154 IP_API_DSCP_AF13 IPDscp = 14
155 IP_API_DSCP_CS2 IPDscp = 16
156 IP_API_DSCP_AF21 IPDscp = 18
157 IP_API_DSCP_AF22 IPDscp = 20
158 IP_API_DSCP_AF23 IPDscp = 22
159 IP_API_DSCP_CS3 IPDscp = 24
160 IP_API_DSCP_AF31 IPDscp = 26
161 IP_API_DSCP_AF32 IPDscp = 28
162 IP_API_DSCP_AF33 IPDscp = 30
163 IP_API_DSCP_CS4 IPDscp = 32
164 IP_API_DSCP_AF41 IPDscp = 34
165 IP_API_DSCP_AF42 IPDscp = 36
166 IP_API_DSCP_AF43 IPDscp = 38
167 IP_API_DSCP_CS5 IPDscp = 40
168 IP_API_DSCP_EF IPDscp = 46
169 IP_API_DSCP_CS6 IPDscp = 48
170 IP_API_DSCP_CS7 IPDscp = 50
174 IPDscp_name = map[uint8]string{
175 0: "IP_API_DSCP_CS0",
176 8: "IP_API_DSCP_CS1",
177 10: "IP_API_DSCP_AF11",
178 12: "IP_API_DSCP_AF12",
179 14: "IP_API_DSCP_AF13",
180 16: "IP_API_DSCP_CS2",
181 18: "IP_API_DSCP_AF21",
182 20: "IP_API_DSCP_AF22",
183 22: "IP_API_DSCP_AF23",
184 24: "IP_API_DSCP_CS3",
185 26: "IP_API_DSCP_AF31",
186 28: "IP_API_DSCP_AF32",
187 30: "IP_API_DSCP_AF33",
188 32: "IP_API_DSCP_CS4",
189 34: "IP_API_DSCP_AF41",
190 36: "IP_API_DSCP_AF42",
191 38: "IP_API_DSCP_AF43",
192 40: "IP_API_DSCP_CS5",
193 46: "IP_API_DSCP_EF",
194 48: "IP_API_DSCP_CS6",
195 50: "IP_API_DSCP_CS7",
197 IPDscp_value = map[string]uint8{
198 "IP_API_DSCP_CS0": 0,
199 "IP_API_DSCP_CS1": 8,
200 "IP_API_DSCP_AF11": 10,
201 "IP_API_DSCP_AF12": 12,
202 "IP_API_DSCP_AF13": 14,
203 "IP_API_DSCP_CS2": 16,
204 "IP_API_DSCP_AF21": 18,
205 "IP_API_DSCP_AF22": 20,
206 "IP_API_DSCP_AF23": 22,
207 "IP_API_DSCP_CS3": 24,
208 "IP_API_DSCP_AF31": 26,
209 "IP_API_DSCP_AF32": 28,
210 "IP_API_DSCP_AF33": 30,
211 "IP_API_DSCP_CS4": 32,
212 "IP_API_DSCP_AF41": 34,
213 "IP_API_DSCP_AF42": 36,
214 "IP_API_DSCP_AF43": 38,
215 "IP_API_DSCP_CS5": 40,
216 "IP_API_DSCP_EF": 46,
217 "IP_API_DSCP_CS6": 48,
218 "IP_API_DSCP_CS7": 50,
222 func (x IPDscp) String() string {
223 s, ok := IPDscp_name[uint8(x)]
227 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
230 // IPEcn defines enum 'ip_ecn'.
234 IP_API_ECN_NONE IPEcn = 0
235 IP_API_ECN_ECT0 IPEcn = 1
236 IP_API_ECN_ECT1 IPEcn = 2
237 IP_API_ECN_CE IPEcn = 3
241 IPEcn_name = map[uint8]string{
242 0: "IP_API_ECN_NONE",
243 1: "IP_API_ECN_ECT0",
244 2: "IP_API_ECN_ECT1",
247 IPEcn_value = map[string]uint8{
248 "IP_API_ECN_NONE": 0,
249 "IP_API_ECN_ECT0": 1,
250 "IP_API_ECN_ECT1": 2,
255 func (x IPEcn) String() string {
256 s, ok := IPEcn_name[uint8(x)]
260 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
263 // IPProto defines enum 'ip_proto'.
267 IP_API_PROTO_HOPOPT IPProto = 0
268 IP_API_PROTO_ICMP IPProto = 1
269 IP_API_PROTO_IGMP IPProto = 2
270 IP_API_PROTO_TCP IPProto = 6
271 IP_API_PROTO_UDP IPProto = 17
272 IP_API_PROTO_GRE IPProto = 47
273 IP_API_PROTO_AH IPProto = 50
274 IP_API_PROTO_ESP IPProto = 51
275 IP_API_PROTO_EIGRP IPProto = 88
276 IP_API_PROTO_OSPF IPProto = 89
277 IP_API_PROTO_SCTP IPProto = 132
278 IP_API_PROTO_RESERVED IPProto = 255
282 IPProto_name = map[uint32]string{
283 0: "IP_API_PROTO_HOPOPT",
284 1: "IP_API_PROTO_ICMP",
285 2: "IP_API_PROTO_IGMP",
286 6: "IP_API_PROTO_TCP",
287 17: "IP_API_PROTO_UDP",
288 47: "IP_API_PROTO_GRE",
289 50: "IP_API_PROTO_AH",
290 51: "IP_API_PROTO_ESP",
291 88: "IP_API_PROTO_EIGRP",
292 89: "IP_API_PROTO_OSPF",
293 132: "IP_API_PROTO_SCTP",
294 255: "IP_API_PROTO_RESERVED",
296 IPProto_value = map[string]uint32{
297 "IP_API_PROTO_HOPOPT": 0,
298 "IP_API_PROTO_ICMP": 1,
299 "IP_API_PROTO_IGMP": 2,
300 "IP_API_PROTO_TCP": 6,
301 "IP_API_PROTO_UDP": 17,
302 "IP_API_PROTO_GRE": 47,
303 "IP_API_PROTO_AH": 50,
304 "IP_API_PROTO_ESP": 51,
305 "IP_API_PROTO_EIGRP": 88,
306 "IP_API_PROTO_OSPF": 89,
307 "IP_API_PROTO_SCTP": 132,
308 "IP_API_PROTO_RESERVED": 255,
312 func (x IPProto) String() string {
313 s, ok := IPProto_name[uint32(x)]
317 return "IPProto(" + strconv.Itoa(int(x)) + ")"
320 // LinkDuplex defines enum 'link_duplex'.
321 type LinkDuplex uint32
324 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
325 LINK_DUPLEX_API_HALF LinkDuplex = 1
326 LINK_DUPLEX_API_FULL LinkDuplex = 2
330 LinkDuplex_name = map[uint32]string{
331 0: "LINK_DUPLEX_API_UNKNOWN",
332 1: "LINK_DUPLEX_API_HALF",
333 2: "LINK_DUPLEX_API_FULL",
335 LinkDuplex_value = map[string]uint32{
336 "LINK_DUPLEX_API_UNKNOWN": 0,
337 "LINK_DUPLEX_API_HALF": 1,
338 "LINK_DUPLEX_API_FULL": 2,
342 func (x LinkDuplex) String() string {
343 s, ok := LinkDuplex_name[uint32(x)]
347 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
350 // MtuProto defines enum 'mtu_proto'.
354 MTU_PROTO_API_L3 MtuProto = 1
355 MTU_PROTO_API_IP4 MtuProto = 2
356 MTU_PROTO_API_IP6 MtuProto = 3
357 MTU_PROTO_API_MPLS MtuProto = 4
358 MTU_PROTO_API_N MtuProto = 5
362 MtuProto_name = map[uint32]string{
363 1: "MTU_PROTO_API_L3",
364 2: "MTU_PROTO_API_IP4",
365 3: "MTU_PROTO_API_IP6",
366 4: "MTU_PROTO_API_MPLS",
367 5: "MTU_PROTO_API_N",
369 MtuProto_value = map[string]uint32{
370 "MTU_PROTO_API_L3": 1,
371 "MTU_PROTO_API_IP4": 2,
372 "MTU_PROTO_API_IP6": 3,
373 "MTU_PROTO_API_MPLS": 4,
374 "MTU_PROTO_API_N": 5,
378 func (x MtuProto) String() string {
379 s, ok := MtuProto_name[uint32(x)]
383 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
386 // RxMode defines enum 'rx_mode'.
390 RX_MODE_API_UNKNOWN RxMode = 0
391 RX_MODE_API_POLLING RxMode = 1
392 RX_MODE_API_INTERRUPT RxMode = 2
393 RX_MODE_API_ADAPTIVE RxMode = 3
394 RX_MODE_API_DEFAULT RxMode = 4
398 RxMode_name = map[uint32]string{
399 0: "RX_MODE_API_UNKNOWN",
400 1: "RX_MODE_API_POLLING",
401 2: "RX_MODE_API_INTERRUPT",
402 3: "RX_MODE_API_ADAPTIVE",
403 4: "RX_MODE_API_DEFAULT",
405 RxMode_value = map[string]uint32{
406 "RX_MODE_API_UNKNOWN": 0,
407 "RX_MODE_API_POLLING": 1,
408 "RX_MODE_API_INTERRUPT": 2,
409 "RX_MODE_API_ADAPTIVE": 3,
410 "RX_MODE_API_DEFAULT": 4,
414 func (x RxMode) String() string {
415 s, ok := RxMode_name[uint32(x)]
419 return "RxMode(" + strconv.Itoa(int(x)) + ")"
422 // SubIfFlags defines enum 'sub_if_flags'.
423 type SubIfFlags uint32
426 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
427 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
428 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
429 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
430 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
431 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
432 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
433 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
434 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
435 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
439 SubIfFlags_name = map[uint32]string{
440 1: "SUB_IF_API_FLAG_NO_TAGS",
441 2: "SUB_IF_API_FLAG_ONE_TAG",
442 4: "SUB_IF_API_FLAG_TWO_TAGS",
443 8: "SUB_IF_API_FLAG_DOT1AD",
444 16: "SUB_IF_API_FLAG_EXACT_MATCH",
445 32: "SUB_IF_API_FLAG_DEFAULT",
446 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
447 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
448 254: "SUB_IF_API_FLAG_MASK_VNET",
449 256: "SUB_IF_API_FLAG_DOT1AH",
451 SubIfFlags_value = map[string]uint32{
452 "SUB_IF_API_FLAG_NO_TAGS": 1,
453 "SUB_IF_API_FLAG_ONE_TAG": 2,
454 "SUB_IF_API_FLAG_TWO_TAGS": 4,
455 "SUB_IF_API_FLAG_DOT1AD": 8,
456 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
457 "SUB_IF_API_FLAG_DEFAULT": 32,
458 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
459 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
460 "SUB_IF_API_FLAG_MASK_VNET": 254,
461 "SUB_IF_API_FLAG_DOT1AH": 256,
465 func (x SubIfFlags) String() string {
466 s, ok := SubIfFlags_name[uint32(x)]
470 str := func(n uint32) string {
471 s, ok := SubIfFlags_name[uint32(n)]
475 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
477 for i := uint32(0); i <= 32; i++ {
487 return str(uint32(x))
492 // AddressWithPrefix defines alias 'address_with_prefix'.
493 type AddressWithPrefix Prefix
495 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
496 prefix, err := ParsePrefix(s)
498 return AddressWithPrefix{}, err
500 return AddressWithPrefix(prefix), nil
503 func (x AddressWithPrefix) String() string {
504 return Prefix(x).String()
507 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
508 return []byte(x.String()), nil
511 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
512 prefix, err := ParseAddressWithPrefix(string(text))
520 // InterfaceIndex defines alias 'interface_index'.
521 type InterfaceIndex uint32
523 // IP4Address defines alias 'ip4_address'.
524 type IP4Address [4]uint8
526 func ParseIP4Address(s string) (IP4Address, error) {
527 ip := net.ParseIP(s).To4()
529 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
531 var ipaddr IP4Address
532 copy(ipaddr[:], ip.To4())
536 func (x IP4Address) ToIP() net.IP {
537 return net.IP(x[:]).To4()
540 func (x IP4Address) String() string {
541 return x.ToIP().String()
544 func (x *IP4Address) MarshalText() ([]byte, error) {
545 return []byte(x.String()), nil
548 func (x *IP4Address) UnmarshalText(text []byte) error {
549 ipaddr, err := ParseIP4Address(string(text))
557 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
558 type IP4AddressWithPrefix IP4Prefix
560 // IP6Address defines alias 'ip6_address'.
561 type IP6Address [16]uint8
563 func ParseIP6Address(s string) (IP6Address, error) {
564 ip := net.ParseIP(s).To16()
566 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
568 var ipaddr IP6Address
569 copy(ipaddr[:], ip.To16())
573 func (x IP6Address) ToIP() net.IP {
574 return net.IP(x[:]).To16()
577 func (x IP6Address) String() string {
578 return x.ToIP().String()
581 func (x *IP6Address) MarshalText() ([]byte, error) {
582 return []byte(x.String()), nil
585 func (x *IP6Address) UnmarshalText(text []byte) error {
586 ipaddr, err := ParseIP6Address(string(text))
594 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
595 type IP6AddressWithPrefix IP6Prefix
597 // MacAddress defines alias 'mac_address'.
598 type MacAddress [6]uint8
600 func ParseMacAddress(s string) (MacAddress, error) {
601 var macaddr MacAddress
602 mac, err := net.ParseMAC(s)
606 copy(macaddr[:], mac[:])
610 func (x MacAddress) ToMAC() net.HardwareAddr {
611 return net.HardwareAddr(x[:])
614 func (x MacAddress) String() string {
615 return x.ToMAC().String()
618 func (x *MacAddress) MarshalText() ([]byte, error) {
619 return []byte(x.String()), nil
622 func (x *MacAddress) UnmarshalText(text []byte) error {
623 mac, err := ParseMacAddress(string(text))
631 // Address defines type 'address'.
632 type Address struct {
633 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
634 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
637 func ParseAddress(s string) (Address, error) {
640 return Address{}, fmt.Errorf("invalid address: %s", s)
642 return AddressFromIP(ip), nil
645 func AddressFromIP(ip net.IP) Address {
648 addr.Af = ADDRESS_IP6
650 copy(ip6[:], ip.To16())
653 addr.Af = ADDRESS_IP4
655 copy(ip4[:], ip.To4())
661 func (x Address) ToIP() net.IP {
662 if x.Af == ADDRESS_IP6 {
664 return net.IP(ip6[:]).To16()
667 return net.IP(ip4[:]).To4()
671 func (x Address) String() string {
672 return x.ToIP().String()
675 func (x *Address) MarshalText() ([]byte, error) {
676 return []byte(x.String()), nil
679 func (x *Address) UnmarshalText(text []byte) error {
680 addr, err := ParseAddress(string(text))
688 // IP4Prefix defines type 'ip4_prefix'.
689 type IP4Prefix struct {
690 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
691 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
694 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
695 hasPrefix := strings.Contains(s, "/")
697 ip, network, err := net.ParseCIDR(s)
699 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
701 maskSize, _ := network.Mask.Size()
702 prefix.Len = byte(maskSize)
703 prefix.Address, err = ParseIP4Address(ip.String())
705 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
709 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
711 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
713 prefix.Len = byte(defaultMaskSize)
714 prefix.Address, err = ParseIP4Address(ip.String())
716 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
722 func (x IP4Prefix) ToIPNet() *net.IPNet {
723 mask := net.CIDRMask(int(x.Len), 32)
724 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
728 func (x IP4Prefix) String() string {
729 ip := x.Address.String()
730 return ip + "/" + strconv.Itoa(int(x.Len))
733 func (x *IP4Prefix) MarshalText() ([]byte, error) {
734 return []byte(x.String()), nil
737 func (x *IP4Prefix) UnmarshalText(text []byte) error {
738 prefix, err := ParseIP4Prefix(string(text))
746 // IP6Prefix defines type 'ip6_prefix'.
747 type IP6Prefix struct {
748 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
749 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
752 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
753 hasPrefix := strings.Contains(s, "/")
755 ip, network, err := net.ParseCIDR(s)
757 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
759 maskSize, _ := network.Mask.Size()
760 prefix.Len = byte(maskSize)
761 prefix.Address, err = ParseIP6Address(ip.String())
763 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
767 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
769 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
771 prefix.Len = byte(defaultMaskSize)
772 prefix.Address, err = ParseIP6Address(ip.String())
774 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
780 func (x IP6Prefix) ToIPNet() *net.IPNet {
781 mask := net.CIDRMask(int(x.Len), 128)
782 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
786 func (x IP6Prefix) String() string {
787 ip := x.Address.String()
788 return ip + "/" + strconv.Itoa(int(x.Len))
791 func (x *IP6Prefix) MarshalText() ([]byte, error) {
792 return []byte(x.String()), nil
795 func (x *IP6Prefix) UnmarshalText(text []byte) error {
796 prefix, err := ParseIP6Prefix(string(text))
804 // Mprefix defines type 'mprefix'.
805 type Mprefix struct {
806 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
807 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
808 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
809 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
812 // Prefix defines type 'prefix'.
814 Address Address `binapi:"address,name=address" json:"address,omitempty"`
815 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
818 func ParsePrefix(ip string) (prefix Prefix, err error) {
819 hasPrefix := strings.Contains(ip, "/")
821 netIP, network, err := net.ParseCIDR(ip)
823 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
825 maskSize, _ := network.Mask.Size()
826 prefix.Len = byte(maskSize)
827 prefix.Address, err = ParseAddress(netIP.String())
829 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
832 netIP := net.ParseIP(ip)
833 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
834 if netIP.To4() == nil {
835 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
837 prefix.Len = byte(defaultMaskSize)
838 prefix.Address, err = ParseAddress(netIP.String())
840 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
846 func (x Prefix) ToIPNet() *net.IPNet {
848 if x.Address.Af == ADDRESS_IP4 {
849 mask = net.CIDRMask(int(x.Len), 32)
851 mask = net.CIDRMask(int(x.Len), 128)
853 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
857 func (x Prefix) String() string {
858 ip := x.Address.String()
859 return ip + "/" + strconv.Itoa(int(x.Len))
862 func (x *Prefix) MarshalText() ([]byte, error) {
863 return []byte(x.String()), nil
866 func (x *Prefix) UnmarshalText(text []byte) error {
867 prefix, err := ParsePrefix(string(text))
875 // PrefixMatcher defines type 'prefix_matcher'.
876 type PrefixMatcher struct {
877 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
878 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
881 // AddressUnion defines union 'address_union'.
882 type AddressUnion struct {
883 // AddressUnion can be one of:
886 XXX_UnionData [16]byte
889 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
893 func (u *AddressUnion) SetIP4(a IP4Address) {
894 buf := codec.NewBuffer(u.XXX_UnionData[:])
895 buf.EncodeBytes(a[:], 4)
897 func (u *AddressUnion) GetIP4() (a IP4Address) {
898 buf := codec.NewBuffer(u.XXX_UnionData[:])
899 copy(a[:], buf.DecodeBytes(4))
903 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
907 func (u *AddressUnion) SetIP6(a IP6Address) {
908 buf := codec.NewBuffer(u.XXX_UnionData[:])
909 buf.EncodeBytes(a[:], 16)
911 func (u *AddressUnion) GetIP6() (a IP6Address) {
912 buf := codec.NewBuffer(u.XXX_UnionData[:])
913 copy(a[:], buf.DecodeBytes(16))
917 // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'.
918 type CollectDetailedInterfaceStats struct {
919 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
920 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
923 func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
924 func (*CollectDetailedInterfaceStats) GetMessageName() string {
925 return "collect_detailed_interface_stats"
927 func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" }
928 func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType {
929 return api.RequestMessage
932 func (m *CollectDetailedInterfaceStats) Size() (size int) {
936 size += 4 // m.SwIfIndex
937 size += 1 // m.EnableDisable
940 func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) {
942 b = make([]byte, m.Size())
944 buf := codec.NewBuffer(b)
945 buf.EncodeUint32(uint32(m.SwIfIndex))
946 buf.EncodeBool(m.EnableDisable)
947 return buf.Bytes(), nil
949 func (m *CollectDetailedInterfaceStats) Unmarshal(b []byte) error {
950 buf := codec.NewBuffer(b)
951 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
952 m.EnableDisable = buf.DecodeBool()
956 // CollectDetailedInterfaceStatsReply defines message 'collect_detailed_interface_stats_reply'.
957 type CollectDetailedInterfaceStatsReply struct {
958 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
961 func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} }
962 func (*CollectDetailedInterfaceStatsReply) GetMessageName() string {
963 return "collect_detailed_interface_stats_reply"
965 func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" }
966 func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType {
967 return api.ReplyMessage
970 func (m *CollectDetailedInterfaceStatsReply) Size() (size int) {
974 size += 4 // m.Retval
977 func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) {
979 b = make([]byte, m.Size())
981 buf := codec.NewBuffer(b)
982 buf.EncodeInt32(m.Retval)
983 return buf.Bytes(), nil
985 func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error {
986 buf := codec.NewBuffer(b)
987 m.Retval = buf.DecodeInt32()
991 // CreateLoopback defines message 'create_loopback'.
992 type CreateLoopback struct {
993 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
996 func (m *CreateLoopback) Reset() { *m = CreateLoopback{} }
997 func (*CreateLoopback) GetMessageName() string { return "create_loopback" }
998 func (*CreateLoopback) GetCrcString() string { return "42bb5d22" }
999 func (*CreateLoopback) GetMessageType() api.MessageType {
1000 return api.RequestMessage
1003 func (m *CreateLoopback) Size() (size int) {
1007 size += 1 * 6 // m.MacAddress
1010 func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) {
1012 b = make([]byte, m.Size())
1014 buf := codec.NewBuffer(b)
1015 buf.EncodeBytes(m.MacAddress[:], 6)
1016 return buf.Bytes(), nil
1018 func (m *CreateLoopback) Unmarshal(b []byte) error {
1019 buf := codec.NewBuffer(b)
1020 copy(m.MacAddress[:], buf.DecodeBytes(6))
1024 // CreateLoopbackInstance defines message 'create_loopback_instance'.
1025 type CreateLoopbackInstance struct {
1026 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
1027 IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
1028 UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
1031 func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} }
1032 func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" }
1033 func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" }
1034 func (*CreateLoopbackInstance) GetMessageType() api.MessageType {
1035 return api.RequestMessage
1038 func (m *CreateLoopbackInstance) Size() (size int) {
1042 size += 1 * 6 // m.MacAddress
1043 size += 1 // m.IsSpecified
1044 size += 4 // m.UserInstance
1047 func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) {
1049 b = make([]byte, m.Size())
1051 buf := codec.NewBuffer(b)
1052 buf.EncodeBytes(m.MacAddress[:], 6)
1053 buf.EncodeBool(m.IsSpecified)
1054 buf.EncodeUint32(m.UserInstance)
1055 return buf.Bytes(), nil
1057 func (m *CreateLoopbackInstance) Unmarshal(b []byte) error {
1058 buf := codec.NewBuffer(b)
1059 copy(m.MacAddress[:], buf.DecodeBytes(6))
1060 m.IsSpecified = buf.DecodeBool()
1061 m.UserInstance = buf.DecodeUint32()
1065 // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'.
1066 type CreateLoopbackInstanceReply struct {
1067 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1068 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1071 func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} }
1072 func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" }
1073 func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" }
1074 func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType {
1075 return api.ReplyMessage
1078 func (m *CreateLoopbackInstanceReply) Size() (size int) {
1082 size += 4 // m.Retval
1083 size += 4 // m.SwIfIndex
1086 func (m *CreateLoopbackInstanceReply) Marshal(b []byte) ([]byte, error) {
1088 b = make([]byte, m.Size())
1090 buf := codec.NewBuffer(b)
1091 buf.EncodeInt32(m.Retval)
1092 buf.EncodeUint32(uint32(m.SwIfIndex))
1093 return buf.Bytes(), nil
1095 func (m *CreateLoopbackInstanceReply) Unmarshal(b []byte) error {
1096 buf := codec.NewBuffer(b)
1097 m.Retval = buf.DecodeInt32()
1098 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1102 // CreateLoopbackReply defines message 'create_loopback_reply'.
1103 type CreateLoopbackReply struct {
1104 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1105 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1108 func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} }
1109 func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" }
1110 func (*CreateLoopbackReply) GetCrcString() string { return "5383d31f" }
1111 func (*CreateLoopbackReply) GetMessageType() api.MessageType {
1112 return api.ReplyMessage
1115 func (m *CreateLoopbackReply) Size() (size int) {
1119 size += 4 // m.Retval
1120 size += 4 // m.SwIfIndex
1123 func (m *CreateLoopbackReply) Marshal(b []byte) ([]byte, error) {
1125 b = make([]byte, m.Size())
1127 buf := codec.NewBuffer(b)
1128 buf.EncodeInt32(m.Retval)
1129 buf.EncodeUint32(uint32(m.SwIfIndex))
1130 return buf.Bytes(), nil
1132 func (m *CreateLoopbackReply) Unmarshal(b []byte) error {
1133 buf := codec.NewBuffer(b)
1134 m.Retval = buf.DecodeInt32()
1135 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1139 // CreateSubif defines message 'create_subif'.
1140 type CreateSubif struct {
1141 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1142 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
1143 SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
1144 OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
1145 InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
1148 func (m *CreateSubif) Reset() { *m = CreateSubif{} }
1149 func (*CreateSubif) GetMessageName() string { return "create_subif" }
1150 func (*CreateSubif) GetCrcString() string { return "cb371063" }
1151 func (*CreateSubif) GetMessageType() api.MessageType {
1152 return api.RequestMessage
1155 func (m *CreateSubif) Size() (size int) {
1159 size += 4 // m.SwIfIndex
1160 size += 4 // m.SubID
1161 size += 4 // m.SubIfFlags
1162 size += 2 // m.OuterVlanID
1163 size += 2 // m.InnerVlanID
1166 func (m *CreateSubif) Marshal(b []byte) ([]byte, error) {
1168 b = make([]byte, m.Size())
1170 buf := codec.NewBuffer(b)
1171 buf.EncodeUint32(uint32(m.SwIfIndex))
1172 buf.EncodeUint32(m.SubID)
1173 buf.EncodeUint32(uint32(m.SubIfFlags))
1174 buf.EncodeUint16(m.OuterVlanID)
1175 buf.EncodeUint16(m.InnerVlanID)
1176 return buf.Bytes(), nil
1178 func (m *CreateSubif) Unmarshal(b []byte) error {
1179 buf := codec.NewBuffer(b)
1180 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1181 m.SubID = buf.DecodeUint32()
1182 m.SubIfFlags = SubIfFlags(buf.DecodeUint32())
1183 m.OuterVlanID = buf.DecodeUint16()
1184 m.InnerVlanID = buf.DecodeUint16()
1188 // CreateSubifReply defines message 'create_subif_reply'.
1189 type CreateSubifReply struct {
1190 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1191 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1194 func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} }
1195 func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" }
1196 func (*CreateSubifReply) GetCrcString() string { return "5383d31f" }
1197 func (*CreateSubifReply) GetMessageType() api.MessageType {
1198 return api.ReplyMessage
1201 func (m *CreateSubifReply) Size() (size int) {
1205 size += 4 // m.Retval
1206 size += 4 // m.SwIfIndex
1209 func (m *CreateSubifReply) Marshal(b []byte) ([]byte, error) {
1211 b = make([]byte, m.Size())
1213 buf := codec.NewBuffer(b)
1214 buf.EncodeInt32(m.Retval)
1215 buf.EncodeUint32(uint32(m.SwIfIndex))
1216 return buf.Bytes(), nil
1218 func (m *CreateSubifReply) Unmarshal(b []byte) error {
1219 buf := codec.NewBuffer(b)
1220 m.Retval = buf.DecodeInt32()
1221 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1225 // CreateVlanSubif defines message 'create_vlan_subif'.
1226 type CreateVlanSubif struct {
1227 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1228 VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
1231 func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} }
1232 func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" }
1233 func (*CreateVlanSubif) GetCrcString() string { return "af34ac8b" }
1234 func (*CreateVlanSubif) GetMessageType() api.MessageType {
1235 return api.RequestMessage
1238 func (m *CreateVlanSubif) Size() (size int) {
1242 size += 4 // m.SwIfIndex
1243 size += 4 // m.VlanID
1246 func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) {
1248 b = make([]byte, m.Size())
1250 buf := codec.NewBuffer(b)
1251 buf.EncodeUint32(uint32(m.SwIfIndex))
1252 buf.EncodeUint32(m.VlanID)
1253 return buf.Bytes(), nil
1255 func (m *CreateVlanSubif) Unmarshal(b []byte) error {
1256 buf := codec.NewBuffer(b)
1257 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1258 m.VlanID = buf.DecodeUint32()
1262 // CreateVlanSubifReply defines message 'create_vlan_subif_reply'.
1263 type CreateVlanSubifReply struct {
1264 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1265 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1268 func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} }
1269 func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" }
1270 func (*CreateVlanSubifReply) GetCrcString() string { return "5383d31f" }
1271 func (*CreateVlanSubifReply) GetMessageType() api.MessageType {
1272 return api.ReplyMessage
1275 func (m *CreateVlanSubifReply) Size() (size int) {
1279 size += 4 // m.Retval
1280 size += 4 // m.SwIfIndex
1283 func (m *CreateVlanSubifReply) Marshal(b []byte) ([]byte, error) {
1285 b = make([]byte, m.Size())
1287 buf := codec.NewBuffer(b)
1288 buf.EncodeInt32(m.Retval)
1289 buf.EncodeUint32(uint32(m.SwIfIndex))
1290 return buf.Bytes(), nil
1292 func (m *CreateVlanSubifReply) Unmarshal(b []byte) error {
1293 buf := codec.NewBuffer(b)
1294 m.Retval = buf.DecodeInt32()
1295 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1299 // DeleteLoopback defines message 'delete_loopback'.
1300 type DeleteLoopback struct {
1301 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1304 func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} }
1305 func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" }
1306 func (*DeleteLoopback) GetCrcString() string { return "f9e6675e" }
1307 func (*DeleteLoopback) GetMessageType() api.MessageType {
1308 return api.RequestMessage
1311 func (m *DeleteLoopback) Size() (size int) {
1315 size += 4 // m.SwIfIndex
1318 func (m *DeleteLoopback) Marshal(b []byte) ([]byte, error) {
1320 b = make([]byte, m.Size())
1322 buf := codec.NewBuffer(b)
1323 buf.EncodeUint32(uint32(m.SwIfIndex))
1324 return buf.Bytes(), nil
1326 func (m *DeleteLoopback) Unmarshal(b []byte) error {
1327 buf := codec.NewBuffer(b)
1328 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1332 // DeleteLoopbackReply defines message 'delete_loopback_reply'.
1333 type DeleteLoopbackReply struct {
1334 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1337 func (m *DeleteLoopbackReply) Reset() { *m = DeleteLoopbackReply{} }
1338 func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" }
1339 func (*DeleteLoopbackReply) GetCrcString() string { return "e8d4e804" }
1340 func (*DeleteLoopbackReply) GetMessageType() api.MessageType {
1341 return api.ReplyMessage
1344 func (m *DeleteLoopbackReply) Size() (size int) {
1348 size += 4 // m.Retval
1351 func (m *DeleteLoopbackReply) Marshal(b []byte) ([]byte, error) {
1353 b = make([]byte, m.Size())
1355 buf := codec.NewBuffer(b)
1356 buf.EncodeInt32(m.Retval)
1357 return buf.Bytes(), nil
1359 func (m *DeleteLoopbackReply) Unmarshal(b []byte) error {
1360 buf := codec.NewBuffer(b)
1361 m.Retval = buf.DecodeInt32()
1365 // DeleteSubif defines message 'delete_subif'.
1366 type DeleteSubif struct {
1367 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1370 func (m *DeleteSubif) Reset() { *m = DeleteSubif{} }
1371 func (*DeleteSubif) GetMessageName() string { return "delete_subif" }
1372 func (*DeleteSubif) GetCrcString() string { return "f9e6675e" }
1373 func (*DeleteSubif) GetMessageType() api.MessageType {
1374 return api.RequestMessage
1377 func (m *DeleteSubif) Size() (size int) {
1381 size += 4 // m.SwIfIndex
1384 func (m *DeleteSubif) Marshal(b []byte) ([]byte, error) {
1386 b = make([]byte, m.Size())
1388 buf := codec.NewBuffer(b)
1389 buf.EncodeUint32(uint32(m.SwIfIndex))
1390 return buf.Bytes(), nil
1392 func (m *DeleteSubif) Unmarshal(b []byte) error {
1393 buf := codec.NewBuffer(b)
1394 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1398 // DeleteSubifReply defines message 'delete_subif_reply'.
1399 type DeleteSubifReply struct {
1400 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1403 func (m *DeleteSubifReply) Reset() { *m = DeleteSubifReply{} }
1404 func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" }
1405 func (*DeleteSubifReply) GetCrcString() string { return "e8d4e804" }
1406 func (*DeleteSubifReply) GetMessageType() api.MessageType {
1407 return api.ReplyMessage
1410 func (m *DeleteSubifReply) Size() (size int) {
1414 size += 4 // m.Retval
1417 func (m *DeleteSubifReply) Marshal(b []byte) ([]byte, error) {
1419 b = make([]byte, m.Size())
1421 buf := codec.NewBuffer(b)
1422 buf.EncodeInt32(m.Retval)
1423 return buf.Bytes(), nil
1425 func (m *DeleteSubifReply) Unmarshal(b []byte) error {
1426 buf := codec.NewBuffer(b)
1427 m.Retval = buf.DecodeInt32()
1431 // HwInterfaceSetMtu defines message 'hw_interface_set_mtu'.
1432 type HwInterfaceSetMtu struct {
1433 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1434 Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
1437 func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} }
1438 func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interface_set_mtu" }
1439 func (*HwInterfaceSetMtu) GetCrcString() string { return "e6746899" }
1440 func (*HwInterfaceSetMtu) GetMessageType() api.MessageType {
1441 return api.RequestMessage
1444 func (m *HwInterfaceSetMtu) Size() (size int) {
1448 size += 4 // m.SwIfIndex
1452 func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
1454 b = make([]byte, m.Size())
1456 buf := codec.NewBuffer(b)
1457 buf.EncodeUint32(uint32(m.SwIfIndex))
1458 buf.EncodeUint16(m.Mtu)
1459 return buf.Bytes(), nil
1461 func (m *HwInterfaceSetMtu) Unmarshal(b []byte) error {
1462 buf := codec.NewBuffer(b)
1463 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1464 m.Mtu = buf.DecodeUint16()
1468 // HwInterfaceSetMtuReply defines message 'hw_interface_set_mtu_reply'.
1469 type HwInterfaceSetMtuReply struct {
1470 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1473 func (m *HwInterfaceSetMtuReply) Reset() { *m = HwInterfaceSetMtuReply{} }
1474 func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_interface_set_mtu_reply" }
1475 func (*HwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
1476 func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType {
1477 return api.ReplyMessage
1480 func (m *HwInterfaceSetMtuReply) Size() (size int) {
1484 size += 4 // m.Retval
1487 func (m *HwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
1489 b = make([]byte, m.Size())
1491 buf := codec.NewBuffer(b)
1492 buf.EncodeInt32(m.Retval)
1493 return buf.Bytes(), nil
1495 func (m *HwInterfaceSetMtuReply) Unmarshal(b []byte) error {
1496 buf := codec.NewBuffer(b)
1497 m.Retval = buf.DecodeInt32()
1501 // InterfaceNameRenumber defines message 'interface_name_renumber'.
1502 type InterfaceNameRenumber struct {
1503 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1504 NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
1507 func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} }
1508 func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" }
1509 func (*InterfaceNameRenumber) GetCrcString() string { return "2b8858b8" }
1510 func (*InterfaceNameRenumber) GetMessageType() api.MessageType {
1511 return api.RequestMessage
1514 func (m *InterfaceNameRenumber) Size() (size int) {
1518 size += 4 // m.SwIfIndex
1519 size += 4 // m.NewShowDevInstance
1522 func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) {
1524 b = make([]byte, m.Size())
1526 buf := codec.NewBuffer(b)
1527 buf.EncodeUint32(uint32(m.SwIfIndex))
1528 buf.EncodeUint32(m.NewShowDevInstance)
1529 return buf.Bytes(), nil
1531 func (m *InterfaceNameRenumber) Unmarshal(b []byte) error {
1532 buf := codec.NewBuffer(b)
1533 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1534 m.NewShowDevInstance = buf.DecodeUint32()
1538 // InterfaceNameRenumberReply defines message 'interface_name_renumber_reply'.
1539 type InterfaceNameRenumberReply struct {
1540 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1543 func (m *InterfaceNameRenumberReply) Reset() { *m = InterfaceNameRenumberReply{} }
1544 func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" }
1545 func (*InterfaceNameRenumberReply) GetCrcString() string { return "e8d4e804" }
1546 func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType {
1547 return api.ReplyMessage
1550 func (m *InterfaceNameRenumberReply) Size() (size int) {
1554 size += 4 // m.Retval
1557 func (m *InterfaceNameRenumberReply) Marshal(b []byte) ([]byte, error) {
1559 b = make([]byte, m.Size())
1561 buf := codec.NewBuffer(b)
1562 buf.EncodeInt32(m.Retval)
1563 return buf.Bytes(), nil
1565 func (m *InterfaceNameRenumberReply) Unmarshal(b []byte) error {
1566 buf := codec.NewBuffer(b)
1567 m.Retval = buf.DecodeInt32()
1571 // SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'.
1572 type SwInterfaceAddDelAddress struct {
1573 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1574 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1575 DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"`
1576 Prefix AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
1579 func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} }
1580 func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_interface_add_del_address" }
1581 func (*SwInterfaceAddDelAddress) GetCrcString() string { return "5803d5c4" }
1582 func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType {
1583 return api.RequestMessage
1586 func (m *SwInterfaceAddDelAddress) Size() (size int) {
1590 size += 4 // m.SwIfIndex
1591 size += 1 // m.IsAdd
1592 size += 1 // m.DelAll
1593 size += 4 // m.Prefix.Address.Af
1594 size += 1 * 16 // m.Prefix.Address.Un
1595 size += 1 // m.Prefix.Len
1598 func (m *SwInterfaceAddDelAddress) Marshal(b []byte) ([]byte, error) {
1600 b = make([]byte, m.Size())
1602 buf := codec.NewBuffer(b)
1603 buf.EncodeUint32(uint32(m.SwIfIndex))
1604 buf.EncodeBool(m.IsAdd)
1605 buf.EncodeBool(m.DelAll)
1606 buf.EncodeUint32(uint32(m.Prefix.Address.Af))
1607 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
1608 buf.EncodeUint8(m.Prefix.Len)
1609 return buf.Bytes(), nil
1611 func (m *SwInterfaceAddDelAddress) Unmarshal(b []byte) error {
1612 buf := codec.NewBuffer(b)
1613 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1614 m.IsAdd = buf.DecodeBool()
1615 m.DelAll = buf.DecodeBool()
1616 m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
1617 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1618 m.Prefix.Len = buf.DecodeUint8()
1622 // SwInterfaceAddDelAddressReply defines message 'sw_interface_add_del_address_reply'.
1623 type SwInterfaceAddDelAddressReply struct {
1624 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1627 func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} }
1628 func (*SwInterfaceAddDelAddressReply) GetMessageName() string {
1629 return "sw_interface_add_del_address_reply"
1631 func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" }
1632 func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType {
1633 return api.ReplyMessage
1636 func (m *SwInterfaceAddDelAddressReply) Size() (size int) {
1640 size += 4 // m.Retval
1643 func (m *SwInterfaceAddDelAddressReply) Marshal(b []byte) ([]byte, error) {
1645 b = make([]byte, m.Size())
1647 buf := codec.NewBuffer(b)
1648 buf.EncodeInt32(m.Retval)
1649 return buf.Bytes(), nil
1651 func (m *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error {
1652 buf := codec.NewBuffer(b)
1653 m.Retval = buf.DecodeInt32()
1657 // SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'.
1658 type SwInterfaceAddDelMacAddress struct {
1659 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1660 Addr MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"`
1661 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1664 func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} }
1665 func (*SwInterfaceAddDelMacAddress) GetMessageName() string {
1666 return "sw_interface_add_del_mac_address"
1668 func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" }
1669 func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType {
1670 return api.RequestMessage
1673 func (m *SwInterfaceAddDelMacAddress) Size() (size int) {
1677 size += 4 // m.SwIfIndex
1678 size += 1 * 6 // m.Addr
1679 size += 1 // m.IsAdd
1682 func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) {
1684 b = make([]byte, m.Size())
1686 buf := codec.NewBuffer(b)
1687 buf.EncodeUint32(m.SwIfIndex)
1688 buf.EncodeBytes(m.Addr[:], 6)
1689 buf.EncodeUint8(m.IsAdd)
1690 return buf.Bytes(), nil
1692 func (m *SwInterfaceAddDelMacAddress) Unmarshal(b []byte) error {
1693 buf := codec.NewBuffer(b)
1694 m.SwIfIndex = buf.DecodeUint32()
1695 copy(m.Addr[:], buf.DecodeBytes(6))
1696 m.IsAdd = buf.DecodeUint8()
1700 // SwInterfaceAddDelMacAddressReply defines message 'sw_interface_add_del_mac_address_reply'.
1701 type SwInterfaceAddDelMacAddressReply struct {
1702 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1705 func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} }
1706 func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string {
1707 return "sw_interface_add_del_mac_address_reply"
1709 func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" }
1710 func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType {
1711 return api.ReplyMessage
1714 func (m *SwInterfaceAddDelMacAddressReply) Size() (size int) {
1718 size += 4 // m.Retval
1721 func (m *SwInterfaceAddDelMacAddressReply) Marshal(b []byte) ([]byte, error) {
1723 b = make([]byte, m.Size())
1725 buf := codec.NewBuffer(b)
1726 buf.EncodeInt32(m.Retval)
1727 return buf.Bytes(), nil
1729 func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error {
1730 buf := codec.NewBuffer(b)
1731 m.Retval = buf.DecodeInt32()
1735 // SwInterfaceClearStats defines message 'sw_interface_clear_stats'.
1736 type SwInterfaceClearStats struct {
1737 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1740 func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} }
1741 func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" }
1742 func (*SwInterfaceClearStats) GetCrcString() string { return "f9e6675e" }
1743 func (*SwInterfaceClearStats) GetMessageType() api.MessageType {
1744 return api.RequestMessage
1747 func (m *SwInterfaceClearStats) Size() (size int) {
1751 size += 4 // m.SwIfIndex
1754 func (m *SwInterfaceClearStats) Marshal(b []byte) ([]byte, error) {
1756 b = make([]byte, m.Size())
1758 buf := codec.NewBuffer(b)
1759 buf.EncodeUint32(uint32(m.SwIfIndex))
1760 return buf.Bytes(), nil
1762 func (m *SwInterfaceClearStats) Unmarshal(b []byte) error {
1763 buf := codec.NewBuffer(b)
1764 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1768 // SwInterfaceClearStatsReply defines message 'sw_interface_clear_stats_reply'.
1769 type SwInterfaceClearStatsReply struct {
1770 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1773 func (m *SwInterfaceClearStatsReply) Reset() { *m = SwInterfaceClearStatsReply{} }
1774 func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw_interface_clear_stats_reply" }
1775 func (*SwInterfaceClearStatsReply) GetCrcString() string { return "e8d4e804" }
1776 func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType {
1777 return api.ReplyMessage
1780 func (m *SwInterfaceClearStatsReply) Size() (size int) {
1784 size += 4 // m.Retval
1787 func (m *SwInterfaceClearStatsReply) Marshal(b []byte) ([]byte, error) {
1789 b = make([]byte, m.Size())
1791 buf := codec.NewBuffer(b)
1792 buf.EncodeInt32(m.Retval)
1793 return buf.Bytes(), nil
1795 func (m *SwInterfaceClearStatsReply) Unmarshal(b []byte) error {
1796 buf := codec.NewBuffer(b)
1797 m.Retval = buf.DecodeInt32()
1801 // SwInterfaceDetails defines message 'sw_interface_details'.
1802 type SwInterfaceDetails struct {
1803 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1804 SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
1805 L2Address MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
1806 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1807 Type IfType `binapi:"if_type,name=type" json:"type,omitempty"`
1808 LinkDuplex LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
1809 LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
1810 LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
1811 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
1812 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
1813 SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
1814 SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
1815 SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
1816 SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
1817 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1818 VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
1819 VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
1820 VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
1821 OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
1822 BDmac MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
1823 BSmac MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
1824 BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
1825 ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
1826 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
1827 InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty"`
1828 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1831 func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} }
1832 func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" }
1833 func (*SwInterfaceDetails) GetCrcString() string { return "17b69fa2" }
1834 func (*SwInterfaceDetails) GetMessageType() api.MessageType {
1835 return api.ReplyMessage
1838 func (m *SwInterfaceDetails) Size() (size int) {
1842 size += 4 // m.SwIfIndex
1843 size += 4 // m.SupSwIfIndex
1844 size += 1 * 6 // m.L2Address
1845 size += 4 // m.Flags
1847 size += 4 // m.LinkDuplex
1848 size += 4 // m.LinkSpeed
1849 size += 2 // m.LinkMtu
1850 size += 4 * 4 // m.Mtu
1851 size += 4 // m.SubID
1852 size += 1 // m.SubNumberOfTags
1853 size += 2 // m.SubOuterVlanID
1854 size += 2 // m.SubInnerVlanID
1855 size += 4 // m.SubIfFlags
1856 size += 4 // m.VtrOp
1857 size += 4 // m.VtrPushDot1q
1858 size += 4 // m.VtrTag1
1859 size += 4 // m.VtrTag2
1860 size += 2 // m.OuterTag
1861 size += 1 * 6 // m.BDmac
1862 size += 1 * 6 // m.BSmac
1863 size += 2 // m.BVlanid
1865 size += 64 // m.InterfaceName
1866 size += 64 // m.InterfaceDevType
1870 func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) {
1872 b = make([]byte, m.Size())
1874 buf := codec.NewBuffer(b)
1875 buf.EncodeUint32(uint32(m.SwIfIndex))
1876 buf.EncodeUint32(m.SupSwIfIndex)
1877 buf.EncodeBytes(m.L2Address[:], 6)
1878 buf.EncodeUint32(uint32(m.Flags))
1879 buf.EncodeUint32(uint32(m.Type))
1880 buf.EncodeUint32(uint32(m.LinkDuplex))
1881 buf.EncodeUint32(m.LinkSpeed)
1882 buf.EncodeUint16(m.LinkMtu)
1883 for i := 0; i < 4; i++ {
1886 x = uint32(m.Mtu[i])
1890 buf.EncodeUint32(m.SubID)
1891 buf.EncodeUint8(m.SubNumberOfTags)
1892 buf.EncodeUint16(m.SubOuterVlanID)
1893 buf.EncodeUint16(m.SubInnerVlanID)
1894 buf.EncodeUint32(uint32(m.SubIfFlags))
1895 buf.EncodeUint32(m.VtrOp)
1896 buf.EncodeUint32(m.VtrPushDot1q)
1897 buf.EncodeUint32(m.VtrTag1)
1898 buf.EncodeUint32(m.VtrTag2)
1899 buf.EncodeUint16(m.OuterTag)
1900 buf.EncodeBytes(m.BDmac[:], 6)
1901 buf.EncodeBytes(m.BSmac[:], 6)
1902 buf.EncodeUint16(m.BVlanid)
1903 buf.EncodeUint32(m.ISid)
1904 buf.EncodeString(m.InterfaceName, 64)
1905 buf.EncodeString(m.InterfaceDevType, 64)
1906 buf.EncodeString(m.Tag, 64)
1907 return buf.Bytes(), nil
1909 func (m *SwInterfaceDetails) Unmarshal(b []byte) error {
1910 buf := codec.NewBuffer(b)
1911 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1912 m.SupSwIfIndex = buf.DecodeUint32()
1913 copy(m.L2Address[:], buf.DecodeBytes(6))
1914 m.Flags = IfStatusFlags(buf.DecodeUint32())
1915 m.Type = IfType(buf.DecodeUint32())
1916 m.LinkDuplex = LinkDuplex(buf.DecodeUint32())
1917 m.LinkSpeed = buf.DecodeUint32()
1918 m.LinkMtu = buf.DecodeUint16()
1919 m.Mtu = make([]uint32, 4)
1920 for i := 0; i < len(m.Mtu); i++ {
1921 m.Mtu[i] = buf.DecodeUint32()
1923 m.SubID = buf.DecodeUint32()
1924 m.SubNumberOfTags = buf.DecodeUint8()
1925 m.SubOuterVlanID = buf.DecodeUint16()
1926 m.SubInnerVlanID = buf.DecodeUint16()
1927 m.SubIfFlags = SubIfFlags(buf.DecodeUint32())
1928 m.VtrOp = buf.DecodeUint32()
1929 m.VtrPushDot1q = buf.DecodeUint32()
1930 m.VtrTag1 = buf.DecodeUint32()
1931 m.VtrTag2 = buf.DecodeUint32()
1932 m.OuterTag = buf.DecodeUint16()
1933 copy(m.BDmac[:], buf.DecodeBytes(6))
1934 copy(m.BSmac[:], buf.DecodeBytes(6))
1935 m.BVlanid = buf.DecodeUint16()
1936 m.ISid = buf.DecodeUint32()
1937 m.InterfaceName = buf.DecodeString(64)
1938 m.InterfaceDevType = buf.DecodeString(64)
1939 m.Tag = buf.DecodeString(64)
1943 // SwInterfaceDump defines message 'sw_interface_dump'.
1944 type SwInterfaceDump struct {
1945 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
1946 NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
1947 NameFilter string `binapi:"string[],name=name_filter" json:"name_filter,omitempty"`
1950 func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} }
1951 func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" }
1952 func (*SwInterfaceDump) GetCrcString() string { return "aa610c27" }
1953 func (*SwInterfaceDump) GetMessageType() api.MessageType {
1954 return api.RequestMessage
1957 func (m *SwInterfaceDump) Size() (size int) {
1961 size += 4 // m.SwIfIndex
1962 size += 1 // m.NameFilterValid
1963 size += 4 + len(m.NameFilter) // m.NameFilter
1966 func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) {
1968 b = make([]byte, m.Size())
1970 buf := codec.NewBuffer(b)
1971 buf.EncodeUint32(uint32(m.SwIfIndex))
1972 buf.EncodeBool(m.NameFilterValid)
1973 buf.EncodeString(m.NameFilter, 0)
1974 return buf.Bytes(), nil
1976 func (m *SwInterfaceDump) Unmarshal(b []byte) error {
1977 buf := codec.NewBuffer(b)
1978 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1979 m.NameFilterValid = buf.DecodeBool()
1980 m.NameFilter = buf.DecodeString(0)
1984 // SwInterfaceEvent defines message 'sw_interface_event'.
1985 type SwInterfaceEvent struct {
1986 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
1987 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1988 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1989 Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"`
1992 func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} }
1993 func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" }
1994 func (*SwInterfaceEvent) GetCrcString() string { return "f709f78d" }
1995 func (*SwInterfaceEvent) GetMessageType() api.MessageType {
1996 return api.EventMessage
1999 func (m *SwInterfaceEvent) Size() (size int) {
2004 size += 4 // m.SwIfIndex
2005 size += 4 // m.Flags
2006 size += 1 // m.Deleted
2009 func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) {
2011 b = make([]byte, m.Size())
2013 buf := codec.NewBuffer(b)
2014 buf.EncodeUint32(m.PID)
2015 buf.EncodeUint32(uint32(m.SwIfIndex))
2016 buf.EncodeUint32(uint32(m.Flags))
2017 buf.EncodeBool(m.Deleted)
2018 return buf.Bytes(), nil
2020 func (m *SwInterfaceEvent) Unmarshal(b []byte) error {
2021 buf := codec.NewBuffer(b)
2022 m.PID = buf.DecodeUint32()
2023 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2024 m.Flags = IfStatusFlags(buf.DecodeUint32())
2025 m.Deleted = buf.DecodeBool()
2029 // SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'.
2030 type SwInterfaceGetMacAddress struct {
2031 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2034 func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} }
2035 func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_interface_get_mac_address" }
2036 func (*SwInterfaceGetMacAddress) GetCrcString() string { return "f9e6675e" }
2037 func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType {
2038 return api.RequestMessage
2041 func (m *SwInterfaceGetMacAddress) Size() (size int) {
2045 size += 4 // m.SwIfIndex
2048 func (m *SwInterfaceGetMacAddress) Marshal(b []byte) ([]byte, error) {
2050 b = make([]byte, m.Size())
2052 buf := codec.NewBuffer(b)
2053 buf.EncodeUint32(uint32(m.SwIfIndex))
2054 return buf.Bytes(), nil
2056 func (m *SwInterfaceGetMacAddress) Unmarshal(b []byte) error {
2057 buf := codec.NewBuffer(b)
2058 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2062 // SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'.
2063 type SwInterfaceGetMacAddressReply struct {
2064 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2065 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
2068 func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} }
2069 func (*SwInterfaceGetMacAddressReply) GetMessageName() string {
2070 return "sw_interface_get_mac_address_reply"
2072 func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" }
2073 func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType {
2074 return api.ReplyMessage
2077 func (m *SwInterfaceGetMacAddressReply) Size() (size int) {
2081 size += 4 // m.Retval
2082 size += 1 * 6 // m.MacAddress
2085 func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) {
2087 b = make([]byte, m.Size())
2089 buf := codec.NewBuffer(b)
2090 buf.EncodeInt32(m.Retval)
2091 buf.EncodeBytes(m.MacAddress[:], 6)
2092 return buf.Bytes(), nil
2094 func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error {
2095 buf := codec.NewBuffer(b)
2096 m.Retval = buf.DecodeInt32()
2097 copy(m.MacAddress[:], buf.DecodeBytes(6))
2101 // SwInterfaceGetTable defines message 'sw_interface_get_table'.
2102 type SwInterfaceGetTable struct {
2103 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2104 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2107 func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} }
2108 func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interface_get_table" }
2109 func (*SwInterfaceGetTable) GetCrcString() string { return "2d033de4" }
2110 func (*SwInterfaceGetTable) GetMessageType() api.MessageType {
2111 return api.RequestMessage
2114 func (m *SwInterfaceGetTable) Size() (size int) {
2118 size += 4 // m.SwIfIndex
2119 size += 1 // m.IsIPv6
2122 func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) {
2124 b = make([]byte, m.Size())
2126 buf := codec.NewBuffer(b)
2127 buf.EncodeUint32(uint32(m.SwIfIndex))
2128 buf.EncodeBool(m.IsIPv6)
2129 return buf.Bytes(), nil
2131 func (m *SwInterfaceGetTable) Unmarshal(b []byte) error {
2132 buf := codec.NewBuffer(b)
2133 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2134 m.IsIPv6 = buf.DecodeBool()
2138 // SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'.
2139 type SwInterfaceGetTableReply struct {
2140 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2141 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2144 func (m *SwInterfaceGetTableReply) Reset() { *m = SwInterfaceGetTableReply{} }
2145 func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_interface_get_table_reply" }
2146 func (*SwInterfaceGetTableReply) GetCrcString() string { return "a6eb0109" }
2147 func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType {
2148 return api.ReplyMessage
2151 func (m *SwInterfaceGetTableReply) Size() (size int) {
2155 size += 4 // m.Retval
2156 size += 4 // m.VrfID
2159 func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) {
2161 b = make([]byte, m.Size())
2163 buf := codec.NewBuffer(b)
2164 buf.EncodeInt32(m.Retval)
2165 buf.EncodeUint32(m.VrfID)
2166 return buf.Bytes(), nil
2168 func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error {
2169 buf := codec.NewBuffer(b)
2170 m.Retval = buf.DecodeInt32()
2171 m.VrfID = buf.DecodeUint32()
2175 // SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'.
2176 type SwInterfaceRxPlacementDetails struct {
2177 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2178 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2179 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
2180 Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
2183 func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
2184 func (*SwInterfaceRxPlacementDetails) GetMessageName() string {
2185 return "sw_interface_rx_placement_details"
2187 func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "f6d7d024" }
2188 func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType {
2189 return api.RequestMessage
2192 func (m *SwInterfaceRxPlacementDetails) Size() (size int) {
2196 size += 4 // m.SwIfIndex
2197 size += 4 // m.QueueID
2198 size += 4 // m.WorkerID
2202 func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) {
2204 b = make([]byte, m.Size())
2206 buf := codec.NewBuffer(b)
2207 buf.EncodeUint32(uint32(m.SwIfIndex))
2208 buf.EncodeUint32(m.QueueID)
2209 buf.EncodeUint32(m.WorkerID)
2210 buf.EncodeUint32(uint32(m.Mode))
2211 return buf.Bytes(), nil
2213 func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error {
2214 buf := codec.NewBuffer(b)
2215 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2216 m.QueueID = buf.DecodeUint32()
2217 m.WorkerID = buf.DecodeUint32()
2218 m.Mode = RxMode(buf.DecodeUint32())
2222 // SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'.
2223 type SwInterfaceRxPlacementDump struct {
2224 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2227 func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} }
2228 func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw_interface_rx_placement_dump" }
2229 func (*SwInterfaceRxPlacementDump) GetCrcString() string { return "f9e6675e" }
2230 func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType {
2231 return api.RequestMessage
2234 func (m *SwInterfaceRxPlacementDump) Size() (size int) {
2238 size += 4 // m.SwIfIndex
2241 func (m *SwInterfaceRxPlacementDump) Marshal(b []byte) ([]byte, error) {
2243 b = make([]byte, m.Size())
2245 buf := codec.NewBuffer(b)
2246 buf.EncodeUint32(uint32(m.SwIfIndex))
2247 return buf.Bytes(), nil
2249 func (m *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error {
2250 buf := codec.NewBuffer(b)
2251 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2255 // SwInterfaceSetFlags defines message 'sw_interface_set_flags'.
2256 type SwInterfaceSetFlags struct {
2257 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2258 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
2261 func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} }
2262 func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" }
2263 func (*SwInterfaceSetFlags) GetCrcString() string { return "6a2b491a" }
2264 func (*SwInterfaceSetFlags) GetMessageType() api.MessageType {
2265 return api.RequestMessage
2268 func (m *SwInterfaceSetFlags) Size() (size int) {
2272 size += 4 // m.SwIfIndex
2273 size += 4 // m.Flags
2276 func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) {
2278 b = make([]byte, m.Size())
2280 buf := codec.NewBuffer(b)
2281 buf.EncodeUint32(uint32(m.SwIfIndex))
2282 buf.EncodeUint32(uint32(m.Flags))
2283 return buf.Bytes(), nil
2285 func (m *SwInterfaceSetFlags) Unmarshal(b []byte) error {
2286 buf := codec.NewBuffer(b)
2287 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2288 m.Flags = IfStatusFlags(buf.DecodeUint32())
2292 // SwInterfaceSetFlagsReply defines message 'sw_interface_set_flags_reply'.
2293 type SwInterfaceSetFlagsReply struct {
2294 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2297 func (m *SwInterfaceSetFlagsReply) Reset() { *m = SwInterfaceSetFlagsReply{} }
2298 func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_interface_set_flags_reply" }
2299 func (*SwInterfaceSetFlagsReply) GetCrcString() string { return "e8d4e804" }
2300 func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType {
2301 return api.ReplyMessage
2304 func (m *SwInterfaceSetFlagsReply) Size() (size int) {
2308 size += 4 // m.Retval
2311 func (m *SwInterfaceSetFlagsReply) Marshal(b []byte) ([]byte, error) {
2313 b = make([]byte, m.Size())
2315 buf := codec.NewBuffer(b)
2316 buf.EncodeInt32(m.Retval)
2317 return buf.Bytes(), nil
2319 func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error {
2320 buf := codec.NewBuffer(b)
2321 m.Retval = buf.DecodeInt32()
2325 // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'.
2326 type SwInterfaceSetIPDirectedBroadcast struct {
2327 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2328 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2331 func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
2332 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
2333 return "sw_interface_set_ip_directed_broadcast"
2335 func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" }
2336 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType {
2337 return api.RequestMessage
2340 func (m *SwInterfaceSetIPDirectedBroadcast) Size() (size int) {
2344 size += 4 // m.SwIfIndex
2345 size += 1 // m.Enable
2348 func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
2350 b = make([]byte, m.Size())
2352 buf := codec.NewBuffer(b)
2353 buf.EncodeUint32(uint32(m.SwIfIndex))
2354 buf.EncodeBool(m.Enable)
2355 return buf.Bytes(), nil
2357 func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(b []byte) error {
2358 buf := codec.NewBuffer(b)
2359 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2360 m.Enable = buf.DecodeBool()
2364 // SwInterfaceSetIPDirectedBroadcastReply defines message 'sw_interface_set_ip_directed_broadcast_reply'.
2365 type SwInterfaceSetIPDirectedBroadcastReply struct {
2366 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2369 func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
2370 *m = SwInterfaceSetIPDirectedBroadcastReply{}
2372 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string {
2373 return "sw_interface_set_ip_directed_broadcast_reply"
2375 func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" }
2376 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType {
2377 return api.ReplyMessage
2380 func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() (size int) {
2384 size += 4 // m.Retval
2387 func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) {
2389 b = make([]byte, m.Size())
2391 buf := codec.NewBuffer(b)
2392 buf.EncodeInt32(m.Retval)
2393 return buf.Bytes(), nil
2395 func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error {
2396 buf := codec.NewBuffer(b)
2397 m.Retval = buf.DecodeInt32()
2401 // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'.
2402 type SwInterfaceSetMacAddress struct {
2403 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2404 MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
2407 func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} }
2408 func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" }
2409 func (*SwInterfaceSetMacAddress) GetCrcString() string { return "6aca746a" }
2410 func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType {
2411 return api.RequestMessage
2414 func (m *SwInterfaceSetMacAddress) Size() (size int) {
2418 size += 4 // m.SwIfIndex
2419 size += 1 * 6 // m.MacAddress
2422 func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
2424 b = make([]byte, m.Size())
2426 buf := codec.NewBuffer(b)
2427 buf.EncodeUint32(uint32(m.SwIfIndex))
2428 buf.EncodeBytes(m.MacAddress[:], 6)
2429 return buf.Bytes(), nil
2431 func (m *SwInterfaceSetMacAddress) Unmarshal(b []byte) error {
2432 buf := codec.NewBuffer(b)
2433 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2434 copy(m.MacAddress[:], buf.DecodeBytes(6))
2438 // SwInterfaceSetMacAddressReply defines message 'sw_interface_set_mac_address_reply'.
2439 type SwInterfaceSetMacAddressReply struct {
2440 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2443 func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
2444 func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
2445 return "sw_interface_set_mac_address_reply"
2447 func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" }
2448 func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType {
2449 return api.ReplyMessage
2452 func (m *SwInterfaceSetMacAddressReply) Size() (size int) {
2456 size += 4 // m.Retval
2459 func (m *SwInterfaceSetMacAddressReply) Marshal(b []byte) ([]byte, error) {
2461 b = make([]byte, m.Size())
2463 buf := codec.NewBuffer(b)
2464 buf.EncodeInt32(m.Retval)
2465 return buf.Bytes(), nil
2467 func (m *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error {
2468 buf := codec.NewBuffer(b)
2469 m.Retval = buf.DecodeInt32()
2473 // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'.
2474 type SwInterfaceSetMtu struct {
2475 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2476 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
2479 func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} }
2480 func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" }
2481 func (*SwInterfaceSetMtu) GetCrcString() string { return "5cbe85e5" }
2482 func (*SwInterfaceSetMtu) GetMessageType() api.MessageType {
2483 return api.RequestMessage
2486 func (m *SwInterfaceSetMtu) Size() (size int) {
2490 size += 4 // m.SwIfIndex
2491 size += 4 * 4 // m.Mtu
2494 func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
2496 b = make([]byte, m.Size())
2498 buf := codec.NewBuffer(b)
2499 buf.EncodeUint32(uint32(m.SwIfIndex))
2500 for i := 0; i < 4; i++ {
2503 x = uint32(m.Mtu[i])
2507 return buf.Bytes(), nil
2509 func (m *SwInterfaceSetMtu) Unmarshal(b []byte) error {
2510 buf := codec.NewBuffer(b)
2511 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2512 m.Mtu = make([]uint32, 4)
2513 for i := 0; i < len(m.Mtu); i++ {
2514 m.Mtu[i] = buf.DecodeUint32()
2519 // SwInterfaceSetMtuReply defines message 'sw_interface_set_mtu_reply'.
2520 type SwInterfaceSetMtuReply struct {
2521 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2524 func (m *SwInterfaceSetMtuReply) Reset() { *m = SwInterfaceSetMtuReply{} }
2525 func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" }
2526 func (*SwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
2527 func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType {
2528 return api.ReplyMessage
2531 func (m *SwInterfaceSetMtuReply) Size() (size int) {
2535 size += 4 // m.Retval
2538 func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
2540 b = make([]byte, m.Size())
2542 buf := codec.NewBuffer(b)
2543 buf.EncodeInt32(m.Retval)
2544 return buf.Bytes(), nil
2546 func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error {
2547 buf := codec.NewBuffer(b)
2548 m.Retval = buf.DecodeInt32()
2552 // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'.
2553 type SwInterfaceSetRxMode struct {
2554 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2555 QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
2556 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2557 Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
2560 func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} }
2561 func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" }
2562 func (*SwInterfaceSetRxMode) GetCrcString() string { return "780f5cee" }
2563 func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType {
2564 return api.RequestMessage
2567 func (m *SwInterfaceSetRxMode) Size() (size int) {
2571 size += 4 // m.SwIfIndex
2572 size += 1 // m.QueueIDValid
2573 size += 4 // m.QueueID
2577 func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
2579 b = make([]byte, m.Size())
2581 buf := codec.NewBuffer(b)
2582 buf.EncodeUint32(uint32(m.SwIfIndex))
2583 buf.EncodeBool(m.QueueIDValid)
2584 buf.EncodeUint32(m.QueueID)
2585 buf.EncodeUint32(uint32(m.Mode))
2586 return buf.Bytes(), nil
2588 func (m *SwInterfaceSetRxMode) Unmarshal(b []byte) error {
2589 buf := codec.NewBuffer(b)
2590 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2591 m.QueueIDValid = buf.DecodeBool()
2592 m.QueueID = buf.DecodeUint32()
2593 m.Mode = RxMode(buf.DecodeUint32())
2597 // SwInterfaceSetRxModeReply defines message 'sw_interface_set_rx_mode_reply'.
2598 type SwInterfaceSetRxModeReply struct {
2599 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2602 func (m *SwInterfaceSetRxModeReply) Reset() { *m = SwInterfaceSetRxModeReply{} }
2603 func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" }
2604 func (*SwInterfaceSetRxModeReply) GetCrcString() string { return "e8d4e804" }
2605 func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType {
2606 return api.ReplyMessage
2609 func (m *SwInterfaceSetRxModeReply) Size() (size int) {
2613 size += 4 // m.Retval
2616 func (m *SwInterfaceSetRxModeReply) Marshal(b []byte) ([]byte, error) {
2618 b = make([]byte, m.Size())
2620 buf := codec.NewBuffer(b)
2621 buf.EncodeInt32(m.Retval)
2622 return buf.Bytes(), nil
2624 func (m *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error {
2625 buf := codec.NewBuffer(b)
2626 m.Retval = buf.DecodeInt32()
2630 // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'.
2631 type SwInterfaceSetRxPlacement struct {
2632 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2633 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2634 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
2635 IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"`
2638 func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} }
2639 func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" }
2640 func (*SwInterfaceSetRxPlacement) GetCrcString() string { return "db65f3c9" }
2641 func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType {
2642 return api.RequestMessage
2645 func (m *SwInterfaceSetRxPlacement) Size() (size int) {
2649 size += 4 // m.SwIfIndex
2650 size += 4 // m.QueueID
2651 size += 4 // m.WorkerID
2652 size += 1 // m.IsMain
2655 func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
2657 b = make([]byte, m.Size())
2659 buf := codec.NewBuffer(b)
2660 buf.EncodeUint32(uint32(m.SwIfIndex))
2661 buf.EncodeUint32(m.QueueID)
2662 buf.EncodeUint32(m.WorkerID)
2663 buf.EncodeBool(m.IsMain)
2664 return buf.Bytes(), nil
2666 func (m *SwInterfaceSetRxPlacement) Unmarshal(b []byte) error {
2667 buf := codec.NewBuffer(b)
2668 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2669 m.QueueID = buf.DecodeUint32()
2670 m.WorkerID = buf.DecodeUint32()
2671 m.IsMain = buf.DecodeBool()
2675 // SwInterfaceSetRxPlacementReply defines message 'sw_interface_set_rx_placement_reply'.
2676 type SwInterfaceSetRxPlacementReply struct {
2677 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2680 func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
2681 func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
2682 return "sw_interface_set_rx_placement_reply"
2684 func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" }
2685 func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType {
2686 return api.ReplyMessage
2689 func (m *SwInterfaceSetRxPlacementReply) Size() (size int) {
2693 size += 4 // m.Retval
2696 func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) {
2698 b = make([]byte, m.Size())
2700 buf := codec.NewBuffer(b)
2701 buf.EncodeInt32(m.Retval)
2702 return buf.Bytes(), nil
2704 func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error {
2705 buf := codec.NewBuffer(b)
2706 m.Retval = buf.DecodeInt32()
2710 // SwInterfaceSetTable defines message 'sw_interface_set_table'.
2711 type SwInterfaceSetTable struct {
2712 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2713 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2714 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2717 func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} }
2718 func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" }
2719 func (*SwInterfaceSetTable) GetCrcString() string { return "df42a577" }
2720 func (*SwInterfaceSetTable) GetMessageType() api.MessageType {
2721 return api.RequestMessage
2724 func (m *SwInterfaceSetTable) Size() (size int) {
2728 size += 4 // m.SwIfIndex
2729 size += 1 // m.IsIPv6
2730 size += 4 // m.VrfID
2733 func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
2735 b = make([]byte, m.Size())
2737 buf := codec.NewBuffer(b)
2738 buf.EncodeUint32(uint32(m.SwIfIndex))
2739 buf.EncodeBool(m.IsIPv6)
2740 buf.EncodeUint32(m.VrfID)
2741 return buf.Bytes(), nil
2743 func (m *SwInterfaceSetTable) Unmarshal(b []byte) error {
2744 buf := codec.NewBuffer(b)
2745 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2746 m.IsIPv6 = buf.DecodeBool()
2747 m.VrfID = buf.DecodeUint32()
2751 // SwInterfaceSetTableReply defines message 'sw_interface_set_table_reply'.
2752 type SwInterfaceSetTableReply struct {
2753 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2756 func (m *SwInterfaceSetTableReply) Reset() { *m = SwInterfaceSetTableReply{} }
2757 func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" }
2758 func (*SwInterfaceSetTableReply) GetCrcString() string { return "e8d4e804" }
2759 func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType {
2760 return api.ReplyMessage
2763 func (m *SwInterfaceSetTableReply) Size() (size int) {
2767 size += 4 // m.Retval
2770 func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) {
2772 b = make([]byte, m.Size())
2774 buf := codec.NewBuffer(b)
2775 buf.EncodeInt32(m.Retval)
2776 return buf.Bytes(), nil
2778 func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error {
2779 buf := codec.NewBuffer(b)
2780 m.Retval = buf.DecodeInt32()
2784 // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'.
2785 type SwInterfaceSetUnnumbered struct {
2786 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2787 UnnumberedSwIfIndex InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
2788 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2791 func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} }
2792 func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" }
2793 func (*SwInterfaceSetUnnumbered) GetCrcString() string { return "938ef33b" }
2794 func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType {
2795 return api.RequestMessage
2798 func (m *SwInterfaceSetUnnumbered) Size() (size int) {
2802 size += 4 // m.SwIfIndex
2803 size += 4 // m.UnnumberedSwIfIndex
2804 size += 1 // m.IsAdd
2807 func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
2809 b = make([]byte, m.Size())
2811 buf := codec.NewBuffer(b)
2812 buf.EncodeUint32(uint32(m.SwIfIndex))
2813 buf.EncodeUint32(uint32(m.UnnumberedSwIfIndex))
2814 buf.EncodeBool(m.IsAdd)
2815 return buf.Bytes(), nil
2817 func (m *SwInterfaceSetUnnumbered) Unmarshal(b []byte) error {
2818 buf := codec.NewBuffer(b)
2819 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2820 m.UnnumberedSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2821 m.IsAdd = buf.DecodeBool()
2825 // SwInterfaceSetUnnumberedReply defines message 'sw_interface_set_unnumbered_reply'.
2826 type SwInterfaceSetUnnumberedReply struct {
2827 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2830 func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
2831 func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
2832 return "sw_interface_set_unnumbered_reply"
2834 func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" }
2835 func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType {
2836 return api.ReplyMessage
2839 func (m *SwInterfaceSetUnnumberedReply) Size() (size int) {
2843 size += 4 // m.Retval
2846 func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) {
2848 b = make([]byte, m.Size())
2850 buf := codec.NewBuffer(b)
2851 buf.EncodeInt32(m.Retval)
2852 return buf.Bytes(), nil
2854 func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error {
2855 buf := codec.NewBuffer(b)
2856 m.Retval = buf.DecodeInt32()
2860 // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'.
2861 type SwInterfaceTagAddDel struct {
2862 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2863 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2864 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
2867 func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} }
2868 func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" }
2869 func (*SwInterfaceTagAddDel) GetCrcString() string { return "426f8bc1" }
2870 func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType {
2871 return api.RequestMessage
2874 func (m *SwInterfaceTagAddDel) Size() (size int) {
2878 size += 1 // m.IsAdd
2879 size += 4 // m.SwIfIndex
2883 func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
2885 b = make([]byte, m.Size())
2887 buf := codec.NewBuffer(b)
2888 buf.EncodeBool(m.IsAdd)
2889 buf.EncodeUint32(uint32(m.SwIfIndex))
2890 buf.EncodeString(m.Tag, 64)
2891 return buf.Bytes(), nil
2893 func (m *SwInterfaceTagAddDel) Unmarshal(b []byte) error {
2894 buf := codec.NewBuffer(b)
2895 m.IsAdd = buf.DecodeBool()
2896 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2897 m.Tag = buf.DecodeString(64)
2901 // SwInterfaceTagAddDelReply defines message 'sw_interface_tag_add_del_reply'.
2902 type SwInterfaceTagAddDelReply struct {
2903 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2906 func (m *SwInterfaceTagAddDelReply) Reset() { *m = SwInterfaceTagAddDelReply{} }
2907 func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" }
2908 func (*SwInterfaceTagAddDelReply) GetCrcString() string { return "e8d4e804" }
2909 func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType {
2910 return api.ReplyMessage
2913 func (m *SwInterfaceTagAddDelReply) Size() (size int) {
2917 size += 4 // m.Retval
2920 func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) {
2922 b = make([]byte, m.Size())
2924 buf := codec.NewBuffer(b)
2925 buf.EncodeInt32(m.Retval)
2926 return buf.Bytes(), nil
2928 func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error {
2929 buf := codec.NewBuffer(b)
2930 m.Retval = buf.DecodeInt32()
2934 // WantInterfaceEvents defines message 'want_interface_events'.
2935 type WantInterfaceEvents struct {
2936 EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
2937 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2940 func (m *WantInterfaceEvents) Reset() { *m = WantInterfaceEvents{} }
2941 func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" }
2942 func (*WantInterfaceEvents) GetCrcString() string { return "476f5a08" }
2943 func (*WantInterfaceEvents) GetMessageType() api.MessageType {
2944 return api.RequestMessage
2947 func (m *WantInterfaceEvents) Size() (size int) {
2951 size += 4 // m.EnableDisable
2955 func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
2957 b = make([]byte, m.Size())
2959 buf := codec.NewBuffer(b)
2960 buf.EncodeUint32(m.EnableDisable)
2961 buf.EncodeUint32(m.PID)
2962 return buf.Bytes(), nil
2964 func (m *WantInterfaceEvents) Unmarshal(b []byte) error {
2965 buf := codec.NewBuffer(b)
2966 m.EnableDisable = buf.DecodeUint32()
2967 m.PID = buf.DecodeUint32()
2971 // WantInterfaceEventsReply defines message 'want_interface_events_reply'.
2972 type WantInterfaceEventsReply struct {
2973 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2976 func (m *WantInterfaceEventsReply) Reset() { *m = WantInterfaceEventsReply{} }
2977 func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" }
2978 func (*WantInterfaceEventsReply) GetCrcString() string { return "e8d4e804" }
2979 func (*WantInterfaceEventsReply) GetMessageType() api.MessageType {
2980 return api.ReplyMessage
2983 func (m *WantInterfaceEventsReply) Size() (size int) {
2987 size += 4 // m.Retval
2990 func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) {
2992 b = make([]byte, m.Size())
2994 buf := codec.NewBuffer(b)
2995 buf.EncodeInt32(m.Retval)
2996 return buf.Bytes(), nil
2998 func (m *WantInterfaceEventsReply) Unmarshal(b []byte) error {
2999 buf := codec.NewBuffer(b)
3000 m.Retval = buf.DecodeInt32()
3004 func init() { file_interfaces_binapi_init() }
3005 func file_interfaces_binapi_init() {
3006 api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "collect_detailed_interface_stats_5501adee")
3007 api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "collect_detailed_interface_stats_reply_e8d4e804")
3008 api.RegisterMessage((*CreateLoopback)(nil), "create_loopback_42bb5d22")
3009 api.RegisterMessage((*CreateLoopbackInstance)(nil), "create_loopback_instance_d36a3ee2")
3010 api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "create_loopback_instance_reply_5383d31f")
3011 api.RegisterMessage((*CreateLoopbackReply)(nil), "create_loopback_reply_5383d31f")
3012 api.RegisterMessage((*CreateSubif)(nil), "create_subif_cb371063")
3013 api.RegisterMessage((*CreateSubifReply)(nil), "create_subif_reply_5383d31f")
3014 api.RegisterMessage((*CreateVlanSubif)(nil), "create_vlan_subif_af34ac8b")
3015 api.RegisterMessage((*CreateVlanSubifReply)(nil), "create_vlan_subif_reply_5383d31f")
3016 api.RegisterMessage((*DeleteLoopback)(nil), "delete_loopback_f9e6675e")
3017 api.RegisterMessage((*DeleteLoopbackReply)(nil), "delete_loopback_reply_e8d4e804")
3018 api.RegisterMessage((*DeleteSubif)(nil), "delete_subif_f9e6675e")
3019 api.RegisterMessage((*DeleteSubifReply)(nil), "delete_subif_reply_e8d4e804")
3020 api.RegisterMessage((*HwInterfaceSetMtu)(nil), "hw_interface_set_mtu_e6746899")
3021 api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804")
3022 api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8")
3023 api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804")
3024 api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5803d5c4")
3025 api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804")
3026 api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4")
3027 api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "sw_interface_add_del_mac_address_reply_e8d4e804")
3028 api.RegisterMessage((*SwInterfaceClearStats)(nil), "sw_interface_clear_stats_f9e6675e")
3029 api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "sw_interface_clear_stats_reply_e8d4e804")
3030 api.RegisterMessage((*SwInterfaceDetails)(nil), "sw_interface_details_17b69fa2")
3031 api.RegisterMessage((*SwInterfaceDump)(nil), "sw_interface_dump_aa610c27")
3032 api.RegisterMessage((*SwInterfaceEvent)(nil), "sw_interface_event_f709f78d")
3033 api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "sw_interface_get_mac_address_f9e6675e")
3034 api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "sw_interface_get_mac_address_reply_40ef2c08")
3035 api.RegisterMessage((*SwInterfaceGetTable)(nil), "sw_interface_get_table_2d033de4")
3036 api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "sw_interface_get_table_reply_a6eb0109")
3037 api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "sw_interface_rx_placement_details_f6d7d024")
3038 api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e")
3039 api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_6a2b491a")
3040 api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804")
3041 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb")
3042 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804")
3043 api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_6aca746a")
3044 api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "sw_interface_set_mac_address_reply_e8d4e804")
3045 api.RegisterMessage((*SwInterfaceSetMtu)(nil), "sw_interface_set_mtu_5cbe85e5")
3046 api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "sw_interface_set_mtu_reply_e8d4e804")
3047 api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "sw_interface_set_rx_mode_780f5cee")
3048 api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "sw_interface_set_rx_mode_reply_e8d4e804")
3049 api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "sw_interface_set_rx_placement_db65f3c9")
3050 api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804")
3051 api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577")
3052 api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804")
3053 api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_938ef33b")
3054 api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804")
3055 api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1")
3056 api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804")
3057 api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08")
3058 api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804")
3061 // Messages returns list of all messages in this module.
3062 func AllMessages() []api.Message {
3063 return []api.Message{
3064 (*CollectDetailedInterfaceStats)(nil),
3065 (*CollectDetailedInterfaceStatsReply)(nil),
3066 (*CreateLoopback)(nil),
3067 (*CreateLoopbackInstance)(nil),
3068 (*CreateLoopbackInstanceReply)(nil),
3069 (*CreateLoopbackReply)(nil),
3070 (*CreateSubif)(nil),
3071 (*CreateSubifReply)(nil),
3072 (*CreateVlanSubif)(nil),
3073 (*CreateVlanSubifReply)(nil),
3074 (*DeleteLoopback)(nil),
3075 (*DeleteLoopbackReply)(nil),
3076 (*DeleteSubif)(nil),
3077 (*DeleteSubifReply)(nil),
3078 (*HwInterfaceSetMtu)(nil),
3079 (*HwInterfaceSetMtuReply)(nil),
3080 (*InterfaceNameRenumber)(nil),
3081 (*InterfaceNameRenumberReply)(nil),
3082 (*SwInterfaceAddDelAddress)(nil),
3083 (*SwInterfaceAddDelAddressReply)(nil),
3084 (*SwInterfaceAddDelMacAddress)(nil),
3085 (*SwInterfaceAddDelMacAddressReply)(nil),
3086 (*SwInterfaceClearStats)(nil),
3087 (*SwInterfaceClearStatsReply)(nil),
3088 (*SwInterfaceDetails)(nil),
3089 (*SwInterfaceDump)(nil),
3090 (*SwInterfaceEvent)(nil),
3091 (*SwInterfaceGetMacAddress)(nil),
3092 (*SwInterfaceGetMacAddressReply)(nil),
3093 (*SwInterfaceGetTable)(nil),
3094 (*SwInterfaceGetTableReply)(nil),
3095 (*SwInterfaceRxPlacementDetails)(nil),
3096 (*SwInterfaceRxPlacementDump)(nil),
3097 (*SwInterfaceSetFlags)(nil),
3098 (*SwInterfaceSetFlagsReply)(nil),
3099 (*SwInterfaceSetIPDirectedBroadcast)(nil),
3100 (*SwInterfaceSetIPDirectedBroadcastReply)(nil),
3101 (*SwInterfaceSetMacAddress)(nil),
3102 (*SwInterfaceSetMacAddressReply)(nil),
3103 (*SwInterfaceSetMtu)(nil),
3104 (*SwInterfaceSetMtuReply)(nil),
3105 (*SwInterfaceSetRxMode)(nil),
3106 (*SwInterfaceSetRxModeReply)(nil),
3107 (*SwInterfaceSetRxPlacement)(nil),
3108 (*SwInterfaceSetRxPlacementReply)(nil),
3109 (*SwInterfaceSetTable)(nil),
3110 (*SwInterfaceSetTableReply)(nil),
3111 (*SwInterfaceSetUnnumbered)(nil),
3112 (*SwInterfaceSetUnnumberedReply)(nil),
3113 (*SwInterfaceTagAddDel)(nil),
3114 (*SwInterfaceTagAddDelReply)(nil),
3115 (*WantInterfaceEvents)(nil),
3116 (*WantInterfaceEventsReply)(nil),