aboutsummaryrefslogtreecommitdiffstats
path: root/examples/binapi/interfaces/interfaces.ba.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/binapi/interfaces/interfaces.ba.go')
-rw-r--r--examples/binapi/interfaces/interfaces.ba.go3751
1 files changed, 3280 insertions, 471 deletions
diff --git a/examples/binapi/interfaces/interfaces.ba.go b/examples/binapi/interfaces/interfaces.ba.go
index 7d4031f..82e8f3c 100644
--- a/examples/binapi/interfaces/interfaces.ba.go
+++ b/examples/binapi/interfaces/interfaces.ba.go
@@ -1,33 +1,40 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+// versions:
+// binapi-generator: v0.4.0-alpha-1-g435c3f4-dirty
+// VPP: 20.01-45~g7a071e370~b63
// source: /usr/share/vpp/api/core/interface.api.json
/*
-Package interfaces is a generated VPP binary API for 'interface' module.
+Package interfaces contains generated code for VPP binary API defined by interface.api (version 3.2.2).
It consists of:
- 10 enums
7 aliases
+ 10 enums
+ 53 messages
6 types
1 union
- 53 messages
- 26 services
*/
package interfaces
import (
"bytes"
"context"
+ "encoding/binary"
"io"
+ "math"
"strconv"
api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
struc "github.com/lunixbochs/struc"
-
- ethernet_types "git.fd.io/govpp.git/examples/binapi/ethernet_types"
- interface_types "git.fd.io/govpp.git/examples/binapi/interface_types"
- ip_types "git.fd.io/govpp.git/examples/binapi/ip_types"
)
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the GoVPP api package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// GoVPP api package needs to be updated.
+const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
+
const (
// ModuleName is the name of this module.
ModuleName = "interface"
@@ -37,58 +44,536 @@ const (
VersionCrc = 0xfebc3ffa
)
-type AddressFamily = ip_types.AddressFamily
+// AddressFamily represents VPP binary API enum 'address_family'.
+type AddressFamily uint32
+
+const (
+ ADDRESS_IP4 AddressFamily = 0
+ ADDRESS_IP6 AddressFamily = 1
+)
+
+var (
+ AddressFamily_name = map[uint32]string{
+ 0: "ADDRESS_IP4",
+ 1: "ADDRESS_IP6",
+ }
+ AddressFamily_value = map[string]uint32{
+ "ADDRESS_IP4": 0,
+ "ADDRESS_IP6": 1,
+ }
+)
+
+func (x AddressFamily) String() string {
+ s, ok := AddressFamily_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
+}
+
+// IfStatusFlags represents VPP binary API enum 'if_status_flags'.
+type IfStatusFlags uint32
+
+const (
+ IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
+ IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
+)
+
+var (
+ IfStatusFlags_name = map[uint32]string{
+ 1: "IF_STATUS_API_FLAG_ADMIN_UP",
+ 2: "IF_STATUS_API_FLAG_LINK_UP",
+ }
+ IfStatusFlags_value = map[string]uint32{
+ "IF_STATUS_API_FLAG_ADMIN_UP": 1,
+ "IF_STATUS_API_FLAG_LINK_UP": 2,
+ }
+)
+
+func (x IfStatusFlags) String() string {
+ s, ok := IfStatusFlags_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "IfStatusFlags(" + strconv.Itoa(int(x)) + ")"
+}
+
+// IfType represents VPP binary API enum 'if_type'.
+type IfType uint32
+
+const (
+ IF_API_TYPE_HARDWARE IfType = 1
+ IF_API_TYPE_SUB IfType = 2
+ IF_API_TYPE_P2P IfType = 3
+ IF_API_TYPE_PIPE IfType = 4
+)
+
+var (
+ IfType_name = map[uint32]string{
+ 1: "IF_API_TYPE_HARDWARE",
+ 2: "IF_API_TYPE_SUB",
+ 3: "IF_API_TYPE_P2P",
+ 4: "IF_API_TYPE_PIPE",
+ }
+ IfType_value = map[string]uint32{
+ "IF_API_TYPE_HARDWARE": 1,
+ "IF_API_TYPE_SUB": 2,
+ "IF_API_TYPE_P2P": 3,
+ "IF_API_TYPE_PIPE": 4,
+ }
+)
+
+func (x IfType) String() string {
+ s, ok := IfType_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "IfType(" + strconv.Itoa(int(x)) + ")"
+}
+
+// IPDscp represents VPP binary API enum 'ip_dscp'.
+type IPDscp uint8
+
+const (
+ IP_API_DSCP_CS0 IPDscp = 0
+ IP_API_DSCP_CS1 IPDscp = 8
+ IP_API_DSCP_AF11 IPDscp = 10
+ IP_API_DSCP_AF12 IPDscp = 12
+ IP_API_DSCP_AF13 IPDscp = 14
+ IP_API_DSCP_CS2 IPDscp = 16
+ IP_API_DSCP_AF21 IPDscp = 18
+ IP_API_DSCP_AF22 IPDscp = 20
+ IP_API_DSCP_AF23 IPDscp = 22
+ IP_API_DSCP_CS3 IPDscp = 24
+ IP_API_DSCP_AF31 IPDscp = 26
+ IP_API_DSCP_AF32 IPDscp = 28
+ IP_API_DSCP_AF33 IPDscp = 30
+ IP_API_DSCP_CS4 IPDscp = 32
+ IP_API_DSCP_AF41 IPDscp = 34
+ IP_API_DSCP_AF42 IPDscp = 36
+ IP_API_DSCP_AF43 IPDscp = 38
+ IP_API_DSCP_CS5 IPDscp = 40
+ IP_API_DSCP_EF IPDscp = 46
+ IP_API_DSCP_CS6 IPDscp = 48
+ IP_API_DSCP_CS7 IPDscp = 50
+)
+
+var (
+ IPDscp_name = map[uint8]string{
+ 0: "IP_API_DSCP_CS0",
+ 8: "IP_API_DSCP_CS1",
+ 10: "IP_API_DSCP_AF11",
+ 12: "IP_API_DSCP_AF12",
+ 14: "IP_API_DSCP_AF13",
+ 16: "IP_API_DSCP_CS2",
+ 18: "IP_API_DSCP_AF21",
+ 20: "IP_API_DSCP_AF22",
+ 22: "IP_API_DSCP_AF23",
+ 24: "IP_API_DSCP_CS3",
+ 26: "IP_API_DSCP_AF31",
+ 28: "IP_API_DSCP_AF32",
+ 30: "IP_API_DSCP_AF33",
+ 32: "IP_API_DSCP_CS4",
+ 34: "IP_API_DSCP_AF41",
+ 36: "IP_API_DSCP_AF42",
+ 38: "IP_API_DSCP_AF43",
+ 40: "IP_API_DSCP_CS5",
+ 46: "IP_API_DSCP_EF",
+ 48: "IP_API_DSCP_CS6",
+ 50: "IP_API_DSCP_CS7",
+ }
+ IPDscp_value = map[string]uint8{
+ "IP_API_DSCP_CS0": 0,
+ "IP_API_DSCP_CS1": 8,
+ "IP_API_DSCP_AF11": 10,
+ "IP_API_DSCP_AF12": 12,
+ "IP_API_DSCP_AF13": 14,
+ "IP_API_DSCP_CS2": 16,
+ "IP_API_DSCP_AF21": 18,
+ "IP_API_DSCP_AF22": 20,
+ "IP_API_DSCP_AF23": 22,
+ "IP_API_DSCP_CS3": 24,
+ "IP_API_DSCP_AF31": 26,
+ "IP_API_DSCP_AF32": 28,
+ "IP_API_DSCP_AF33": 30,
+ "IP_API_DSCP_CS4": 32,
+ "IP_API_DSCP_AF41": 34,
+ "IP_API_DSCP_AF42": 36,
+ "IP_API_DSCP_AF43": 38,
+ "IP_API_DSCP_CS5": 40,
+ "IP_API_DSCP_EF": 46,
+ "IP_API_DSCP_CS6": 48,
+ "IP_API_DSCP_CS7": 50,
+ }
+)
+
+func (x IPDscp) String() string {
+ s, ok := IPDscp_name[uint8(x)]
+ if ok {
+ return s
+ }
+ return "IPDscp(" + strconv.Itoa(int(x)) + ")"
+}
+
+// IPEcn represents VPP binary API enum 'ip_ecn'.
+type IPEcn uint8
+
+const (
+ IP_API_ECN_NONE IPEcn = 0
+ IP_API_ECN_ECT0 IPEcn = 1
+ IP_API_ECN_ECT1 IPEcn = 2
+ IP_API_ECN_CE IPEcn = 3
+)
+
+var (
+ IPEcn_name = map[uint8]string{
+ 0: "IP_API_ECN_NONE",
+ 1: "IP_API_ECN_ECT0",
+ 2: "IP_API_ECN_ECT1",
+ 3: "IP_API_ECN_CE",
+ }
+ IPEcn_value = map[string]uint8{
+ "IP_API_ECN_NONE": 0,
+ "IP_API_ECN_ECT0": 1,
+ "IP_API_ECN_ECT1": 2,
+ "IP_API_ECN_CE": 3,
+ }
+)
+
+func (x IPEcn) String() string {
+ s, ok := IPEcn_name[uint8(x)]
+ if ok {
+ return s
+ }
+ return "IPEcn(" + strconv.Itoa(int(x)) + ")"
+}
-type IfStatusFlags = interface_types.IfStatusFlags
+// IPProto represents VPP binary API enum 'ip_proto'.
+type IPProto uint32
-type IfType = interface_types.IfType
+const (
+ IP_API_PROTO_HOPOPT IPProto = 0
+ IP_API_PROTO_ICMP IPProto = 1
+ IP_API_PROTO_IGMP IPProto = 2
+ IP_API_PROTO_TCP IPProto = 6
+ IP_API_PROTO_UDP IPProto = 17
+ IP_API_PROTO_GRE IPProto = 47
+ IP_API_PROTO_AH IPProto = 50
+ IP_API_PROTO_ESP IPProto = 51
+ IP_API_PROTO_EIGRP IPProto = 88
+ IP_API_PROTO_OSPF IPProto = 89
+ IP_API_PROTO_SCTP IPProto = 132
+ IP_API_PROTO_RESERVED IPProto = 255
+)
-type IPDscp = ip_types.IPDscp
+var (
+ IPProto_name = map[uint32]string{
+ 0: "IP_API_PROTO_HOPOPT",
+ 1: "IP_API_PROTO_ICMP",
+ 2: "IP_API_PROTO_IGMP",
+ 6: "IP_API_PROTO_TCP",
+ 17: "IP_API_PROTO_UDP",
+ 47: "IP_API_PROTO_GRE",
+ 50: "IP_API_PROTO_AH",
+ 51: "IP_API_PROTO_ESP",
+ 88: "IP_API_PROTO_EIGRP",
+ 89: "IP_API_PROTO_OSPF",
+ 132: "IP_API_PROTO_SCTP",
+ 255: "IP_API_PROTO_RESERVED",
+ }
+ IPProto_value = map[string]uint32{
+ "IP_API_PROTO_HOPOPT": 0,
+ "IP_API_PROTO_ICMP": 1,
+ "IP_API_PROTO_IGMP": 2,
+ "IP_API_PROTO_TCP": 6,
+ "IP_API_PROTO_UDP": 17,
+ "IP_API_PROTO_GRE": 47,
+ "IP_API_PROTO_AH": 50,
+ "IP_API_PROTO_ESP": 51,
+ "IP_API_PROTO_EIGRP": 88,
+ "IP_API_PROTO_OSPF": 89,
+ "IP_API_PROTO_SCTP": 132,
+ "IP_API_PROTO_RESERVED": 255,
+ }
+)
-type IPEcn = ip_types.IPEcn
+func (x IPProto) String() string {
+ s, ok := IPProto_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "IPProto(" + strconv.Itoa(int(x)) + ")"
+}
-type IPProto = ip_types.IPProto
+// LinkDuplex represents VPP binary API enum 'link_duplex'.
+type LinkDuplex uint32
-type LinkDuplex = interface_types.LinkDuplex
+const (
+ LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
+ LINK_DUPLEX_API_HALF LinkDuplex = 1
+ LINK_DUPLEX_API_FULL LinkDuplex = 2
+)
-type MtuProto = interface_types.MtuProto
+var (
+ LinkDuplex_name = map[uint32]string{
+ 0: "LINK_DUPLEX_API_UNKNOWN",
+ 1: "LINK_DUPLEX_API_HALF",
+ 2: "LINK_DUPLEX_API_FULL",
+ }
+ LinkDuplex_value = map[string]uint32{
+ "LINK_DUPLEX_API_UNKNOWN": 0,
+ "LINK_DUPLEX_API_HALF": 1,
+ "LINK_DUPLEX_API_FULL": 2,
+ }
+)
-type RxMode = interface_types.RxMode
+func (x LinkDuplex) String() string {
+ s, ok := LinkDuplex_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
+}
-type SubIfFlags = interface_types.SubIfFlags
+// MtuProto represents VPP binary API enum 'mtu_proto'.
+type MtuProto uint32
-type AddressWithPrefix = ip_types.AddressWithPrefix
+const (
+ MTU_PROTO_API_L3 MtuProto = 1
+ MTU_PROTO_API_IP4 MtuProto = 2
+ MTU_PROTO_API_IP6 MtuProto = 3
+ MTU_PROTO_API_MPLS MtuProto = 4
+ MTU_PROTO_API_N MtuProto = 5
+)
-type InterfaceIndex = interface_types.InterfaceIndex
+var (
+ MtuProto_name = map[uint32]string{
+ 1: "MTU_PROTO_API_L3",
+ 2: "MTU_PROTO_API_IP4",
+ 3: "MTU_PROTO_API_IP6",
+ 4: "MTU_PROTO_API_MPLS",
+ 5: "MTU_PROTO_API_N",
+ }
+ MtuProto_value = map[string]uint32{
+ "MTU_PROTO_API_L3": 1,
+ "MTU_PROTO_API_IP4": 2,
+ "MTU_PROTO_API_IP6": 3,
+ "MTU_PROTO_API_MPLS": 4,
+ "MTU_PROTO_API_N": 5,
+ }
+)
-type IP4Address = ip_types.IP4Address
+func (x MtuProto) String() string {
+ s, ok := MtuProto_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "MtuProto(" + strconv.Itoa(int(x)) + ")"
+}
-type IP4AddressWithPrefix = ip_types.IP4AddressWithPrefix
+// RxMode represents VPP binary API enum 'rx_mode'.
+type RxMode uint32
-type IP6Address = ip_types.IP6Address
+const (
+ RX_MODE_API_UNKNOWN RxMode = 0
+ RX_MODE_API_POLLING RxMode = 1
+ RX_MODE_API_INTERRUPT RxMode = 2
+ RX_MODE_API_ADAPTIVE RxMode = 3
+ RX_MODE_API_DEFAULT RxMode = 4
+)
-type IP6AddressWithPrefix = ip_types.IP6AddressWithPrefix
+var (
+ RxMode_name = map[uint32]string{
+ 0: "RX_MODE_API_UNKNOWN",
+ 1: "RX_MODE_API_POLLING",
+ 2: "RX_MODE_API_INTERRUPT",
+ 3: "RX_MODE_API_ADAPTIVE",
+ 4: "RX_MODE_API_DEFAULT",
+ }
+ RxMode_value = map[string]uint32{
+ "RX_MODE_API_UNKNOWN": 0,
+ "RX_MODE_API_POLLING": 1,
+ "RX_MODE_API_INTERRUPT": 2,
+ "RX_MODE_API_ADAPTIVE": 3,
+ "RX_MODE_API_DEFAULT": 4,
+ }
+)
-type MacAddress = ethernet_types.MacAddress
+func (x RxMode) String() string {
+ s, ok := RxMode_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "RxMode(" + strconv.Itoa(int(x)) + ")"
+}
-type Address = ip_types.Address
+// SubIfFlags represents VPP binary API enum 'sub_if_flags'.
+type SubIfFlags uint32
-type IP4Prefix = ip_types.IP4Prefix
+const (
+ SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
+ SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
+ SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
+ SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
+ SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
+ SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
+ SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
+ SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
+ SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
+ SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
+)
+
+var (
+ SubIfFlags_name = map[uint32]string{
+ 1: "SUB_IF_API_FLAG_NO_TAGS",
+ 2: "SUB_IF_API_FLAG_ONE_TAG",
+ 4: "SUB_IF_API_FLAG_TWO_TAGS",
+ 8: "SUB_IF_API_FLAG_DOT1AD",
+ 16: "SUB_IF_API_FLAG_EXACT_MATCH",
+ 32: "SUB_IF_API_FLAG_DEFAULT",
+ 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
+ 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
+ 254: "SUB_IF_API_FLAG_MASK_VNET",
+ 256: "SUB_IF_API_FLAG_DOT1AH",
+ }
+ SubIfFlags_value = map[string]uint32{
+ "SUB_IF_API_FLAG_NO_TAGS": 1,
+ "SUB_IF_API_FLAG_ONE_TAG": 2,
+ "SUB_IF_API_FLAG_TWO_TAGS": 4,
+ "SUB_IF_API_FLAG_DOT1AD": 8,
+ "SUB_IF_API_FLAG_EXACT_MATCH": 16,
+ "SUB_IF_API_FLAG_DEFAULT": 32,
+ "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
+ "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
+ "SUB_IF_API_FLAG_MASK_VNET": 254,
+ "SUB_IF_API_FLAG_DOT1AH": 256,
+ }
+)
+
+func (x SubIfFlags) String() string {
+ s, ok := SubIfFlags_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "SubIfFlags(" + strconv.Itoa(int(x)) + ")"
+}
+
+// AddressWithPrefix represents VPP binary API alias 'address_with_prefix'.
+type AddressWithPrefix Prefix
+
+// InterfaceIndex represents VPP binary API alias 'interface_index'.
+type InterfaceIndex uint32
+
+// IP4Address represents VPP binary API alias 'ip4_address'.
+type IP4Address [4]uint8
+
+// IP4AddressWithPrefix represents VPP binary API alias 'ip4_address_with_prefix'.
+type IP4AddressWithPrefix IP4Prefix
+
+// IP6Address represents VPP binary API alias 'ip6_address'.
+type IP6Address [16]uint8
+
+// IP6AddressWithPrefix represents VPP binary API alias 'ip6_address_with_prefix'.
+type IP6AddressWithPrefix IP6Prefix
-type IP6Prefix = ip_types.IP6Prefix
+// MacAddress represents VPP binary API alias 'mac_address'.
+type MacAddress [6]uint8
-type Mprefix = ip_types.Mprefix
+// Address represents VPP binary API type 'address'.
+type Address struct {
+ Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
+ Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
+}
+
+func (*Address) GetTypeName() string { return "address" }
+
+// IP4Prefix represents VPP binary API type 'ip4_prefix'.
+type IP4Prefix struct {
+ Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
+ Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
+}
-type Prefix = ip_types.Prefix
+func (*IP4Prefix) GetTypeName() string { return "ip4_prefix" }
-type PrefixMatcher = ip_types.PrefixMatcher
+// IP6Prefix represents VPP binary API type 'ip6_prefix'.
+type IP6Prefix struct {
+ Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
+ Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
+}
+
+func (*IP6Prefix) GetTypeName() string { return "ip6_prefix" }
+
+// Mprefix represents VPP binary API type 'mprefix'.
+type Mprefix struct {
+ Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
+ GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
+ GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
+ SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
+}
-type AddressUnion = ip_types.AddressUnion
+func (*Mprefix) GetTypeName() string { return "mprefix" }
+
+// Prefix represents VPP binary API type 'prefix'.
+type Prefix struct {
+ Address Address `binapi:"address,name=address" json:"address,omitempty"`
+ Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
+}
+
+func (*Prefix) GetTypeName() string { return "prefix" }
+
+// PrefixMatcher represents VPP binary API type 'prefix_matcher'.
+type PrefixMatcher struct {
+ Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
+ Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
+}
+
+func (*PrefixMatcher) GetTypeName() string { return "prefix_matcher" }
+
+// AddressUnion represents VPP binary API union 'address_union'.
+type AddressUnion struct {
+ XXX_UnionData [16]byte
+}
+
+func (*AddressUnion) GetTypeName() string { return "address_union" }
+
+func AddressUnionIP4(a IP4Address) (u AddressUnion) {
+ u.SetIP4(a)
+ return
+}
+func (u *AddressUnion) SetIP4(a IP4Address) {
+ var b = new(bytes.Buffer)
+ if err := struc.Pack(b, &a); err != nil {
+ return
+ }
+ copy(u.XXX_UnionData[:], b.Bytes())
+}
+func (u *AddressUnion) GetIP4() (a IP4Address) {
+ var b = bytes.NewReader(u.XXX_UnionData[:])
+ struc.Unpack(b, &a)
+ return
+}
+
+func AddressUnionIP6(a IP6Address) (u AddressUnion) {
+ u.SetIP6(a)
+ return
+}
+func (u *AddressUnion) SetIP6(a IP6Address) {
+ var b = new(bytes.Buffer)
+ if err := struc.Pack(b, &a); err != nil {
+ return
+ }
+ copy(u.XXX_UnionData[:], b.Bytes())
+}
+func (u *AddressUnion) GetIP6() (a IP6Address) {
+ var b = bytes.NewReader(u.XXX_UnionData[:])
+ struc.Unpack(b, &a)
+ return
+}
// CollectDetailedInterfaceStats represents VPP binary API message 'collect_detailed_interface_stats'.
type CollectDetailedInterfaceStats struct {
- SwIfIndex InterfaceIndex
- EnableDisable bool
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
}
func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
@@ -98,9 +583,55 @@ func (*CollectDetailedInterfaceStats) GetMessageName() string {
func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" }
func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *CollectDetailedInterfaceStats) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.EnableDisable
+ size += 1
+ return size
+}
+func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.EnableDisable
+ if m.EnableDisable {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *CollectDetailedInterfaceStats) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.EnableDisable
+ m.EnableDisable = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// CollectDetailedInterfaceStatsReply represents VPP binary API message 'collect_detailed_interface_stats_reply'.
type CollectDetailedInterfaceStatsReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} }
@@ -110,9 +641,45 @@ func (*CollectDetailedInterfaceStatsReply) GetMessageName() string {
func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" }
func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *CollectDetailedInterfaceStatsReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *CollectDetailedInterfaceStatsReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// CreateLoopback represents VPP binary API message 'create_loopback'.
type CreateLoopback struct {
- MacAddress MacAddress
+ MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
}
func (m *CreateLoopback) Reset() { *m = CreateLoopback{} }
@@ -120,11 +687,55 @@ func (*CreateLoopback) GetMessageName() string { return "create_loopbac
func (*CreateLoopback) GetCrcString() string { return "42bb5d22" }
func (*CreateLoopback) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *CreateLoopback) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.MacAddress
+ size += 6
+ return size
+}
+func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.MacAddress
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.MacAddress) {
+ x = uint8(m.MacAddress[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *CreateLoopback) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.MacAddress
+ for i := 0; i < len(m.MacAddress); i++ {
+ m.MacAddress[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
+}
+
// CreateLoopbackInstance represents VPP binary API message 'create_loopback_instance'.
type CreateLoopbackInstance struct {
- MacAddress MacAddress
- IsSpecified bool
- UserInstance uint32
+ MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
+ IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
+ UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
}
func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} }
@@ -132,10 +743,72 @@ func (*CreateLoopbackInstance) GetMessageName() string { return "create
func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" }
func (*CreateLoopbackInstance) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *CreateLoopbackInstance) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.MacAddress
+ size += 6
+ // field[1] m.IsSpecified
+ size += 1
+ // field[1] m.UserInstance
+ size += 4
+ return size
+}
+func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.MacAddress
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.MacAddress) {
+ x = uint8(m.MacAddress[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.IsSpecified
+ if m.IsSpecified {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.UserInstance
+ o.PutUint32(buf[pos:pos+4], uint32(m.UserInstance))
+ pos += 4
+ return buf, nil
+}
+func (m *CreateLoopbackInstance) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.MacAddress
+ for i := 0; i < len(m.MacAddress); i++ {
+ m.MacAddress[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.IsSpecified
+ m.IsSpecified = tmp[pos] != 0
+ pos += 1
+ // field[1] m.UserInstance
+ m.UserInstance = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// CreateLoopbackInstanceReply represents VPP binary API message 'create_loopback_instance_reply'.
type CreateLoopbackInstanceReply struct {
- Retval int32
- SwIfIndex InterfaceIndex
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} }
@@ -143,10 +816,54 @@ func (*CreateLoopbackInstanceReply) GetMessageName() string { return "c
func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" }
func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *CreateLoopbackInstanceReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *CreateLoopbackInstanceReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *CreateLoopbackInstanceReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// CreateLoopbackReply represents VPP binary API message 'create_loopback_reply'.
type CreateLoopbackReply struct {
- Retval int32
- SwIfIndex InterfaceIndex
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} }
@@ -154,13 +871,57 @@ func (*CreateLoopbackReply) GetMessageName() string { return "create_lo
func (*CreateLoopbackReply) GetCrcString() string { return "5383d31f" }
func (*CreateLoopbackReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *CreateLoopbackReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *CreateLoopbackReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *CreateLoopbackReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// CreateSubif represents VPP binary API message 'create_subif'.
type CreateSubif struct {
- SwIfIndex InterfaceIndex
- SubID uint32
- SubIfFlags SubIfFlags
- OuterVlanID uint16
- InnerVlanID uint16
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
+ SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
+ OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
+ InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
}
func (m *CreateSubif) Reset() { *m = CreateSubif{} }
@@ -168,10 +929,78 @@ func (*CreateSubif) GetMessageName() string { return "create_subif" }
func (*CreateSubif) GetCrcString() string { return "cb371063" }
func (*CreateSubif) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *CreateSubif) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.SubID
+ size += 4
+ // field[1] m.SubIfFlags
+ size += 4
+ // field[1] m.OuterVlanID
+ size += 2
+ // field[1] m.InnerVlanID
+ size += 2
+ return size
+}
+func (m *CreateSubif) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.SubID
+ o.PutUint32(buf[pos:pos+4], uint32(m.SubID))
+ pos += 4
+ // field[1] m.SubIfFlags
+ o.PutUint32(buf[pos:pos+4], uint32(m.SubIfFlags))
+ pos += 4
+ // field[1] m.OuterVlanID
+ o.PutUint16(buf[pos:pos+2], uint16(m.OuterVlanID))
+ pos += 2
+ // field[1] m.InnerVlanID
+ o.PutUint16(buf[pos:pos+2], uint16(m.InnerVlanID))
+ pos += 2
+ return buf, nil
+}
+func (m *CreateSubif) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SubID
+ m.SubID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SubIfFlags
+ m.SubIfFlags = SubIfFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.OuterVlanID
+ m.OuterVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.InnerVlanID
+ m.InnerVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ return nil
+}
+
// CreateSubifReply represents VPP binary API message 'create_subif_reply'.
type CreateSubifReply struct {
- Retval int32
- SwIfIndex InterfaceIndex
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} }
@@ -179,10 +1008,54 @@ func (*CreateSubifReply) GetMessageName() string { return "create_subif
func (*CreateSubifReply) GetCrcString() string { return "5383d31f" }
func (*CreateSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *CreateSubifReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *CreateSubifReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *CreateSubifReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// CreateVlanSubif represents VPP binary API message 'create_vlan_subif'.
type CreateVlanSubif struct {
- SwIfIndex InterfaceIndex
- VlanID uint32
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
}
func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} }
@@ -190,10 +1063,54 @@ func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_s
func (*CreateVlanSubif) GetCrcString() string { return "af34ac8b" }
func (*CreateVlanSubif) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *CreateVlanSubif) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.VlanID
+ size += 4
+ return size
+}
+func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.VlanID
+ o.PutUint32(buf[pos:pos+4], uint32(m.VlanID))
+ pos += 4
+ return buf, nil
+}
+func (m *CreateVlanSubif) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.VlanID
+ m.VlanID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// CreateVlanSubifReply represents VPP binary API message 'create_vlan_subif_reply'.
type CreateVlanSubifReply struct {
- Retval int32
- SwIfIndex InterfaceIndex
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} }
@@ -201,9 +1118,53 @@ func (*CreateVlanSubifReply) GetMessageName() string { return "create_v
func (*CreateVlanSubifReply) GetCrcString() string { return "5383d31f" }
func (*CreateVlanSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *CreateVlanSubifReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *CreateVlanSubifReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *CreateVlanSubifReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// DeleteLoopback represents VPP binary API message 'delete_loopback'.
type DeleteLoopback struct {
- SwIfIndex InterfaceIndex
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} }
@@ -211,9 +1172,45 @@ func (*DeleteLoopback) GetMessageName() string { return "delete_loopbac
func (*DeleteLoopback) GetCrcString() string { return "f9e6675e" }
func (*DeleteLoopback) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *DeleteLoopback) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *DeleteLoopback) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *DeleteLoopback) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// DeleteLoopbackReply represents VPP binary API message 'delete_loopback_reply'.
type DeleteLoopbackReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *DeleteLoopbackReply) Reset() { *m = DeleteLoopbackReply{} }
@@ -221,9 +1218,45 @@ func (*DeleteLoopbackReply) GetMessageName() string { return "delete_lo
func (*DeleteLoopbackReply) GetCrcString() string { return "e8d4e804" }
func (*DeleteLoopbackReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *DeleteLoopbackReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *DeleteLoopbackReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *DeleteLoopbackReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// DeleteSubif represents VPP binary API message 'delete_subif'.
type DeleteSubif struct {
- SwIfIndex InterfaceIndex
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *DeleteSubif) Reset() { *m = DeleteSubif{} }
@@ -231,9 +1264,45 @@ func (*DeleteSubif) GetMessageName() string { return "delete_subif" }
func (*DeleteSubif) GetCrcString() string { return "f9e6675e" }
func (*DeleteSubif) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *DeleteSubif) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *DeleteSubif) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *DeleteSubif) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// DeleteSubifReply represents VPP binary API message 'delete_subif_reply'.
type DeleteSubifReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *DeleteSubifReply) Reset() { *m = DeleteSubifReply{} }
@@ -241,10 +1310,46 @@ func (*DeleteSubifReply) GetMessageName() string { return "delete_subif
func (*DeleteSubifReply) GetCrcString() string { return "e8d4e804" }
func (*DeleteSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *DeleteSubifReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *DeleteSubifReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *DeleteSubifReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// HwInterfaceSetMtu represents VPP binary API message 'hw_interface_set_mtu'.
type HwInterfaceSetMtu struct {
- SwIfIndex InterfaceIndex
- Mtu uint16
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
}
func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} }
@@ -252,9 +1357,53 @@ func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interfac
func (*HwInterfaceSetMtu) GetCrcString() string { return "e6746899" }
func (*HwInterfaceSetMtu) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *HwInterfaceSetMtu) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Mtu
+ size += 2
+ return size
+}
+func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Mtu
+ o.PutUint16(buf[pos:pos+2], uint16(m.Mtu))
+ pos += 2
+ return buf, nil
+}
+func (m *HwInterfaceSetMtu) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Mtu
+ m.Mtu = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ return nil
+}
+
// HwInterfaceSetMtuReply represents VPP binary API message 'hw_interface_set_mtu_reply'.
type HwInterfaceSetMtuReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *HwInterfaceSetMtuReply) Reset() { *m = HwInterfaceSetMtuReply{} }
@@ -262,10 +1411,46 @@ func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_int
func (*HwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *HwInterfaceSetMtuReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *HwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *HwInterfaceSetMtuReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// InterfaceNameRenumber represents VPP binary API message 'interface_name_renumber'.
type InterfaceNameRenumber struct {
- SwIfIndex InterfaceIndex
- NewShowDevInstance uint32
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
}
func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} }
@@ -273,9 +1458,53 @@ func (*InterfaceNameRenumber) GetMessageName() string { return "interfa
func (*InterfaceNameRenumber) GetCrcString() string { return "2b8858b8" }
func (*InterfaceNameRenumber) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *InterfaceNameRenumber) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.NewShowDevInstance
+ size += 4
+ return size
+}
+func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.NewShowDevInstance
+ o.PutUint32(buf[pos:pos+4], uint32(m.NewShowDevInstance))
+ pos += 4
+ return buf, nil
+}
+func (m *InterfaceNameRenumber) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.NewShowDevInstance
+ m.NewShowDevInstance = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// InterfaceNameRenumberReply represents VPP binary API message 'interface_name_renumber_reply'.
type InterfaceNameRenumberReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *InterfaceNameRenumberReply) Reset() { *m = InterfaceNameRenumberReply{} }
@@ -283,12 +1512,48 @@ func (*InterfaceNameRenumberReply) GetMessageName() string { return "in
func (*InterfaceNameRenumberReply) GetCrcString() string { return "e8d4e804" }
func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *InterfaceNameRenumberReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *InterfaceNameRenumberReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *InterfaceNameRenumberReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceAddDelAddress represents VPP binary API message 'sw_interface_add_del_address'.
type SwInterfaceAddDelAddress struct {
- SwIfIndex InterfaceIndex
- IsAdd bool
- DelAll bool
- Prefix AddressWithPrefix
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
+ DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"`
+ Prefix AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
}
func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} }
@@ -296,9 +1561,95 @@ func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_i
func (*SwInterfaceAddDelAddress) GetCrcString() string { return "5803d5c4" }
func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceAddDelAddress) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.DelAll
+ size += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ size += 4
+ // field[3] m.Prefix.Address.Un
+ size += 16
+ // field[2] m.Prefix.Len
+ size += 1
+ return size
+}
+func (m *SwInterfaceAddDelAddress) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.DelAll
+ if m.DelAll {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ o.PutUint32(buf[pos:pos+4], uint32(m.Prefix.Address.Af))
+ pos += 4
+ // field[3] m.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Prefix.Len
+ buf[pos] = uint8(m.Prefix.Len)
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceAddDelAddress) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.DelAll
+ m.DelAll = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ m.Prefix.Address.Af = AddressFamily(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Prefix.Address.Un
+ copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Prefix.Len
+ m.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ return nil
+}
+
// SwInterfaceAddDelAddressReply represents VPP binary API message 'sw_interface_add_del_address_reply'.
type SwInterfaceAddDelAddressReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} }
@@ -308,11 +1659,47 @@ func (*SwInterfaceAddDelAddressReply) GetMessageName() string {
func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceAddDelAddressReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceAddDelAddressReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceAddDelAddressReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceAddDelMacAddress represents VPP binary API message 'sw_interface_add_del_mac_address'.
type SwInterfaceAddDelMacAddress struct {
- SwIfIndex uint32
- Addr MacAddress
- IsAdd uint8
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Addr MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"`
+ IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
}
func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} }
@@ -322,9 +1709,69 @@ func (*SwInterfaceAddDelMacAddress) GetMessageName() string {
func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" }
func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceAddDelMacAddress) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Addr
+ size += 6
+ // field[1] m.IsAdd
+ size += 1
+ return size
+}
+func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Addr
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.Addr) {
+ x = uint8(m.Addr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.IsAdd
+ buf[pos] = uint8(m.IsAdd)
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceAddDelMacAddress) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Addr
+ for i := 0; i < len(m.Addr); i++ {
+ m.Addr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.IsAdd
+ m.IsAdd = uint8(tmp[pos])
+ pos += 1
+ return nil
+}
+
// SwInterfaceAddDelMacAddressReply represents VPP binary API message 'sw_interface_add_del_mac_address_reply'.
type SwInterfaceAddDelMacAddressReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} }
@@ -334,9 +1781,45 @@ func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string {
func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceAddDelMacAddressReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceAddDelMacAddressReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceClearStats represents VPP binary API message 'sw_interface_clear_stats'.
type SwInterfaceClearStats struct {
- SwIfIndex InterfaceIndex
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} }
@@ -344,9 +1827,45 @@ func (*SwInterfaceClearStats) GetMessageName() string { return "sw_inte
func (*SwInterfaceClearStats) GetCrcString() string { return "f9e6675e" }
func (*SwInterfaceClearStats) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceClearStats) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *SwInterfaceClearStats) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceClearStats) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceClearStatsReply represents VPP binary API message 'sw_interface_clear_stats_reply'.
type SwInterfaceClearStatsReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceClearStatsReply) Reset() { *m = SwInterfaceClearStatsReply{} }
@@ -354,34 +1873,70 @@ func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw
func (*SwInterfaceClearStatsReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceClearStatsReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceClearStatsReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceClearStatsReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceDetails represents VPP binary API message 'sw_interface_details'.
type SwInterfaceDetails struct {
- SwIfIndex InterfaceIndex
- SupSwIfIndex uint32
- L2Address MacAddress
- Flags IfStatusFlags
- Type IfType
- LinkDuplex LinkDuplex
- LinkSpeed uint32
- LinkMtu uint16
- Mtu []uint32 `struc:"[4]uint32"`
- SubID uint32
- SubNumberOfTags uint8
- SubOuterVlanID uint16
- SubInnerVlanID uint16
- SubIfFlags SubIfFlags
- VtrOp uint32
- VtrPushDot1q uint32
- VtrTag1 uint32
- VtrTag2 uint32
- OuterTag uint16
- BDmac MacAddress
- BSmac MacAddress
- BVlanid uint16
- ISid uint32
- InterfaceName string `struc:"[64]byte"`
- InterfaceDevType string `struc:"[64]byte"`
- Tag string `struc:"[64]byte"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
+ L2Address MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
+ Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
+ Type IfType `binapi:"if_type,name=type" json:"type,omitempty"`
+ LinkDuplex LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
+ LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
+ LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
+ Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
+ SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
+ SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
+ SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
+ SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
+ SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
+ VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
+ VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
+ VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
+ VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
+ OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
+ BDmac MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
+ BSmac MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
+ BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
+ ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
+ InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty" struc:"[64]byte"`
+ InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty" struc:"[64]byte"`
+ Tag string `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
}
func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} }
@@ -389,12 +1944,290 @@ func (*SwInterfaceDetails) GetMessageName() string { return "sw_interfa
func (*SwInterfaceDetails) GetCrcString() string { return "17b69fa2" }
func (*SwInterfaceDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.SupSwIfIndex
+ size += 4
+ // field[1] m.L2Address
+ size += 6
+ // field[1] m.Flags
+ size += 4
+ // field[1] m.Type
+ size += 4
+ // field[1] m.LinkDuplex
+ size += 4
+ // field[1] m.LinkSpeed
+ size += 4
+ // field[1] m.LinkMtu
+ size += 2
+ // field[1] m.Mtu
+ size += 16
+ // field[1] m.SubID
+ size += 4
+ // field[1] m.SubNumberOfTags
+ size += 1
+ // field[1] m.SubOuterVlanID
+ size += 2
+ // field[1] m.SubInnerVlanID
+ size += 2
+ // field[1] m.SubIfFlags
+ size += 4
+ // field[1] m.VtrOp
+ size += 4
+ // field[1] m.VtrPushDot1q
+ size += 4
+ // field[1] m.VtrTag1
+ size += 4
+ // field[1] m.VtrTag2
+ size += 4
+ // field[1] m.OuterTag
+ size += 2
+ // field[1] m.BDmac
+ size += 6
+ // field[1] m.BSmac
+ size += 6
+ // field[1] m.BVlanid
+ size += 2
+ // field[1] m.ISid
+ size += 4
+ // field[1] m.InterfaceName
+ size += 64
+ // field[1] m.InterfaceDevType
+ size += 64
+ // field[1] m.Tag
+ size += 64
+ return size
+}
+func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.SupSwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SupSwIfIndex))
+ pos += 4
+ // field[1] m.L2Address
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.L2Address) {
+ x = uint8(m.L2Address[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(m.Flags))
+ pos += 4
+ // field[1] m.Type
+ o.PutUint32(buf[pos:pos+4], uint32(m.Type))
+ pos += 4
+ // field[1] m.LinkDuplex
+ o.PutUint32(buf[pos:pos+4], uint32(m.LinkDuplex))
+ pos += 4
+ // field[1] m.LinkSpeed
+ o.PutUint32(buf[pos:pos+4], uint32(m.LinkSpeed))
+ pos += 4
+ // field[1] m.LinkMtu
+ o.PutUint16(buf[pos:pos+2], uint16(m.LinkMtu))
+ pos += 2
+ // field[1] m.Mtu
+ for i := 0; i < 4; i++ {
+ var x uint32
+ if i < len(m.Mtu) {
+ x = uint32(m.Mtu[i])
+ }
+ o.PutUint32(buf[pos:pos+4], uint32(x))
+ pos += 4
+ }
+ // field[1] m.SubID
+ o.PutUint32(buf[pos:pos+4], uint32(m.SubID))
+ pos += 4
+ // field[1] m.SubNumberOfTags
+ buf[pos] = uint8(m.SubNumberOfTags)
+ pos += 1
+ // field[1] m.SubOuterVlanID
+ o.PutUint16(buf[pos:pos+2], uint16(m.SubOuterVlanID))
+ pos += 2
+ // field[1] m.SubInnerVlanID
+ o.PutUint16(buf[pos:pos+2], uint16(m.SubInnerVlanID))
+ pos += 2
+ // field[1] m.SubIfFlags
+ o.PutUint32(buf[pos:pos+4], uint32(m.SubIfFlags))
+ pos += 4
+ // field[1] m.VtrOp
+ o.PutUint32(buf[pos:pos+4], uint32(m.VtrOp))
+ pos += 4
+ // field[1] m.VtrPushDot1q
+ o.PutUint32(buf[pos:pos+4], uint32(m.VtrPushDot1q))
+ pos += 4
+ // field[1] m.VtrTag1
+ o.PutUint32(buf[pos:pos+4], uint32(m.VtrTag1))
+ pos += 4
+ // field[1] m.VtrTag2
+ o.PutUint32(buf[pos:pos+4], uint32(m.VtrTag2))
+ pos += 4
+ // field[1] m.OuterTag
+ o.PutUint16(buf[pos:pos+2], uint16(m.OuterTag))
+ pos += 2
+ // field[1] m.BDmac
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.BDmac) {
+ x = uint8(m.BDmac[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.BSmac
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.BSmac) {
+ x = uint8(m.BSmac[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.BVlanid
+ o.PutUint16(buf[pos:pos+2], uint16(m.BVlanid))
+ pos += 2
+ // field[1] m.ISid
+ o.PutUint32(buf[pos:pos+4], uint32(m.ISid))
+ pos += 4
+ // field[1] m.InterfaceName
+ copy(buf[pos:pos+64], m.InterfaceName)
+ pos += 64
+ // field[1] m.InterfaceDevType
+ copy(buf[pos:pos+64], m.InterfaceDevType)
+ pos += 64
+ // field[1] m.Tag
+ copy(buf[pos:pos+64], m.Tag)
+ pos += 64
+ return buf, nil
+}
+func (m *SwInterfaceDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SupSwIfIndex
+ m.SupSwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.L2Address
+ for i := 0; i < len(m.L2Address); i++ {
+ m.L2Address[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.Flags
+ m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Type
+ m.Type = IfType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.LinkDuplex
+ m.LinkDuplex = LinkDuplex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.LinkSpeed
+ m.LinkSpeed = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.LinkMtu
+ m.LinkMtu = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.Mtu
+ m.Mtu = make([]uint32, 4)
+ for i := 0; i < len(m.Mtu); i++ {
+ m.Mtu[i] = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ }
+ // field[1] m.SubID
+ m.SubID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SubNumberOfTags
+ m.SubNumberOfTags = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.SubOuterVlanID
+ m.SubOuterVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.SubInnerVlanID
+ m.SubInnerVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.SubIfFlags
+ m.SubIfFlags = SubIfFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.VtrOp
+ m.VtrOp = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.VtrPushDot1q
+ m.VtrPushDot1q = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.VtrTag1
+ m.VtrTag1 = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.VtrTag2
+ m.VtrTag2 = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.OuterTag
+ m.OuterTag = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.BDmac
+ for i := 0; i < len(m.BDmac); i++ {
+ m.BDmac[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.BSmac
+ for i := 0; i < len(m.BSmac); i++ {
+ m.BSmac[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.BVlanid
+ m.BVlanid = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.ISid
+ m.ISid = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.InterfaceName
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.InterfaceName = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ // field[1] m.InterfaceDevType
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.InterfaceDevType = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ // field[1] m.Tag
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Tag = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// SwInterfaceDump represents VPP binary API message 'sw_interface_dump'.
type SwInterfaceDump struct {
- SwIfIndex InterfaceIndex
- NameFilterValid bool
- XXX_NameFilterLen uint32 `struc:"sizeof=NameFilter"`
- NameFilter string
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+ NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
+ XXX_NameFilterLen uint32 `struc:"sizeof=NameFilter"`
+ NameFilter string `json:"name_filter,omitempty"`
}
func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} }
@@ -402,12 +2235,72 @@ func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_
func (*SwInterfaceDump) GetCrcString() string { return "aa610c27" }
func (*SwInterfaceDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.NameFilterValid
+ size += 1
+ // field[1] m.NameFilter
+ size += 4 + len(m.NameFilter)
+ return size
+}
+func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.NameFilterValid
+ if m.NameFilterValid {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.NameFilter
+ o.PutUint32(buf[pos:pos+4], uint32(len(m.NameFilter)))
+ pos += 4
+ copy(buf[pos:pos+len(m.NameFilter)], m.NameFilter[:])
+ pos += len(m.NameFilter)
+ return buf, nil
+}
+func (m *SwInterfaceDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.NameFilterValid
+ m.NameFilterValid = tmp[pos] != 0
+ pos += 1
+ // field[1] m.NameFilter
+ {
+ siz := o.Uint32(tmp[pos : pos+4])
+ pos += 4
+ m.NameFilter = codec.DecodeString(tmp[pos : pos+int(siz)])
+ pos += len(m.NameFilter)
+ }
+ return nil
+}
+
// SwInterfaceEvent represents VPP binary API message 'sw_interface_event'.
type SwInterfaceEvent struct {
- PID uint32
- SwIfIndex InterfaceIndex
- Flags IfStatusFlags
- Deleted bool
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
+ Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"`
}
func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} }
@@ -415,9 +2308,71 @@ func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface
func (*SwInterfaceEvent) GetCrcString() string { return "f709f78d" }
func (*SwInterfaceEvent) GetMessageType() api.MessageType { return api.EventMessage }
+func (m *SwInterfaceEvent) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.PID
+ size += 4
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Flags
+ size += 4
+ // field[1] m.Deleted
+ size += 1
+ return size
+}
+func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.PID
+ o.PutUint32(buf[pos:pos+4], uint32(m.PID))
+ pos += 4
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(m.Flags))
+ pos += 4
+ // field[1] m.Deleted
+ if m.Deleted {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceEvent) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.PID
+ m.PID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Flags
+ m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Deleted
+ m.Deleted = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// SwInterfaceGetMacAddress represents VPP binary API message 'sw_interface_get_mac_address'.
type SwInterfaceGetMacAddress struct {
- SwIfIndex InterfaceIndex
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} }
@@ -425,10 +2380,46 @@ func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_i
func (*SwInterfaceGetMacAddress) GetCrcString() string { return "f9e6675e" }
func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceGetMacAddress) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *SwInterfaceGetMacAddress) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceGetMacAddress) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceGetMacAddressReply represents VPP binary API message 'sw_interface_get_mac_address_reply'.
type SwInterfaceGetMacAddressReply struct {
- Retval int32
- MacAddress MacAddress
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
}
func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} }
@@ -438,10 +2429,62 @@ func (*SwInterfaceGetMacAddressReply) GetMessageName() string {
func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" }
func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceGetMacAddressReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.MacAddress
+ size += 6
+ return size
+}
+func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.MacAddress
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.MacAddress) {
+ x = uint8(m.MacAddress[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *SwInterfaceGetMacAddressReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.MacAddress
+ for i := 0; i < len(m.MacAddress); i++ {
+ m.MacAddress[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
+}
+
// SwInterfaceGetTable represents VPP binary API message 'sw_interface_get_table'.
type SwInterfaceGetTable struct {
- SwIfIndex InterfaceIndex
- IsIPv6 bool
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
}
func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} }
@@ -449,10 +2492,56 @@ func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interf
func (*SwInterfaceGetTable) GetCrcString() string { return "2d033de4" }
func (*SwInterfaceGetTable) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceGetTable) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IsIPv6
+ size += 1
+ return size
+}
+func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IsIPv6
+ if m.IsIPv6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceGetTable) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIPv6
+ m.IsIPv6 = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// SwInterfaceGetTableReply represents VPP binary API message 'sw_interface_get_table_reply'.
type SwInterfaceGetTableReply struct {
- Retval int32
- VrfID uint32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
}
func (m *SwInterfaceGetTableReply) Reset() { *m = SwInterfaceGetTableReply{} }
@@ -460,12 +2549,56 @@ func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_i
func (*SwInterfaceGetTableReply) GetCrcString() string { return "a6eb0109" }
func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceGetTableReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.VrfID
+ size += 4
+ return size
+}
+func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.VrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.VrfID))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceGetTableReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.VrfID
+ m.VrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceRxPlacementDetails represents VPP binary API message 'sw_interface_rx_placement_details'.
type SwInterfaceRxPlacementDetails struct {
- SwIfIndex InterfaceIndex
- QueueID uint32
- WorkerID uint32
- Mode RxMode
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
+ WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
+ Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
}
func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
@@ -475,9 +2608,69 @@ func (*SwInterfaceRxPlacementDetails) GetMessageName() string {
func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "f6d7d024" }
func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceRxPlacementDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.QueueID
+ size += 4
+ // field[1] m.WorkerID
+ size += 4
+ // field[1] m.Mode
+ size += 4
+ return size
+}
+func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.QueueID
+ o.PutUint32(buf[pos:pos+4], uint32(m.QueueID))
+ pos += 4
+ // field[1] m.WorkerID
+ o.PutUint32(buf[pos:pos+4], uint32(m.WorkerID))
+ pos += 4
+ // field[1] m.Mode
+ o.PutUint32(buf[pos:pos+4], uint32(m.Mode))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceRxPlacementDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.QueueID
+ m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.WorkerID
+ m.WorkerID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Mode
+ m.Mode = RxMode(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceRxPlacementDump represents VPP binary API message 'sw_interface_rx_placement_dump'.
type SwInterfaceRxPlacementDump struct {
- SwIfIndex InterfaceIndex
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} }
@@ -485,10 +2678,46 @@ func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw
func (*SwInterfaceRxPlacementDump) GetCrcString() string { return "f9e6675e" }
func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceRxPlacementDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *SwInterfaceRxPlacementDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceRxPlacementDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetFlags represents VPP binary API message 'sw_interface_set_flags'.
type SwInterfaceSetFlags struct {
- SwIfIndex InterfaceIndex
- Flags IfStatusFlags
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
}
func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} }
@@ -496,9 +2725,53 @@ func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interf
func (*SwInterfaceSetFlags) GetCrcString() string { return "6a2b491a" }
func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetFlags) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Flags
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(m.Flags))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetFlags) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Flags
+ m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetFlagsReply represents VPP binary API message 'sw_interface_set_flags_reply'.
type SwInterfaceSetFlagsReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetFlagsReply) Reset() { *m = SwInterfaceSetFlagsReply{} }
@@ -506,10 +2779,46 @@ func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_i
func (*SwInterfaceSetFlagsReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceSetFlagsReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetFlagsReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetFlagsReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetIPDirectedBroadcast represents VPP binary API message 'sw_interface_set_ip_directed_broadcast'.
type SwInterfaceSetIPDirectedBroadcast struct {
- SwIfIndex InterfaceIndex
- Enable bool
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
}
func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
@@ -519,9 +2828,55 @@ func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" }
func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetIPDirectedBroadcast) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Enable
+ size += 1
+ return size
+}
+func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Enable
+ if m.Enable {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Enable
+ m.Enable = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// SwInterfaceSetIPDirectedBroadcastReply represents VPP binary API message 'sw_interface_set_ip_directed_broadcast_reply'.
type SwInterfaceSetIPDirectedBroadcastReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
@@ -535,10 +2890,46 @@ func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType
return api.ReplyMessage
}
+func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetMacAddress represents VPP binary API message 'sw_interface_set_mac_address'.
type SwInterfaceSetMacAddress struct {
- SwIfIndex InterfaceIndex
- MacAddress MacAddress
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
}
func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} }
@@ -546,9 +2937,61 @@ func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_i
func (*SwInterfaceSetMacAddress) GetCrcString() string { return "6aca746a" }
func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetMacAddress) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.MacAddress
+ size += 6
+ return size
+}
+func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.MacAddress
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(m.MacAddress) {
+ x = uint8(m.MacAddress[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *SwInterfaceSetMacAddress) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.MacAddress
+ for i := 0; i < len(m.MacAddress); i++ {
+ m.MacAddress[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
+}
+
// SwInterfaceSetMacAddressReply represents VPP binary API message 'sw_interface_set_mac_address_reply'.
type SwInterfaceSetMacAddressReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
@@ -558,10 +3001,46 @@ func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceSetMacAddressReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetMacAddressReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetMacAddressReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetMtu represents VPP binary API message 'sw_interface_set_mtu'.
type SwInterfaceSetMtu struct {
- SwIfIndex InterfaceIndex
- Mtu []uint32 `struc:"[4]uint32"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
}
func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} }
@@ -569,9 +3048,62 @@ func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interfac
func (*SwInterfaceSetMtu) GetCrcString() string { return "5cbe85e5" }
func (*SwInterfaceSetMtu) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetMtu) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Mtu
+ size += 16
+ return size
+}
+func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Mtu
+ for i := 0; i < 4; i++ {
+ var x uint32
+ if i < len(m.Mtu) {
+ x = uint32(m.Mtu[i])
+ }
+ o.PutUint32(buf[pos:pos+4], uint32(x))
+ pos += 4
+ }
+ return buf, nil
+}
+func (m *SwInterfaceSetMtu) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Mtu
+ m.Mtu = make([]uint32, 4)
+ for i := 0; i < len(m.Mtu); i++ {
+ m.Mtu[i] = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ }
+ return nil
+}
+
// SwInterfaceSetMtuReply represents VPP binary API message 'sw_interface_set_mtu_reply'.
type SwInterfaceSetMtuReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetMtuReply) Reset() { *m = SwInterfaceSetMtuReply{} }
@@ -579,12 +3111,48 @@ func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_int
func (*SwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceSetMtuReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetMtuReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetRxMode represents VPP binary API message 'sw_interface_set_rx_mode'.
type SwInterfaceSetRxMode struct {
- SwIfIndex InterfaceIndex
- QueueIDValid bool
- QueueID uint32
- Mode RxMode
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
+ QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
+ Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
}
func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} }
@@ -592,9 +3160,71 @@ func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_inter
func (*SwInterfaceSetRxMode) GetCrcString() string { return "780f5cee" }
func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetRxMode) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.QueueIDValid
+ size += 1
+ // field[1] m.QueueID
+ size += 4
+ // field[1] m.Mode
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.QueueIDValid
+ if m.QueueIDValid {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.QueueID
+ o.PutUint32(buf[pos:pos+4], uint32(m.QueueID))
+ pos += 4
+ // field[1] m.Mode
+ o.PutUint32(buf[pos:pos+4], uint32(m.Mode))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetRxMode) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.QueueIDValid
+ m.QueueIDValid = tmp[pos] != 0
+ pos += 1
+ // field[1] m.QueueID
+ m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Mode
+ m.Mode = RxMode(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetRxModeReply represents VPP binary API message 'sw_interface_set_rx_mode_reply'.
type SwInterfaceSetRxModeReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetRxModeReply) Reset() { *m = SwInterfaceSetRxModeReply{} }
@@ -602,12 +3232,48 @@ func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_
func (*SwInterfaceSetRxModeReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceSetRxModeReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetRxModeReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetRxModeReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetRxPlacement represents VPP binary API message 'sw_interface_set_rx_placement'.
type SwInterfaceSetRxPlacement struct {
- SwIfIndex InterfaceIndex
- QueueID uint32
- WorkerID uint32
- IsMain bool
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
+ WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
+ IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"`
}
func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} }
@@ -615,9 +3281,71 @@ func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_
func (*SwInterfaceSetRxPlacement) GetCrcString() string { return "db65f3c9" }
func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetRxPlacement) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.QueueID
+ size += 4
+ // field[1] m.WorkerID
+ size += 4
+ // field[1] m.IsMain
+ size += 1
+ return size
+}
+func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.QueueID
+ o.PutUint32(buf[pos:pos+4], uint32(m.QueueID))
+ pos += 4
+ // field[1] m.WorkerID
+ o.PutUint32(buf[pos:pos+4], uint32(m.WorkerID))
+ pos += 4
+ // field[1] m.IsMain
+ if m.IsMain {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceSetRxPlacement) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.QueueID
+ m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.WorkerID
+ m.WorkerID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsMain
+ m.IsMain = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// SwInterfaceSetRxPlacementReply represents VPP binary API message 'sw_interface_set_rx_placement_reply'.
type SwInterfaceSetRxPlacementReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
@@ -627,11 +3355,47 @@ func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceSetRxPlacementReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetRxPlacementReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetTable represents VPP binary API message 'sw_interface_set_table'.
type SwInterfaceSetTable struct {
- SwIfIndex InterfaceIndex
- IsIPv6 bool
- VrfID uint32
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
}
func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} }
@@ -639,9 +3403,63 @@ func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interf
func (*SwInterfaceSetTable) GetCrcString() string { return "df42a577" }
func (*SwInterfaceSetTable) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetTable) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IsIPv6
+ size += 1
+ // field[1] m.VrfID
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IsIPv6
+ if m.IsIPv6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.VrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.VrfID))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetTable) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIPv6
+ m.IsIPv6 = tmp[pos] != 0
+ pos += 1
+ // field[1] m.VrfID
+ m.VrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetTableReply represents VPP binary API message 'sw_interface_set_table_reply'.
type SwInterfaceSetTableReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetTableReply) Reset() { *m = SwInterfaceSetTableReply{} }
@@ -649,11 +3467,47 @@ func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_i
func (*SwInterfaceSetTableReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceSetTableReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetTableReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceSetUnnumbered represents VPP binary API message 'sw_interface_set_unnumbered'.
type SwInterfaceSetUnnumbered struct {
- SwIfIndex InterfaceIndex
- UnnumberedSwIfIndex InterfaceIndex
- IsAdd bool
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ UnnumberedSwIfIndex InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
}
func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} }
@@ -661,9 +3515,63 @@ func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_i
func (*SwInterfaceSetUnnumbered) GetCrcString() string { return "938ef33b" }
func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceSetUnnumbered) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.UnnumberedSwIfIndex
+ size += 4
+ // field[1] m.IsAdd
+ size += 1
+ return size
+}
+func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.UnnumberedSwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.UnnumberedSwIfIndex))
+ pos += 4
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceSetUnnumbered) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.UnnumberedSwIfIndex
+ m.UnnumberedSwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// SwInterfaceSetUnnumberedReply represents VPP binary API message 'sw_interface_set_unnumbered_reply'.
type SwInterfaceSetUnnumberedReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
@@ -673,11 +3581,47 @@ func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceSetUnnumberedReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceSetUnnumberedReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceTagAddDel represents VPP binary API message 'sw_interface_tag_add_del'.
type SwInterfaceTagAddDel struct {
- IsAdd bool
- SwIfIndex InterfaceIndex
- Tag string `struc:"[64]byte"`
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
+ SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Tag string `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
}
func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} }
@@ -685,9 +3629,66 @@ func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_inter
func (*SwInterfaceTagAddDel) GetCrcString() string { return "426f8bc1" }
func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceTagAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Tag
+ size += 64
+ return size
+}
+func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Tag
+ copy(buf[pos:pos+64], m.Tag)
+ pos += 64
+ return buf, nil
+}
+func (m *SwInterfaceTagAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Tag
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Tag = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// SwInterfaceTagAddDelReply represents VPP binary API message 'sw_interface_tag_add_del_reply'.
type SwInterfaceTagAddDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceTagAddDelReply) Reset() { *m = SwInterfaceTagAddDelReply{} }
@@ -695,10 +3696,46 @@ func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_
func (*SwInterfaceTagAddDelReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceTagAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceTagAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// WantInterfaceEvents represents VPP binary API message 'want_interface_events'.
type WantInterfaceEvents struct {
- EnableDisable uint32
- PID uint32
+ EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
}
func (m *WantInterfaceEvents) Reset() { *m = WantInterfaceEvents{} }
@@ -706,9 +3743,53 @@ func (*WantInterfaceEvents) GetMessageName() string { return "want_inte
func (*WantInterfaceEvents) GetCrcString() string { return "476f5a08" }
func (*WantInterfaceEvents) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *WantInterfaceEvents) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.EnableDisable
+ size += 4
+ // field[1] m.PID
+ size += 4
+ return size
+}
+func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.EnableDisable
+ o.PutUint32(buf[pos:pos+4], uint32(m.EnableDisable))
+ pos += 4
+ // field[1] m.PID
+ o.PutUint32(buf[pos:pos+4], uint32(m.PID))
+ pos += 4
+ return buf, nil
+}
+func (m *WantInterfaceEvents) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.EnableDisable
+ m.EnableDisable = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.PID
+ m.PID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// WantInterfaceEventsReply represents VPP binary API message 'want_interface_events_reply'.
type WantInterfaceEventsReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *WantInterfaceEventsReply) Reset() { *m = WantInterfaceEventsReply{} }
@@ -716,7 +3797,44 @@ func (*WantInterfaceEventsReply) GetMessageName() string { return "want
func (*WantInterfaceEventsReply) GetCrcString() string { return "e8d4e804" }
func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
-func init() {
+func (m *WantInterfaceEventsReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *WantInterfaceEventsReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
+func init() { file_interfaces_binapi_init() }
+func file_interfaces_binapi_init() {
api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "interface.CollectDetailedInterfaceStats")
api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "interface.CollectDetailedInterfaceStatsReply")
api.RegisterMessage((*CreateLoopback)(nil), "interface.CreateLoopback")
@@ -831,322 +3949,13 @@ func AllMessages() []api.Message {
}
}
-// RPCService represents RPC service API for interface module.
-type RPCService interface {
- DumpSwInterface(ctx context.Context, in *SwInterfaceDump) (RPCService_DumpSwInterfaceClient, error)
- DumpSwInterfaceRxPlacement(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_DumpSwInterfaceRxPlacementClient, error)
- CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error)
- CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error)
- CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error)
- CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error)
- CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error)
- DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error)
- DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error)
- HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error)
- InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error)
- SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error)
- SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error)
- SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error)
- SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error)
- SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error)
- SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error)
- SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error)
- SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error)
- SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error)
- SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error)
- SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error)
- SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error)
- SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error)
- SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error)
- WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error)
-}
-
-type serviceClient struct {
- ch api.Channel
-}
-
-func NewServiceClient(ch api.Channel) RPCService {
- return &serviceClient{ch}
-}
-
-func (c *serviceClient) DumpSwInterface(ctx context.Context, in *SwInterfaceDump) (RPCService_DumpSwInterfaceClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpSwInterfaceClient{stream}
- return x, nil
-}
-
-type RPCService_DumpSwInterfaceClient interface {
- Recv() (*SwInterfaceDetails, error)
-}
-
-type serviceClient_DumpSwInterfaceClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpSwInterfaceClient) Recv() (*SwInterfaceDetails, error) {
- m := new(SwInterfaceDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpSwInterfaceRxPlacement(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_DumpSwInterfaceRxPlacementClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpSwInterfaceRxPlacementClient{stream}
- return x, nil
-}
-
-type RPCService_DumpSwInterfaceRxPlacementClient interface {
- Recv() (*SwInterfaceRxPlacementDetails, error)
-}
-
-type serviceClient_DumpSwInterfaceRxPlacementClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpSwInterfaceRxPlacementClient) Recv() (*SwInterfaceRxPlacementDetails, error) {
- m := new(SwInterfaceRxPlacementDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error) {
- out := new(CollectDetailedInterfaceStatsReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error) {
- out := new(CreateLoopbackReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error) {
- out := new(CreateLoopbackInstanceReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error) {
- out := new(CreateSubifReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error) {
- out := new(CreateVlanSubifReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error) {
- out := new(DeleteLoopbackReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error) {
- out := new(DeleteSubifReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error) {
- out := new(HwInterfaceSetMtuReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error) {
- out := new(InterfaceNameRenumberReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) {
- out := new(SwInterfaceAddDelAddressReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error) {
- out := new(SwInterfaceAddDelMacAddressReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error) {
- out := new(SwInterfaceClearStatsReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error) {
- out := new(SwInterfaceGetMacAddressReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error) {
- out := new(SwInterfaceGetTableReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error) {
- out := new(SwInterfaceSetFlagsReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) {
- out := new(SwInterfaceSetIPDirectedBroadcastReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error) {
- out := new(SwInterfaceSetMacAddressReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error) {
- out := new(SwInterfaceSetMtuReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error) {
- out := new(SwInterfaceSetRxModeReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error) {
- out := new(SwInterfaceSetRxPlacementReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error) {
- out := new(SwInterfaceSetTableReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) {
- out := new(SwInterfaceSetUnnumberedReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error) {
- out := new(SwInterfaceTagAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) {
- out := new(WantInterfaceEventsReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
-
// Reference imports to suppress errors if they are not otherwise used.
var _ = api.RegisterMessage
+var _ = codec.DecodeString
var _ = bytes.NewBuffer
var _ = context.Background
var _ = io.Copy
var _ = strconv.Itoa
var _ = struc.Pack
+var _ = binary.BigEndian
+var _ = math.Float32bits