diff options
Diffstat (limited to 'examples/binapi')
-rw-r--r-- | examples/binapi/af_packet/af_packet.ba.go | 143 | ||||
-rw-r--r-- | examples/binapi/ethernet_types/ethernet_types.ba.go | 43 | ||||
-rw-r--r-- | examples/binapi/gen.go | 8 | ||||
-rw-r--r-- | examples/binapi/interface_types/interface_types.ba.go | 251 | ||||
-rw-r--r-- | examples/binapi/interfaces/interfaces.ba.go | 898 | ||||
-rw-r--r-- | examples/binapi/ip/ip.ba.go | 2213 | ||||
-rw-r--r-- | examples/binapi/ip_types/ip_types.ba.go | 348 | ||||
-rw-r--r-- | examples/binapi/memclnt/memclnt.ba.go | 310 | ||||
-rw-r--r-- | examples/binapi/memif/memif.ba.go | 247 | ||||
-rw-r--r-- | examples/binapi/vpe/vpe.ba.go | 412 | ||||
-rw-r--r-- | examples/binapi/vpe_types/vpe_types.ba.go | 106 |
11 files changed, 1934 insertions, 3045 deletions
diff --git a/examples/binapi/af_packet/af_packet.ba.go b/examples/binapi/af_packet/af_packet.ba.go index 6f92b04..d24966a 100644 --- a/examples/binapi/af_packet/af_packet.ba.go +++ b/examples/binapi/af_packet/af_packet.ba.go @@ -5,6 +5,8 @@ Package af_packet is a generated VPP binary API for 'af_packet' module. It consists of: + 6 enums + 2 aliases 8 messages 4 services */ @@ -17,139 +19,120 @@ import ( struc "github.com/lunixbochs/struc" io "io" strconv "strconv" + + ethernet_types "git.fd.io/govpp.git/examples/ethernet_types" + interface_types "git.fd.io/govpp.git/examples/interface_types" ) const ( // ModuleName is the name of this module. ModuleName = "af_packet" // APIVersion is the API version of this module. - APIVersion = "1.0.0" + APIVersion = "2.0.0" // VersionCrc is the CRC of this module. - VersionCrc = 0xfefd69b7 + VersionCrc = 0xba745e20 ) +type IfStatusFlags = interface_types.IfStatusFlags + +type IfType = interface_types.IfType + +type LinkDuplex = interface_types.LinkDuplex + +type MtuProto = interface_types.MtuProto + +type RxMode = interface_types.RxMode + +type SubIfFlags = interface_types.SubIfFlags + +type InterfaceIndex = interface_types.InterfaceIndex + +type MacAddress = ethernet_types.MacAddress + // AfPacketCreate represents VPP binary API message 'af_packet_create'. type AfPacketCreate struct { - HostIfName []byte `struc:"[64]byte"` - HwAddr []byte `struc:"[6]byte"` - UseRandomHwAddr uint8 + HwAddr MacAddress + UseRandomHwAddr bool + HostIfName string `struc:"[64]byte"` } -func (*AfPacketCreate) GetMessageName() string { - return "af_packet_create" -} -func (*AfPacketCreate) GetCrcString() string { - return "6d5d30d6" -} -func (*AfPacketCreate) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *AfPacketCreate) Reset() { *m = AfPacketCreate{} } +func (*AfPacketCreate) GetMessageName() string { return "af_packet_create" } +func (*AfPacketCreate) GetCrcString() string { return "a190415f" } +func (*AfPacketCreate) GetMessageType() api.MessageType { return api.RequestMessage } // AfPacketCreateReply represents VPP binary API message 'af_packet_create_reply'. type AfPacketCreateReply struct { Retval int32 - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*AfPacketCreateReply) GetMessageName() string { - return "af_packet_create_reply" -} -func (*AfPacketCreateReply) GetCrcString() string { - return "fda5941f" -} -func (*AfPacketCreateReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *AfPacketCreateReply) Reset() { *m = AfPacketCreateReply{} } +func (*AfPacketCreateReply) GetMessageName() string { return "af_packet_create_reply" } +func (*AfPacketCreateReply) GetCrcString() string { return "5383d31f" } +func (*AfPacketCreateReply) GetMessageType() api.MessageType { return api.ReplyMessage } // AfPacketDelete represents VPP binary API message 'af_packet_delete'. type AfPacketDelete struct { - HostIfName []byte `struc:"[64]byte"` + HostIfName string `struc:"[64]byte"` } -func (*AfPacketDelete) GetMessageName() string { - return "af_packet_delete" -} -func (*AfPacketDelete) GetCrcString() string { - return "3efceda3" -} -func (*AfPacketDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *AfPacketDelete) Reset() { *m = AfPacketDelete{} } +func (*AfPacketDelete) GetMessageName() string { return "af_packet_delete" } +func (*AfPacketDelete) GetCrcString() string { return "863fa648" } +func (*AfPacketDelete) GetMessageType() api.MessageType { return api.RequestMessage } // AfPacketDeleteReply represents VPP binary API message 'af_packet_delete_reply'. type AfPacketDeleteReply struct { Retval int32 } -func (*AfPacketDeleteReply) GetMessageName() string { - return "af_packet_delete_reply" -} -func (*AfPacketDeleteReply) GetCrcString() string { - return "e8d4e804" -} -func (*AfPacketDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *AfPacketDeleteReply) Reset() { *m = AfPacketDeleteReply{} } +func (*AfPacketDeleteReply) GetMessageName() string { return "af_packet_delete_reply" } +func (*AfPacketDeleteReply) GetCrcString() string { return "e8d4e804" } +func (*AfPacketDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage } // AfPacketDetails represents VPP binary API message 'af_packet_details'. type AfPacketDetails struct { - SwIfIndex uint32 - HostIfName []byte `struc:"[64]byte"` + SwIfIndex InterfaceIndex + HostIfName string `struc:"[64]byte"` } -func (*AfPacketDetails) GetMessageName() string { - return "af_packet_details" -} -func (*AfPacketDetails) GetCrcString() string { - return "057205fa" -} -func (*AfPacketDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *AfPacketDetails) Reset() { *m = AfPacketDetails{} } +func (*AfPacketDetails) GetMessageName() string { return "af_packet_details" } +func (*AfPacketDetails) GetCrcString() string { return "58c7c042" } +func (*AfPacketDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // AfPacketDump represents VPP binary API message 'af_packet_dump'. type AfPacketDump struct{} -func (*AfPacketDump) GetMessageName() string { - return "af_packet_dump" -} -func (*AfPacketDump) GetCrcString() string { - return "51077d14" -} -func (*AfPacketDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *AfPacketDump) Reset() { *m = AfPacketDump{} } +func (*AfPacketDump) GetMessageName() string { return "af_packet_dump" } +func (*AfPacketDump) GetCrcString() string { return "51077d14" } +func (*AfPacketDump) GetMessageType() api.MessageType { return api.RequestMessage } // AfPacketSetL4CksumOffload represents VPP binary API message 'af_packet_set_l4_cksum_offload'. type AfPacketSetL4CksumOffload struct { - SwIfIndex uint8 - Set uint8 + SwIfIndex InterfaceIndex + Set bool } -func (*AfPacketSetL4CksumOffload) GetMessageName() string { - return "af_packet_set_l4_cksum_offload" -} -func (*AfPacketSetL4CksumOffload) GetCrcString() string { - return "86538585" -} -func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *AfPacketSetL4CksumOffload) Reset() { *m = AfPacketSetL4CksumOffload{} } +func (*AfPacketSetL4CksumOffload) GetMessageName() string { return "af_packet_set_l4_cksum_offload" } +func (*AfPacketSetL4CksumOffload) GetCrcString() string { return "319cd5c8" } +func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType { return api.RequestMessage } // AfPacketSetL4CksumOffloadReply represents VPP binary API message 'af_packet_set_l4_cksum_offload_reply'. type AfPacketSetL4CksumOffloadReply struct { Retval int32 } +func (m *AfPacketSetL4CksumOffloadReply) Reset() { *m = AfPacketSetL4CksumOffloadReply{} } func (*AfPacketSetL4CksumOffloadReply) GetMessageName() string { return "af_packet_set_l4_cksum_offload_reply" } -func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string { - return "e8d4e804" -} -func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string { return "e8d4e804" } +func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType { return api.ReplyMessage } func init() { api.RegisterMessage((*AfPacketCreate)(nil), "af_packet.AfPacketCreate") diff --git a/examples/binapi/ethernet_types/ethernet_types.ba.go b/examples/binapi/ethernet_types/ethernet_types.ba.go new file mode 100644 index 0000000..c7f836b --- /dev/null +++ b/examples/binapi/ethernet_types/ethernet_types.ba.go @@ -0,0 +1,43 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// source: /usr/share/vpp/api/core/ethernet_types.api.json + +/* +Package ethernet_types is a generated VPP binary API for 'ethernet_types' module. + +It consists of: + 1 alias +*/ +package ethernet_types + +import ( + bytes "bytes" + context "context" + api "git.fd.io/govpp.git/api" + struc "github.com/lunixbochs/struc" + io "io" + strconv "strconv" +) + +const ( + // ModuleName is the name of this module. + ModuleName = "ethernet_types" + // VersionCrc is the CRC of this module. + VersionCrc = 0xd4ff2808 +) + +// MacAddress represents VPP binary API alias 'mac_address'. +type MacAddress [6]uint8 + +// 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 _ = bytes.NewBuffer +var _ = context.Background +var _ = io.Copy +var _ = strconv.Itoa +var _ = struc.Pack diff --git a/examples/binapi/gen.go b/examples/binapi/gen.go index aeee5ec..d066275 100644 --- a/examples/binapi/gen.go +++ b/examples/binapi/gen.go @@ -1,7 +1,13 @@ package binapi // Generate Go code from the VPP APIs located in the /usr/share/vpp/api directory. -//go:generate -command binapigen binapi-generator --output-dir=. --include-services --continue-onerror + +//go:generate binapi-generator --output-dir=. --input-file=/usr/share/vpp/api/core/ethernet_types.api.json +//go:generate binapi-generator --output-dir=. --input-file=/usr/share/vpp/api/core/interface_types.api.json +//go:generate binapi-generator --output-dir=. --input-file=/usr/share/vpp/api/core/ip_types.api.json +//go:generate binapi-generator --output-dir=. --input-file=/usr/share/vpp/api/core/vpe_types.api.json + +//go:generate -command binapigen binapi-generator --output-dir=. --import-prefix=git.fd.io/govpp.git/examples --input-types=/usr/share/vpp/api/core/ethernet_types.api.json,/usr/share/vpp/api/core/ip_types.api.json,/usr/share/vpp/api/core/interface_types.api.json,/usr/share/vpp/api/core/vpe_types.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/af_packet.api.json //go:generate binapigen --input-file=/usr/share/vpp/api/core/interface.api.json diff --git a/examples/binapi/interface_types/interface_types.ba.go b/examples/binapi/interface_types/interface_types.ba.go new file mode 100644 index 0000000..c1becad --- /dev/null +++ b/examples/binapi/interface_types/interface_types.ba.go @@ -0,0 +1,251 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// source: /usr/share/vpp/api/core/interface_types.api.json + +/* +Package interface_types is a generated VPP binary API for 'interface_types' module. + +It consists of: + 6 enums + 1 alias +*/ +package interface_types + +import ( + bytes "bytes" + context "context" + api "git.fd.io/govpp.git/api" + struc "github.com/lunixbochs/struc" + io "io" + strconv "strconv" +) + +const ( + // ModuleName is the name of this module. + ModuleName = "interface_types" + // VersionCrc is the CRC of this module. + VersionCrc = 0xc97be83d +) + +// 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", +} + +var 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 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", +} + +var 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 strconv.Itoa(int(x)) +} + +// LinkDuplex represents VPP binary API enum 'link_duplex'. +type LinkDuplex uint32 + +const ( + LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0 + LINK_DUPLEX_API_HALF LinkDuplex = 1 + LINK_DUPLEX_API_FULL LinkDuplex = 2 +) + +var LinkDuplex_name = map[uint32]string{ + 0: "LINK_DUPLEX_API_UNKNOWN", + 1: "LINK_DUPLEX_API_HALF", + 2: "LINK_DUPLEX_API_FULL", +} + +var LinkDuplex_value = map[string]uint32{ + "LINK_DUPLEX_API_UNKNOWN": 0, + "LINK_DUPLEX_API_HALF": 1, + "LINK_DUPLEX_API_FULL": 2, +} + +func (x LinkDuplex) String() string { + s, ok := LinkDuplex_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// MtuProto represents VPP binary API enum 'mtu_proto'. +type MtuProto uint32 + +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 +) + +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", +} + +var 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, +} + +func (x MtuProto) String() string { + s, ok := MtuProto_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// RxMode represents VPP binary API enum 'rx_mode'. +type RxMode uint32 + +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 +) + +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", +} + +var 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, +} + +func (x RxMode) String() string { + s, ok := RxMode_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// SubIfFlags represents VPP binary API enum 'sub_if_flags'. +type SubIfFlags uint32 + +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", +} + +var 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 strconv.Itoa(int(x)) +} + +// InterfaceIndex represents VPP binary API alias 'interface_index'. +type InterfaceIndex uint32 + +// 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 _ = bytes.NewBuffer +var _ = context.Background +var _ = io.Copy +var _ = strconv.Itoa +var _ = struc.Pack diff --git a/examples/binapi/interfaces/interfaces.ba.go b/examples/binapi/interfaces/interfaces.ba.go index 4e650ed..d77ca41 100644 --- a/examples/binapi/interfaces/interfaces.ba.go +++ b/examples/binapi/interfaces/interfaces.ba.go @@ -5,9 +5,12 @@ Package interfaces is a generated VPP binary API for 'interface' module. It consists of: - 1 alias - 51 messages - 25 services + 10 enums + 7 aliases + 6 types + 1 union + 53 messages + 26 services */ package interfaces @@ -18,420 +21,372 @@ import ( struc "github.com/lunixbochs/struc" io "io" strconv "strconv" + + ethernet_types "git.fd.io/govpp.git/examples/ethernet_types" + interface_types "git.fd.io/govpp.git/examples/interface_types" + ip_types "git.fd.io/govpp.git/examples/ip_types" ) const ( // ModuleName is the name of this module. ModuleName = "interface" // APIVersion is the API version of this module. - APIVersion = "3.1.1" + APIVersion = "3.2.2" // VersionCrc is the CRC of this module. - VersionCrc = 0xbfceada9 + VersionCrc = 0xfebc3ffa ) -// InterfaceIndex represents VPP binary API alias 'interface_index'. -type InterfaceIndex uint32 +type AddressFamily = ip_types.AddressFamily + +type IfStatusFlags = interface_types.IfStatusFlags + +type IfType = interface_types.IfType + +type IPDscp = ip_types.IPDscp + +type IPEcn = ip_types.IPEcn + +type IPProto = ip_types.IPProto + +type LinkDuplex = interface_types.LinkDuplex + +type MtuProto = interface_types.MtuProto + +type RxMode = interface_types.RxMode + +type SubIfFlags = interface_types.SubIfFlags + +type AddressWithPrefix = ip_types.AddressWithPrefix + +type InterfaceIndex = interface_types.InterfaceIndex + +type IP4Address = ip_types.IP4Address + +type IP4AddressWithPrefix = ip_types.IP4AddressWithPrefix + +type IP6Address = ip_types.IP6Address + +type IP6AddressWithPrefix = ip_types.IP6AddressWithPrefix + +type MacAddress = ethernet_types.MacAddress + +type Address = ip_types.Address + +type IP4Prefix = ip_types.IP4Prefix + +type IP6Prefix = ip_types.IP6Prefix + +type Mprefix = ip_types.Mprefix + +type Prefix = ip_types.Prefix + +type PrefixMatcher = ip_types.PrefixMatcher + +type AddressUnion = ip_types.AddressUnion // CollectDetailedInterfaceStats represents VPP binary API message 'collect_detailed_interface_stats'. type CollectDetailedInterfaceStats struct { - SwIfIndex uint32 - EnableDisable uint8 + SwIfIndex InterfaceIndex + EnableDisable bool } +func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} } func (*CollectDetailedInterfaceStats) GetMessageName() string { return "collect_detailed_interface_stats" } -func (*CollectDetailedInterfaceStats) GetCrcString() string { - return "69d24598" -} -func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" } +func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType { return api.RequestMessage } // CollectDetailedInterfaceStatsReply represents VPP binary API message 'collect_detailed_interface_stats_reply'. type CollectDetailedInterfaceStatsReply struct { Retval int32 } +func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} } func (*CollectDetailedInterfaceStatsReply) GetMessageName() string { return "collect_detailed_interface_stats_reply" } -func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { - return "e8d4e804" -} -func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" } +func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage } // CreateLoopback represents VPP binary API message 'create_loopback'. type CreateLoopback struct { - MacAddress []byte `struc:"[6]byte"` + MacAddress MacAddress } -func (*CreateLoopback) GetMessageName() string { - return "create_loopback" -} -func (*CreateLoopback) GetCrcString() string { - return "3b54129c" -} -func (*CreateLoopback) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *CreateLoopback) Reset() { *m = CreateLoopback{} } +func (*CreateLoopback) GetMessageName() string { return "create_loopback" } +func (*CreateLoopback) GetCrcString() string { return "42bb5d22" } +func (*CreateLoopback) GetMessageType() api.MessageType { return api.RequestMessage } // CreateLoopbackInstance represents VPP binary API message 'create_loopback_instance'. type CreateLoopbackInstance struct { - MacAddress []byte `struc:"[6]byte"` - IsSpecified uint8 + MacAddress MacAddress + IsSpecified bool UserInstance uint32 } -func (*CreateLoopbackInstance) GetMessageName() string { - return "create_loopback_instance" -} -func (*CreateLoopbackInstance) GetCrcString() string { - return "7bbd53b6" -} -func (*CreateLoopbackInstance) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} } +func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" } +func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" } +func (*CreateLoopbackInstance) GetMessageType() api.MessageType { return api.RequestMessage } // CreateLoopbackInstanceReply represents VPP binary API message 'create_loopback_instance_reply'. type CreateLoopbackInstanceReply struct { Retval int32 - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*CreateLoopbackInstanceReply) GetMessageName() string { - return "create_loopback_instance_reply" -} -func (*CreateLoopbackInstanceReply) GetCrcString() string { - return "fda5941f" -} -func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} } +func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" } +func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" } +func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { return api.ReplyMessage } // CreateLoopbackReply represents VPP binary API message 'create_loopback_reply'. type CreateLoopbackReply struct { Retval int32 - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*CreateLoopbackReply) GetMessageName() string { - return "create_loopback_reply" -} -func (*CreateLoopbackReply) GetCrcString() string { - return "fda5941f" -} -func (*CreateLoopbackReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} } +func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" } +func (*CreateLoopbackReply) GetCrcString() string { return "5383d31f" } +func (*CreateLoopbackReply) GetMessageType() api.MessageType { return api.ReplyMessage } // CreateSubif represents VPP binary API message 'create_subif'. type CreateSubif struct { - SwIfIndex uint32 - SubID uint32 - NoTags uint8 - OneTag uint8 - TwoTags uint8 - Dot1ad uint8 - ExactMatch uint8 - DefaultSub uint8 - OuterVlanIDAny uint8 - InnerVlanIDAny uint8 - OuterVlanID uint16 - InnerVlanID uint16 + SwIfIndex InterfaceIndex + SubID uint32 + SubIfFlags SubIfFlags + OuterVlanID uint16 + InnerVlanID uint16 } -func (*CreateSubif) GetMessageName() string { - return "create_subif" -} -func (*CreateSubif) GetCrcString() string { - return "86cfe408" -} -func (*CreateSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *CreateSubif) Reset() { *m = CreateSubif{} } +func (*CreateSubif) GetMessageName() string { return "create_subif" } +func (*CreateSubif) GetCrcString() string { return "cb371063" } +func (*CreateSubif) GetMessageType() api.MessageType { return api.RequestMessage } // CreateSubifReply represents VPP binary API message 'create_subif_reply'. type CreateSubifReply struct { Retval int32 - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*CreateSubifReply) GetMessageName() string { - return "create_subif_reply" -} -func (*CreateSubifReply) GetCrcString() string { - return "fda5941f" -} -func (*CreateSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} } +func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" } +func (*CreateSubifReply) GetCrcString() string { return "5383d31f" } +func (*CreateSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage } // CreateVlanSubif represents VPP binary API message 'create_vlan_subif'. type CreateVlanSubif struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex VlanID uint32 } -func (*CreateVlanSubif) GetMessageName() string { - return "create_vlan_subif" -} -func (*CreateVlanSubif) GetCrcString() string { - return "70cadeda" -} -func (*CreateVlanSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} } +func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" } +func (*CreateVlanSubif) GetCrcString() string { return "af34ac8b" } +func (*CreateVlanSubif) GetMessageType() api.MessageType { return api.RequestMessage } // CreateVlanSubifReply represents VPP binary API message 'create_vlan_subif_reply'. type CreateVlanSubifReply struct { Retval int32 - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*CreateVlanSubifReply) GetMessageName() string { - return "create_vlan_subif_reply" -} -func (*CreateVlanSubifReply) GetCrcString() string { - return "fda5941f" -} -func (*CreateVlanSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} } +func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" } +func (*CreateVlanSubifReply) GetCrcString() string { return "5383d31f" } +func (*CreateVlanSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage } // DeleteLoopback represents VPP binary API message 'delete_loopback'. type DeleteLoopback struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*DeleteLoopback) GetMessageName() string { - return "delete_loopback" -} -func (*DeleteLoopback) GetCrcString() string { - return "529cb13f" -} -func (*DeleteLoopback) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} } +func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" } +func (*DeleteLoopback) GetCrcString() string { return "f9e6675e" } +func (*DeleteLoopback) GetMessageType() api.MessageType { return api.RequestMessage } // DeleteLoopbackReply represents VPP binary API message 'delete_loopback_reply'. type DeleteLoopbackReply struct { Retval int32 } -func (*DeleteLoopbackReply) GetMessageName() string { - return "delete_loopback_reply" -} -func (*DeleteLoopbackReply) GetCrcString() string { - return "e8d4e804" -} -func (*DeleteLoopbackReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *DeleteLoopbackReply) Reset() { *m = DeleteLoopbackReply{} } +func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" } +func (*DeleteLoopbackReply) GetCrcString() string { return "e8d4e804" } +func (*DeleteLoopbackReply) GetMessageType() api.MessageType { return api.ReplyMessage } // DeleteSubif represents VPP binary API message 'delete_subif'. type DeleteSubif struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*DeleteSubif) GetMessageName() string { - return "delete_subif" -} -func (*DeleteSubif) GetCrcString() string { - return "529cb13f" -} -func (*DeleteSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *DeleteSubif) Reset() { *m = DeleteSubif{} } +func (*DeleteSubif) GetMessageName() string { return "delete_subif" } +func (*DeleteSubif) GetCrcString() string { return "f9e6675e" } +func (*DeleteSubif) GetMessageType() api.MessageType { return api.RequestMessage } // DeleteSubifReply represents VPP binary API message 'delete_subif_reply'. type DeleteSubifReply struct { Retval int32 } -func (*DeleteSubifReply) GetMessageName() string { - return "delete_subif_reply" -} -func (*DeleteSubifReply) GetCrcString() string { - return "e8d4e804" -} -func (*DeleteSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *DeleteSubifReply) Reset() { *m = DeleteSubifReply{} } +func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" } +func (*DeleteSubifReply) GetCrcString() string { return "e8d4e804" } +func (*DeleteSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage } // HwInterfaceSetMtu represents VPP binary API message 'hw_interface_set_mtu'. type HwInterfaceSetMtu struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex Mtu uint16 } -func (*HwInterfaceSetMtu) GetMessageName() string { - return "hw_interface_set_mtu" -} -func (*HwInterfaceSetMtu) GetCrcString() string { - return "132da1e7" -} -func (*HwInterfaceSetMtu) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} } +func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interface_set_mtu" } +func (*HwInterfaceSetMtu) GetCrcString() string { return "e6746899" } +func (*HwInterfaceSetMtu) GetMessageType() api.MessageType { return api.RequestMessage } // HwInterfaceSetMtuReply represents VPP binary API message 'hw_interface_set_mtu_reply'. type HwInterfaceSetMtuReply struct { Retval int32 } -func (*HwInterfaceSetMtuReply) GetMessageName() string { - return "hw_interface_set_mtu_reply" -} -func (*HwInterfaceSetMtuReply) GetCrcString() string { - return "e8d4e804" -} -func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *HwInterfaceSetMtuReply) Reset() { *m = HwInterfaceSetMtuReply{} } +func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_interface_set_mtu_reply" } +func (*HwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" } +func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType { return api.ReplyMessage } // InterfaceNameRenumber represents VPP binary API message 'interface_name_renumber'. type InterfaceNameRenumber struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex NewShowDevInstance uint32 } -func (*InterfaceNameRenumber) GetMessageName() string { - return "interface_name_renumber" -} -func (*InterfaceNameRenumber) GetCrcString() string { - return "39194269" -} -func (*InterfaceNameRenumber) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} } +func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" } +func (*InterfaceNameRenumber) GetCrcString() string { return "2b8858b8" } +func (*InterfaceNameRenumber) GetMessageType() api.MessageType { return api.RequestMessage } // InterfaceNameRenumberReply represents VPP binary API message 'interface_name_renumber_reply'. type InterfaceNameRenumberReply struct { Retval int32 } -func (*InterfaceNameRenumberReply) GetMessageName() string { - return "interface_name_renumber_reply" -} -func (*InterfaceNameRenumberReply) GetCrcString() string { - return "e8d4e804" -} -func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *InterfaceNameRenumberReply) Reset() { *m = InterfaceNameRenumberReply{} } +func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" } +func (*InterfaceNameRenumberReply) GetCrcString() string { return "e8d4e804" } +func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceAddDelAddress represents VPP binary API message 'sw_interface_add_del_address'. type SwInterfaceAddDelAddress struct { - SwIfIndex uint32 - IsAdd uint8 - IsIPv6 uint8 - DelAll uint8 - AddressLength uint8 - Address []byte `struc:"[16]byte"` + SwIfIndex InterfaceIndex + IsAdd bool + DelAll bool + Prefix AddressWithPrefix } -func (*SwInterfaceAddDelAddress) GetMessageName() string { - return "sw_interface_add_del_address" -} -func (*SwInterfaceAddDelAddress) GetCrcString() string { - return "7b583179" -} -func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} } +func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_interface_add_del_address" } +func (*SwInterfaceAddDelAddress) GetCrcString() string { return "5803d5c4" } +func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceAddDelAddressReply represents VPP binary API message 'sw_interface_add_del_address_reply'. type SwInterfaceAddDelAddressReply struct { Retval int32 } +func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} } func (*SwInterfaceAddDelAddressReply) GetMessageName() string { return "sw_interface_add_del_address_reply" } -func (*SwInterfaceAddDelAddressReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage } -// SwInterfaceClearStats represents VPP binary API message 'sw_interface_clear_stats'. -type SwInterfaceClearStats struct { +// SwInterfaceAddDelMacAddress represents VPP binary API message 'sw_interface_add_del_mac_address'. +type SwInterfaceAddDelMacAddress struct { SwIfIndex uint32 + Addr MacAddress + IsAdd uint8 } -func (*SwInterfaceClearStats) GetMessageName() string { - return "sw_interface_clear_stats" +func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} } +func (*SwInterfaceAddDelMacAddress) GetMessageName() string { + return "sw_interface_add_del_mac_address" } -func (*SwInterfaceClearStats) GetCrcString() string { - return "529cb13f" +func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" } +func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType { return api.RequestMessage } + +// SwInterfaceAddDelMacAddressReply represents VPP binary API message 'sw_interface_add_del_mac_address_reply'. +type SwInterfaceAddDelMacAddressReply struct { + Retval int32 } -func (*SwInterfaceClearStats) GetMessageType() api.MessageType { - return api.RequestMessage + +func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} } +func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string { + return "sw_interface_add_del_mac_address_reply" } +func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage } + +// SwInterfaceClearStats represents VPP binary API message 'sw_interface_clear_stats'. +type SwInterfaceClearStats struct { + SwIfIndex InterfaceIndex +} + +func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} } +func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" } +func (*SwInterfaceClearStats) GetCrcString() string { return "f9e6675e" } +func (*SwInterfaceClearStats) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceClearStatsReply represents VPP binary API message 'sw_interface_clear_stats_reply'. type SwInterfaceClearStatsReply struct { Retval int32 } -func (*SwInterfaceClearStatsReply) GetMessageName() string { - return "sw_interface_clear_stats_reply" -} -func (*SwInterfaceClearStatsReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SwInterfaceClearStatsReply) Reset() { *m = SwInterfaceClearStatsReply{} } +func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw_interface_clear_stats_reply" } +func (*SwInterfaceClearStatsReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceDetails represents VPP binary API message 'sw_interface_details'. type SwInterfaceDetails struct { - SwIfIndex uint32 - SupSwIfIndex uint32 - L2AddressLength uint32 - L2Address []byte `struc:"[8]byte"` - AdminUpDown uint8 - LinkUpDown uint8 - LinkDuplex uint8 - LinkSpeed uint32 - LinkMtu uint16 - Mtu []uint32 `struc:"[4]uint32"` - SubID uint32 - SubDot1ad uint8 - SubDot1ah uint8 - SubNumberOfTags uint8 - SubOuterVlanID uint16 - SubInnerVlanID uint16 - SubExactMatch uint8 - SubDefault uint8 - SubOuterVlanIDAny uint8 - SubInnerVlanIDAny uint8 - VtrOp uint32 - VtrPushDot1q uint32 - VtrTag1 uint32 - VtrTag2 uint32 - OuterTag uint16 - BDmac []byte `struc:"[6]byte"` - BSmac []byte `struc:"[6]byte"` - BVlanid uint16 - ISid uint32 - InterfaceName string `struc:"[64]byte"` - Tag string `struc:"[64]byte"` -} - -func (*SwInterfaceDetails) GetMessageName() string { - return "sw_interface_details" -} -func (*SwInterfaceDetails) GetCrcString() string { - return "52a9262e" -} -func (*SwInterfaceDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} + 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"` +} + +func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} } +func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" } +func (*SwInterfaceDetails) GetCrcString() string { return "17b69fa2" } +func (*SwInterfaceDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceDump represents VPP binary API message 'sw_interface_dump'. type SwInterfaceDump struct { @@ -441,81 +396,57 @@ type SwInterfaceDump struct { NameFilter string } -func (*SwInterfaceDump) GetMessageName() string { - return "sw_interface_dump" -} -func (*SwInterfaceDump) GetCrcString() string { - return "aa610c27" -} -func (*SwInterfaceDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} } +func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" } +func (*SwInterfaceDump) GetCrcString() string { return "aa610c27" } +func (*SwInterfaceDump) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceEvent represents VPP binary API message 'sw_interface_event'. type SwInterfaceEvent struct { - PID uint32 - SwIfIndex uint32 - AdminUpDown uint8 - LinkUpDown uint8 - Deleted uint8 + PID uint32 + SwIfIndex InterfaceIndex + Flags IfStatusFlags + Deleted bool } -func (*SwInterfaceEvent) GetMessageName() string { - return "sw_interface_event" -} -func (*SwInterfaceEvent) GetCrcString() string { - return "bf9938e4" -} -func (*SwInterfaceEvent) GetMessageType() api.MessageType { - return api.EventMessage -} +func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} } +func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" } +func (*SwInterfaceEvent) GetCrcString() string { return "f709f78d" } +func (*SwInterfaceEvent) GetMessageType() api.MessageType { return api.EventMessage } // SwInterfaceGetMacAddress represents VPP binary API message 'sw_interface_get_mac_address'. type SwInterfaceGetMacAddress struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*SwInterfaceGetMacAddress) GetMessageName() string { - return "sw_interface_get_mac_address" -} -func (*SwInterfaceGetMacAddress) GetCrcString() string { - return "529cb13f" -} -func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} } +func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_interface_get_mac_address" } +func (*SwInterfaceGetMacAddress) GetCrcString() string { return "f9e6675e" } +func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceGetMacAddressReply represents VPP binary API message 'sw_interface_get_mac_address_reply'. type SwInterfaceGetMacAddressReply struct { Retval int32 - MacAddress []byte `struc:"[6]byte"` + MacAddress MacAddress } +func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} } func (*SwInterfaceGetMacAddressReply) GetMessageName() string { return "sw_interface_get_mac_address_reply" } -func (*SwInterfaceGetMacAddressReply) GetCrcString() string { - return "8ea538d3" -} -func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" } +func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceGetTable represents VPP binary API message 'sw_interface_get_table'. type SwInterfaceGetTable struct { - SwIfIndex uint32 - IsIPv6 uint8 + SwIfIndex InterfaceIndex + IsIPv6 bool } -func (*SwInterfaceGetTable) GetMessageName() string { - return "sw_interface_get_table" -} -func (*SwInterfaceGetTable) GetCrcString() string { - return "6b7bcd0a" -} -func (*SwInterfaceGetTable) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} } +func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interface_get_table" } +func (*SwInterfaceGetTable) GetCrcString() string { return "2d033de4" } +func (*SwInterfaceGetTable) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceGetTableReply represents VPP binary API message 'sw_interface_get_table_reply'. type SwInterfaceGetTableReply struct { @@ -523,302 +454,223 @@ type SwInterfaceGetTableReply struct { VrfID uint32 } -func (*SwInterfaceGetTableReply) GetMessageName() string { - return "sw_interface_get_table_reply" -} -func (*SwInterfaceGetTableReply) GetCrcString() string { - return "a6eb0109" -} -func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SwInterfaceGetTableReply) Reset() { *m = SwInterfaceGetTableReply{} } +func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_interface_get_table_reply" } +func (*SwInterfaceGetTableReply) GetCrcString() string { return "a6eb0109" } +func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceRxPlacementDetails represents VPP binary API message 'sw_interface_rx_placement_details'. type SwInterfaceRxPlacementDetails struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex QueueID uint32 WorkerID uint32 - Mode uint8 + Mode RxMode } +func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} } func (*SwInterfaceRxPlacementDetails) GetMessageName() string { return "sw_interface_rx_placement_details" } -func (*SwInterfaceRxPlacementDetails) GetCrcString() string { - return "0e9e33f4" -} -func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "f6d7d024" } +func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceRxPlacementDump represents VPP binary API message 'sw_interface_rx_placement_dump'. type SwInterfaceRxPlacementDump struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*SwInterfaceRxPlacementDump) GetMessageName() string { - return "sw_interface_rx_placement_dump" -} -func (*SwInterfaceRxPlacementDump) GetCrcString() string { - return "529cb13f" -} -func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} } +func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw_interface_rx_placement_dump" } +func (*SwInterfaceRxPlacementDump) GetCrcString() string { return "f9e6675e" } +func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetFlags represents VPP binary API message 'sw_interface_set_flags'. type SwInterfaceSetFlags struct { - SwIfIndex uint32 - AdminUpDown uint8 + SwIfIndex InterfaceIndex + Flags IfStatusFlags } -func (*SwInterfaceSetFlags) GetMessageName() string { - return "sw_interface_set_flags" -} -func (*SwInterfaceSetFlags) GetCrcString() string { - return "555485f5" -} -func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} } +func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" } +func (*SwInterfaceSetFlags) GetCrcString() string { return "6a2b491a" } +func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetFlagsReply represents VPP binary API message 'sw_interface_set_flags_reply'. type SwInterfaceSetFlagsReply struct { Retval int32 } -func (*SwInterfaceSetFlagsReply) GetMessageName() string { - return "sw_interface_set_flags_reply" -} -func (*SwInterfaceSetFlagsReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SwInterfaceSetFlagsReply) Reset() { *m = SwInterfaceSetFlagsReply{} } +func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_interface_set_flags_reply" } +func (*SwInterfaceSetFlagsReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceSetIPDirectedBroadcast represents VPP binary API message 'sw_interface_set_ip_directed_broadcast'. type SwInterfaceSetIPDirectedBroadcast struct { - SwIfIndex uint32 - Enable uint8 + SwIfIndex InterfaceIndex + Enable bool } +func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} } func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string { return "sw_interface_set_ip_directed_broadcast" } -func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { - return "a36fadc0" -} -func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" } +func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetIPDirectedBroadcastReply represents VPP binary API message 'sw_interface_set_ip_directed_broadcast_reply'. type SwInterfaceSetIPDirectedBroadcastReply struct { Retval int32 } +func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() { + *m = SwInterfaceSetIPDirectedBroadcastReply{} +} func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string { return "sw_interface_set_ip_directed_broadcast_reply" } -func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { - return "e8d4e804" -} +func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" } func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceSetMacAddress represents VPP binary API message 'sw_interface_set_mac_address'. type SwInterfaceSetMacAddress struct { - SwIfIndex uint32 - MacAddress []byte `struc:"[6]byte"` + SwIfIndex InterfaceIndex + MacAddress MacAddress } -func (*SwInterfaceSetMacAddress) GetMessageName() string { - return "sw_interface_set_mac_address" -} -func (*SwInterfaceSetMacAddress) GetCrcString() string { - return "eed5dfca" -} -func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} } +func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" } +func (*SwInterfaceSetMacAddress) GetCrcString() string { return "6aca746a" } +func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetMacAddressReply represents VPP binary API message 'sw_interface_set_mac_address_reply'. type SwInterfaceSetMacAddressReply struct { Retval int32 } +func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} } func (*SwInterfaceSetMacAddressReply) GetMessageName() string { return "sw_interface_set_mac_address_reply" } -func (*SwInterfaceSetMacAddressReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceSetMtu represents VPP binary API message 'sw_interface_set_mtu'. type SwInterfaceSetMtu struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex Mtu []uint32 `struc:"[4]uint32"` } -func (*SwInterfaceSetMtu) GetMessageName() string { - return "sw_interface_set_mtu" -} -func (*SwInterfaceSetMtu) GetCrcString() string { - return "d0008db8" -} -func (*SwInterfaceSetMtu) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} } +func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" } +func (*SwInterfaceSetMtu) GetCrcString() string { return "5cbe85e5" } +func (*SwInterfaceSetMtu) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetMtuReply represents VPP binary API message 'sw_interface_set_mtu_reply'. type SwInterfaceSetMtuReply struct { Retval int32 } -func (*SwInterfaceSetMtuReply) GetMessageName() string { - return "sw_interface_set_mtu_reply" -} -func (*SwInterfaceSetMtuReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SwInterfaceSetMtuReply) Reset() { *m = SwInterfaceSetMtuReply{} } +func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" } +func (*SwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceSetRxMode represents VPP binary API message 'sw_interface_set_rx_mode'. type SwInterfaceSetRxMode struct { - SwIfIndex uint32 - QueueIDValid uint8 + SwIfIndex InterfaceIndex + QueueIDValid bool QueueID uint32 - Mode uint8 + Mode RxMode } -func (*SwInterfaceSetRxMode) GetMessageName() string { - return "sw_interface_set_rx_mode" -} -func (*SwInterfaceSetRxMode) GetCrcString() string { - return "2a1cc58c" -} -func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} } +func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" } +func (*SwInterfaceSetRxMode) GetCrcString() string { return "780f5cee" } +func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetRxModeReply represents VPP binary API message 'sw_interface_set_rx_mode_reply'. type SwInterfaceSetRxModeReply struct { Retval int32 } -func (*SwInterfaceSetRxModeReply) GetMessageName() string { - return "sw_interface_set_rx_mode_reply" -} -func (*SwInterfaceSetRxModeReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SwInterfaceSetRxModeReply) Reset() { *m = SwInterfaceSetRxModeReply{} } +func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" } +func (*SwInterfaceSetRxModeReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceSetRxPlacement represents VPP binary API message 'sw_interface_set_rx_placement'. type SwInterfaceSetRxPlacement struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex QueueID uint32 WorkerID uint32 - IsMain uint8 + IsMain bool } -func (*SwInterfaceSetRxPlacement) GetMessageName() string { - return "sw_interface_set_rx_placement" -} -func (*SwInterfaceSetRxPlacement) GetCrcString() string { - return "4ef4377d" -} -func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} } +func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" } +func (*SwInterfaceSetRxPlacement) GetCrcString() string { return "db65f3c9" } +func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetRxPlacementReply represents VPP binary API message 'sw_interface_set_rx_placement_reply'. type SwInterfaceSetRxPlacementReply struct { Retval int32 } +func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} } func (*SwInterfaceSetRxPlacementReply) GetMessageName() string { return "sw_interface_set_rx_placement_reply" } -func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceSetTable represents VPP binary API message 'sw_interface_set_table'. type SwInterfaceSetTable struct { - SwIfIndex uint32 - IsIPv6 uint8 + SwIfIndex InterfaceIndex + IsIPv6 bool VrfID uint32 } -func (*SwInterfaceSetTable) GetMessageName() string { - return "sw_interface_set_table" -} -func (*SwInterfaceSetTable) GetCrcString() string { - return "acb25d89" -} -func (*SwInterfaceSetTable) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} } +func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" } +func (*SwInterfaceSetTable) GetCrcString() string { return "df42a577" } +func (*SwInterfaceSetTable) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetTableReply represents VPP binary API message 'sw_interface_set_table_reply'. type SwInterfaceSetTableReply struct { Retval int32 } -func (*SwInterfaceSetTableReply) GetMessageName() string { - return "sw_interface_set_table_reply" -} -func (*SwInterfaceSetTableReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SwInterfaceSetTableReply) Reset() { *m = SwInterfaceSetTableReply{} } +func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" } +func (*SwInterfaceSetTableReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceSetUnnumbered represents VPP binary API message 'sw_interface_set_unnumbered'. type SwInterfaceSetUnnumbered struct { - SwIfIndex uint32 - UnnumberedSwIfIndex uint32 - IsAdd uint8 + SwIfIndex InterfaceIndex + UnnumberedSwIfIndex InterfaceIndex + IsAdd bool } -func (*SwInterfaceSetUnnumbered) GetMessageName() string { - return "sw_interface_set_unnumbered" -} -func (*SwInterfaceSetUnnumbered) GetCrcString() string { - return "a2c1bbda" -} -func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} } +func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" } +func (*SwInterfaceSetUnnumbered) GetCrcString() string { return "938ef33b" } +func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceSetUnnumberedReply represents VPP binary API message 'sw_interface_set_unnumbered_reply'. type SwInterfaceSetUnnumberedReply struct { Retval int32 } +func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} } func (*SwInterfaceSetUnnumberedReply) GetMessageName() string { return "sw_interface_set_unnumbered_reply" } -func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceTagAddDel represents VPP binary API message 'sw_interface_tag_add_del'. type SwInterfaceTagAddDel struct { @@ -827,30 +679,20 @@ type SwInterfaceTagAddDel struct { Tag string `struc:"[64]byte"` } -func (*SwInterfaceTagAddDel) GetMessageName() string { - return "sw_interface_tag_add_del" -} -func (*SwInterfaceTagAddDel) GetCrcString() string { - return "426f8bc1" -} -func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} } +func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" } +func (*SwInterfaceTagAddDel) GetCrcString() string { return "426f8bc1" } +func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceTagAddDelReply represents VPP binary API message 'sw_interface_tag_add_del_reply'. type SwInterfaceTagAddDelReply struct { Retval int32 } -func (*SwInterfaceTagAddDelReply) GetMessageName() string { - return "sw_interface_tag_add_del_reply" -} -func (*SwInterfaceTagAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SwInterfaceTagAddDelReply) Reset() { *m = SwInterfaceTagAddDelReply{} } +func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" } +func (*SwInterfaceTagAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // WantInterfaceEvents represents VPP binary API message 'want_interface_events'. type WantInterfaceEvents struct { @@ -858,30 +700,20 @@ type WantInterfaceEvents struct { PID uint32 } -func (*WantInterfaceEvents) GetMessageName() string { - return "want_interface_events" -} -func (*WantInterfaceEvents) GetCrcString() string { - return "476f5a08" -} -func (*WantInterfaceEvents) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *WantInterfaceEvents) Reset() { *m = WantInterfaceEvents{} } +func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" } +func (*WantInterfaceEvents) GetCrcString() string { return "476f5a08" } +func (*WantInterfaceEvents) GetMessageType() api.MessageType { return api.RequestMessage } // WantInterfaceEventsReply represents VPP binary API message 'want_interface_events_reply'. type WantInterfaceEventsReply struct { Retval int32 } -func (*WantInterfaceEventsReply) GetMessageName() string { - return "want_interface_events_reply" -} -func (*WantInterfaceEventsReply) GetCrcString() string { - return "e8d4e804" -} -func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *WantInterfaceEventsReply) Reset() { *m = WantInterfaceEventsReply{} } +func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" } +func (*WantInterfaceEventsReply) GetCrcString() string { return "e8d4e804" } +func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func init() { api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "interface.CollectDetailedInterfaceStats") @@ -904,6 +736,8 @@ func init() { api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface.InterfaceNameRenumberReply") api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "interface.SwInterfaceAddDelAddress") api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "interface.SwInterfaceAddDelAddressReply") + api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "interface.SwInterfaceAddDelMacAddress") + api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "interface.SwInterfaceAddDelMacAddressReply") api.RegisterMessage((*SwInterfaceClearStats)(nil), "interface.SwInterfaceClearStats") api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "interface.SwInterfaceClearStatsReply") api.RegisterMessage((*SwInterfaceDetails)(nil), "interface.SwInterfaceDetails") @@ -960,6 +794,8 @@ func AllMessages() []api.Message { (*InterfaceNameRenumberReply)(nil), (*SwInterfaceAddDelAddress)(nil), (*SwInterfaceAddDelAddressReply)(nil), + (*SwInterfaceAddDelMacAddress)(nil), + (*SwInterfaceAddDelMacAddressReply)(nil), (*SwInterfaceClearStats)(nil), (*SwInterfaceClearStatsReply)(nil), (*SwInterfaceDetails)(nil), @@ -1008,6 +844,7 @@ type RPCService interface { 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) @@ -1173,6 +1010,15 @@ func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInte 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) diff --git a/examples/binapi/ip/ip.ba.go b/examples/binapi/ip/ip.ba.go index 62e5741..06727c3 100644 --- a/examples/binapi/ip/ip.ba.go +++ b/examples/binapi/ip/ip.ba.go @@ -5,12 +5,12 @@ Package ip is a generated VPP binary API for 'ip' module. It consists of: - 9 enums - 6 aliases - 17 types + 15 enums + 7 aliases + 14 types 1 union - 93 messages - 45 services + 60 messages + 30 services */ package ip @@ -21,42 +21,22 @@ import ( struc "github.com/lunixbochs/struc" io "io" strconv "strconv" + + ethernet_types "git.fd.io/govpp.git/examples/ethernet_types" + interface_types "git.fd.io/govpp.git/examples/interface_types" + ip_types "git.fd.io/govpp.git/examples/ip_types" ) const ( // ModuleName is the name of this module. ModuleName = "ip" // APIVersion is the API version of this module. - APIVersion = "3.0.0" + APIVersion = "3.0.1" // VersionCrc is the CRC of this module. - VersionCrc = 0x251fc559 -) - -// AddressFamily represents VPP binary API enum 'address_family'. -type AddressFamily uint32 - -const ( - ADDRESS_IP4 AddressFamily = 0 - ADDRESS_IP6 AddressFamily = 1 + VersionCrc = 0xfc3fea46 ) -var AddressFamily_name = map[uint32]string{ - 0: "ADDRESS_IP4", - 1: "ADDRESS_IP6", -} - -var 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 strconv.Itoa(int(x)) -} +type AddressFamily = ip_types.AddressFamily // FibPathFlags represents VPP binary API enum 'fib_path_flags'. type FibPathFlags uint32 @@ -178,205 +158,43 @@ func (x FibPathType) String() string { return strconv.Itoa(int(x)) } -// IPDscp represents VPP binary API enum 'ip_dscp'. -type IPDscp uint8 +type IfStatusFlags = interface_types.IfStatusFlags -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 -) +type IfType = interface_types.IfType -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", -} - -var 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 strconv.Itoa(int(x)) -} +type IPDscp = ip_types.IPDscp -// IPEcn represents VPP binary API enum 'ip_ecn'. -type IPEcn uint8 +type IPEcn = ip_types.IPEcn -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 -) +type IPProto = ip_types.IPProto -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", -} - -var 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 strconv.Itoa(int(x)) -} - -// IPNeighborFlags represents VPP binary API enum 'ip_neighbor_flags'. -type IPNeighborFlags uint32 +// IPReassType represents VPP binary API enum 'ip_reass_type'. +type IPReassType uint32 const ( - IP_API_NEIGHBOR_FLAG_NONE IPNeighborFlags = 0 - IP_API_NEIGHBOR_FLAG_STATIC IPNeighborFlags = 1 - IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY IPNeighborFlags = 2 + IP_REASS_TYPE_FULL IPReassType = 0 + IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1 ) -var IPNeighborFlags_name = map[uint32]string{ - 0: "IP_API_NEIGHBOR_FLAG_NONE", - 1: "IP_API_NEIGHBOR_FLAG_STATIC", - 2: "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY", +var IPReassType_name = map[uint32]string{ + 0: "IP_REASS_TYPE_FULL", + 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL", } -var IPNeighborFlags_value = map[string]uint32{ - "IP_API_NEIGHBOR_FLAG_NONE": 0, - "IP_API_NEIGHBOR_FLAG_STATIC": 1, - "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY": 2, +var IPReassType_value = map[string]uint32{ + "IP_REASS_TYPE_FULL": 0, + "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1, } -func (x IPNeighborFlags) String() string { - s, ok := IPNeighborFlags_name[uint32(x)] +func (x IPReassType) String() string { + s, ok := IPReassType_name[uint32(x)] if ok { return s } return strconv.Itoa(int(x)) } -// IPProto represents VPP binary API enum 'ip_proto'. -type IPProto uint32 - -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 -) - -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", -} - -var 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, -} - -func (x IPProto) String() string { - s, ok := IPProto_name[uint32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} +type LinkDuplex = interface_types.LinkDuplex // MfibItfFlags represents VPP binary API enum 'mfib_itf_flags'. type MfibItfFlags uint32 @@ -416,33 +234,27 @@ func (x MfibItfFlags) String() string { return strconv.Itoa(int(x)) } -// AddressWithPrefix represents VPP binary API alias 'address_with_prefix'. -type AddressWithPrefix Prefix +type MtuProto = interface_types.MtuProto -// IP4Address represents VPP binary API alias 'ip4_address'. -type IP4Address [4]uint8 +type RxMode = interface_types.RxMode -// IP4AddressWithPrefix represents VPP binary API alias 'ip4_address_with_prefix'. -type IP4AddressWithPrefix IP4Prefix +type SubIfFlags = interface_types.SubIfFlags -// IP6Address represents VPP binary API alias 'ip6_address'. -type IP6Address [16]uint8 +type AddressWithPrefix = ip_types.AddressWithPrefix -// IP6AddressWithPrefix represents VPP binary API alias 'ip6_address_with_prefix'. -type IP6AddressWithPrefix IP6Prefix +type InterfaceIndex = interface_types.InterfaceIndex -// MacAddress represents VPP binary API alias 'mac_address'. -type MacAddress [6]uint8 +type IP4Address = ip_types.IP4Address -// Address represents VPP binary API type 'address'. -type Address struct { - Af AddressFamily - Un AddressUnion -} +type IP4AddressWithPrefix = ip_types.IP4AddressWithPrefix -func (*Address) GetTypeName() string { - return "address" -} +type IP6Address = ip_types.IP6Address + +type IP6AddressWithPrefix = ip_types.IP6AddressWithPrefix + +type MacAddress = ethernet_types.MacAddress + +type Address = ip_types.Address // FibMplsLabel represents VPP binary API type 'fib_mpls_label'. type FibMplsLabel struct { @@ -452,9 +264,7 @@ type FibMplsLabel struct { Exp uint8 } -func (*FibMplsLabel) GetTypeName() string { - return "fib_mpls_label" -} +func (*FibMplsLabel) GetTypeName() string { return "fib_mpls_label" } // FibPath represents VPP binary API type 'fib_path'. type FibPath struct { @@ -471,9 +281,7 @@ type FibPath struct { LabelStack []FibMplsLabel `struc:"[16]FibMplsLabel"` } -func (*FibPath) GetTypeName() string { - return "fib_path" -} +func (*FibPath) GetTypeName() string { return "fib_path" } // FibPathNh represents VPP binary API type 'fib_path_nh'. type FibPathNh struct { @@ -483,41 +291,11 @@ type FibPathNh struct { ClassifyTableIndex uint32 } -func (*FibPathNh) GetTypeName() string { - return "fib_path_nh" -} - -// IP4Prefix represents VPP binary API type 'ip4_prefix'. -type IP4Prefix struct { - Address IP4Address - Len uint8 -} - -func (*IP4Prefix) GetTypeName() string { - return "ip4_prefix" -} - -// IP6Prefix represents VPP binary API type 'ip6_prefix'. -type IP6Prefix struct { - Address IP6Address - Len uint8 -} +func (*FibPathNh) GetTypeName() string { return "fib_path_nh" } -func (*IP6Prefix) GetTypeName() string { - return "ip6_prefix" -} +type IP4Prefix = ip_types.IP4Prefix -// IP6RaPrefixInfo represents VPP binary API type 'ip6_ra_prefix_info'. -type IP6RaPrefixInfo struct { - Prefix Prefix - Flags uint8 - ValidTime uint32 - PreferredTime uint32 -} - -func (*IP6RaPrefixInfo) GetTypeName() string { - return "ip6_ra_prefix_info" -} +type IP6Prefix = ip_types.IP6Prefix // IPMroute represents VPP binary API type 'ip_mroute'. type IPMroute struct { @@ -529,21 +307,7 @@ type IPMroute struct { Paths []MfibPath } -func (*IPMroute) GetTypeName() string { - return "ip_mroute" -} - -// IPNeighbor represents VPP binary API type 'ip_neighbor'. -type IPNeighbor struct { - SwIfIndex uint32 - Flags IPNeighborFlags - MacAddress MacAddress - IPAddress Address -} - -func (*IPNeighbor) GetTypeName() string { - return "ip_neighbor" -} +func (*IPMroute) GetTypeName() string { return "ip_mroute" } // IPRoute represents VPP binary API type 'ip_route'. type IPRoute struct { @@ -554,20 +318,16 @@ type IPRoute struct { Paths []FibPath } -func (*IPRoute) GetTypeName() string { - return "ip_route" -} +func (*IPRoute) GetTypeName() string { return "ip_route" } // IPTable represents VPP binary API type 'ip_table'. type IPTable struct { TableID uint32 - IsIP6 uint8 - Name []byte `struc:"[64]byte"` + IsIP6 bool + Name string `struc:"[64]byte"` } -func (*IPTable) GetTypeName() string { - return "ip_table" -} +func (*IPTable) GetTypeName() string { return "ip_table" } // MfibPath represents VPP binary API type 'mfib_path'. type MfibPath struct { @@ -575,470 +335,167 @@ type MfibPath struct { Path FibPath } -func (*MfibPath) GetTypeName() string { - return "mfib_path" -} - -// Mprefix represents VPP binary API type 'mprefix'. -type Mprefix struct { - Af AddressFamily - GrpAddressLength uint16 - GrpAddress AddressUnion - SrcAddress AddressUnion -} - -func (*Mprefix) GetTypeName() string { - return "mprefix" -} - -// Prefix represents VPP binary API type 'prefix'. -type Prefix struct { - Address Address - Len uint8 -} - -func (*Prefix) GetTypeName() string { - return "prefix" -} +func (*MfibPath) GetTypeName() string { return "mfib_path" } -// PrefixMatcher represents VPP binary API type 'prefix_matcher'. -type PrefixMatcher struct { - Le uint8 - Ge uint8 -} +type Mprefix = ip_types.Mprefix -func (*PrefixMatcher) GetTypeName() string { - return "prefix_matcher" -} +type Prefix = ip_types.Prefix -// ProxyArp represents VPP binary API type 'proxy_arp'. -type ProxyArp struct { - TableID uint32 - Low IP4Address - Hi IP4Address -} - -func (*ProxyArp) GetTypeName() string { - return "proxy_arp" -} +type PrefixMatcher = ip_types.PrefixMatcher // PuntRedirect represents VPP binary API type 'punt_redirect'. type PuntRedirect struct { - RxSwIfIndex uint32 - TxSwIfIndex uint32 + RxSwIfIndex InterfaceIndex + TxSwIfIndex InterfaceIndex Nh Address } -func (*PuntRedirect) GetTypeName() string { - return "punt_redirect" -} - -// 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 (*PuntRedirect) GetTypeName() string { return "punt_redirect" } -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 -} +type AddressUnion = ip_types.AddressUnion // IoamDisable represents VPP binary API message 'ioam_disable'. type IoamDisable struct { ID uint16 } -func (*IoamDisable) GetMessageName() string { - return "ioam_disable" -} -func (*IoamDisable) GetCrcString() string { - return "6b16a45e" -} -func (*IoamDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IoamDisable) Reset() { *m = IoamDisable{} } +func (*IoamDisable) GetMessageName() string { return "ioam_disable" } +func (*IoamDisable) GetCrcString() string { return "6b16a45e" } +func (*IoamDisable) GetMessageType() api.MessageType { return api.RequestMessage } // IoamDisableReply represents VPP binary API message 'ioam_disable_reply'. type IoamDisableReply struct { Retval int32 } -func (*IoamDisableReply) GetMessageName() string { - return "ioam_disable_reply" -} -func (*IoamDisableReply) GetCrcString() string { - return "e8d4e804" -} -func (*IoamDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} } +func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" } +func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" } +func (*IoamDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IoamEnable represents VPP binary API message 'ioam_enable'. type IoamEnable struct { ID uint16 - Seqno uint8 - Analyse uint8 - PotEnable uint8 - TraceEnable uint8 + Seqno bool + Analyse bool + PotEnable bool + TraceEnable bool NodeID uint32 } -func (*IoamEnable) GetMessageName() string { - return "ioam_enable" -} -func (*IoamEnable) GetCrcString() string { - return "9392e032" -} -func (*IoamEnable) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IoamEnable) Reset() { *m = IoamEnable{} } +func (*IoamEnable) GetMessageName() string { return "ioam_enable" } +func (*IoamEnable) GetCrcString() string { return "51ccd868" } +func (*IoamEnable) GetMessageType() api.MessageType { return api.RequestMessage } // IoamEnableReply represents VPP binary API message 'ioam_enable_reply'. type IoamEnableReply struct { Retval int32 } -func (*IoamEnableReply) GetMessageName() string { - return "ioam_enable_reply" -} -func (*IoamEnableReply) GetCrcString() string { - return "e8d4e804" -} -func (*IoamEnableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// IP4ArpEvent represents VPP binary API message 'ip4_arp_event'. -type IP4ArpEvent struct { - IP IP4Address - PID uint32 - SwIfIndex uint32 - Mac MacAddress - MacIP uint8 -} - -func (*IP4ArpEvent) GetMessageName() string { - return "ip4_arp_event" -} -func (*IP4ArpEvent) GetCrcString() string { - return "efad00cd" -} -func (*IP4ArpEvent) GetMessageType() api.MessageType { - return api.EventMessage -} - -// IP6NdEvent represents VPP binary API message 'ip6_nd_event'. -type IP6NdEvent struct { - PID uint32 - SwIfIndex uint32 - IP IP6Address - Mac MacAddress - MacIP uint8 -} - -func (*IP6NdEvent) GetMessageName() string { - return "ip6_nd_event" -} -func (*IP6NdEvent) GetCrcString() string { - return "d676f6ca" -} -func (*IP6NdEvent) GetMessageType() api.MessageType { - return api.EventMessage -} - -// IP6RaEvent represents VPP binary API message 'ip6_ra_event'. -type IP6RaEvent struct { - PID uint32 - SwIfIndex uint32 - RouterAddr IP6Address - CurrentHopLimit uint8 - Flags uint8 - RouterLifetimeInSec uint16 - NeighborReachableTimeInMsec uint32 - TimeInMsecBetweenRetransmittedNeighborSolicitations uint32 - NPrefixes uint32 `struc:"sizeof=Prefixes"` - Prefixes []IP6RaPrefixInfo -} - -func (*IP6RaEvent) GetMessageName() string { - return "ip6_ra_event" -} -func (*IP6RaEvent) GetCrcString() string { - return "170493ab" -} -func (*IP6RaEvent) GetMessageType() api.MessageType { - return api.EventMessage -} - -// IP6ndProxyAddDel represents VPP binary API message 'ip6nd_proxy_add_del'. -type IP6ndProxyAddDel struct { - SwIfIndex uint32 - IsDel uint8 - IP IP6Address -} - -func (*IP6ndProxyAddDel) GetMessageName() string { - return "ip6nd_proxy_add_del" -} -func (*IP6ndProxyAddDel) GetCrcString() string { - return "b431d174" -} -func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IP6ndProxyAddDelReply represents VPP binary API message 'ip6nd_proxy_add_del_reply'. -type IP6ndProxyAddDelReply struct { - Retval int32 -} - -func (*IP6ndProxyAddDelReply) GetMessageName() string { - return "ip6nd_proxy_add_del_reply" -} -func (*IP6ndProxyAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// IP6ndProxyDetails represents VPP binary API message 'ip6nd_proxy_details'. -type IP6ndProxyDetails struct { - SwIfIndex uint32 - IP IP6Address -} - -func (*IP6ndProxyDetails) GetMessageName() string { - return "ip6nd_proxy_details" -} -func (*IP6ndProxyDetails) GetCrcString() string { - return "46bfb684" -} -func (*IP6ndProxyDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// IP6ndProxyDump represents VPP binary API message 'ip6nd_proxy_dump'. -type IP6ndProxyDump struct{} - -func (*IP6ndProxyDump) GetMessageName() string { - return "ip6nd_proxy_dump" -} -func (*IP6ndProxyDump) GetCrcString() string { - return "51077d14" -} -func (*IP6ndProxyDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IP6ndSendRouterSolicitation represents VPP binary API message 'ip6nd_send_router_solicitation'. -type IP6ndSendRouterSolicitation struct { - Irt uint32 - Mrt uint32 - Mrc uint32 - Mrd uint32 - SwIfIndex uint32 - Stop uint8 -} - -func (*IP6ndSendRouterSolicitation) GetMessageName() string { - return "ip6nd_send_router_solicitation" -} -func (*IP6ndSendRouterSolicitation) GetCrcString() string { - return "bd968917" -} -func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IP6ndSendRouterSolicitationReply represents VPP binary API message 'ip6nd_send_router_solicitation_reply'. -type IP6ndSendRouterSolicitationReply struct { - Retval int32 -} - -func (*IP6ndSendRouterSolicitationReply) GetMessageName() string { - return "ip6nd_send_router_solicitation_reply" -} -func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { - return "e8d4e804" -} -func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} } +func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" } +func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" } +func (*IoamEnableReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPAddressDetails represents VPP binary API message 'ip_address_details'. type IPAddressDetails struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex Prefix AddressWithPrefix } -func (*IPAddressDetails) GetMessageName() string { - return "ip_address_details" -} -func (*IPAddressDetails) GetCrcString() string { - return "7002eee7" -} -func (*IPAddressDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} } +func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" } +func (*IPAddressDetails) GetCrcString() string { return "b1199745" } +func (*IPAddressDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // IPAddressDump represents VPP binary API message 'ip_address_dump'. type IPAddressDump struct { - SwIfIndex uint32 - IsIPv6 uint8 + SwIfIndex InterfaceIndex + IsIPv6 bool } -func (*IPAddressDump) GetMessageName() string { - return "ip_address_dump" -} -func (*IPAddressDump) GetCrcString() string { - return "6b7bcd0a" -} -func (*IPAddressDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPAddressDump) Reset() { *m = IPAddressDump{} } +func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" } +func (*IPAddressDump) GetCrcString() string { return "2d033de4" } +func (*IPAddressDump) GetMessageType() api.MessageType { return api.RequestMessage } // IPContainerProxyAddDel represents VPP binary API message 'ip_container_proxy_add_del'. type IPContainerProxyAddDel struct { Pfx Prefix - SwIfIndex uint32 - IsAdd uint8 + SwIfIndex InterfaceIndex + IsAdd bool } -func (*IPContainerProxyAddDel) GetMessageName() string { - return "ip_container_proxy_add_del" -} -func (*IPContainerProxyAddDel) GetCrcString() string { - return "630352c5" -} -func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} } +func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" } +func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" } +func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // IPContainerProxyAddDelReply represents VPP binary API message 'ip_container_proxy_add_del_reply'. type IPContainerProxyAddDelReply struct { Retval int32 } +func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} } func (*IPContainerProxyAddDelReply) GetMessageName() string { return "ip_container_proxy_add_del_reply" } -func (*IPContainerProxyAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPContainerProxyDetails represents VPP binary API message 'ip_container_proxy_details'. type IPContainerProxyDetails struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex Prefix Prefix } -func (*IPContainerProxyDetails) GetMessageName() string { - return "ip_container_proxy_details" -} -func (*IPContainerProxyDetails) GetCrcString() string { - return "550a6c28" -} -func (*IPContainerProxyDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} } +func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" } +func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" } +func (*IPContainerProxyDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // IPContainerProxyDump represents VPP binary API message 'ip_container_proxy_dump'. type IPContainerProxyDump struct{} -func (*IPContainerProxyDump) GetMessageName() string { - return "ip_container_proxy_dump" -} -func (*IPContainerProxyDump) GetCrcString() string { - return "51077d14" -} -func (*IPContainerProxyDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} } +func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" } +func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" } +func (*IPContainerProxyDump) GetMessageType() api.MessageType { return api.RequestMessage } // IPDetails represents VPP binary API message 'ip_details'. type IPDetails struct { - SwIfIndex uint32 - IsIPv6 uint8 + SwIfIndex InterfaceIndex + IsIPv6 bool } -func (*IPDetails) GetMessageName() string { - return "ip_details" -} -func (*IPDetails) GetCrcString() string { - return "8bb37ec4" -} -func (*IPDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPDetails) Reset() { *m = IPDetails{} } +func (*IPDetails) GetMessageName() string { return "ip_details" } +func (*IPDetails) GetCrcString() string { return "eb152d07" } +func (*IPDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // IPDump represents VPP binary API message 'ip_dump'. type IPDump struct { - IsIPv6 uint8 + IsIPv6 bool } -func (*IPDump) GetMessageName() string { - return "ip_dump" -} -func (*IPDump) GetCrcString() string { - return "de883da4" -} -func (*IPDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPDump) Reset() { *m = IPDump{} } +func (*IPDump) GetMessageName() string { return "ip_dump" } +func (*IPDump) GetCrcString() string { return "98d231ca" } +func (*IPDump) GetMessageType() api.MessageType { return api.RequestMessage } // IPMrouteAddDel represents VPP binary API message 'ip_mroute_add_del'. type IPMrouteAddDel struct { - IsAdd uint8 - IsMultipath uint8 + IsAdd bool + IsMultipath bool Route IPMroute } -func (*IPMrouteAddDel) GetMessageName() string { - return "ip_mroute_add_del" -} -func (*IPMrouteAddDel) GetCrcString() string { - return "edbca49e" -} -func (*IPMrouteAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} } +func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" } +func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" } +func (*IPMrouteAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // IPMrouteAddDelReply represents VPP binary API message 'ip_mroute_add_del_reply'. type IPMrouteAddDelReply struct { @@ -1046,308 +503,148 @@ type IPMrouteAddDelReply struct { StatsIndex uint32 } -func (*IPMrouteAddDelReply) GetMessageName() string { - return "ip_mroute_add_del_reply" -} -func (*IPMrouteAddDelReply) GetCrcString() string { - return "1992deab" -} -func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} } +func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" } +func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" } +func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPMrouteDetails represents VPP binary API message 'ip_mroute_details'. type IPMrouteDetails struct { Route IPMroute } -func (*IPMrouteDetails) GetMessageName() string { - return "ip_mroute_details" -} -func (*IPMrouteDetails) GetCrcString() string { - return "c1cb4b44" -} -func (*IPMrouteDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} } +func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" } +func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" } +func (*IPMrouteDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // IPMrouteDump represents VPP binary API message 'ip_mroute_dump'. type IPMrouteDump struct { Table IPTable } -func (*IPMrouteDump) GetMessageName() string { - return "ip_mroute_dump" -} -func (*IPMrouteDump) GetCrcString() string { - return "f5ad78e8" -} -func (*IPMrouteDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} } +func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" } +func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" } +func (*IPMrouteDump) GetMessageType() api.MessageType { return api.RequestMessage } // IPMtableDetails represents VPP binary API message 'ip_mtable_details'. type IPMtableDetails struct { Table IPTable } -func (*IPMtableDetails) GetMessageName() string { - return "ip_mtable_details" -} -func (*IPMtableDetails) GetCrcString() string { - return "f5ad78e8" -} -func (*IPMtableDetails) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} } +func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" } +func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" } +func (*IPMtableDetails) GetMessageType() api.MessageType { return api.RequestMessage } // IPMtableDump represents VPP binary API message 'ip_mtable_dump'. type IPMtableDump struct{} -func (*IPMtableDump) GetMessageName() string { - return "ip_mtable_dump" -} -func (*IPMtableDump) GetCrcString() string { - return "51077d14" -} -func (*IPMtableDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IPNeighborAddDel represents VPP binary API message 'ip_neighbor_add_del'. -type IPNeighborAddDel struct { - IsAdd uint8 - Neighbor IPNeighbor -} - -func (*IPNeighborAddDel) GetMessageName() string { - return "ip_neighbor_add_del" -} -func (*IPNeighborAddDel) GetCrcString() string { - return "029dad44" -} -func (*IPNeighborAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IPNeighborAddDelReply represents VPP binary API message 'ip_neighbor_add_del_reply'. -type IPNeighborAddDelReply struct { - Retval int32 - StatsIndex uint32 -} - -func (*IPNeighborAddDelReply) GetMessageName() string { - return "ip_neighbor_add_del_reply" -} -func (*IPNeighborAddDelReply) GetCrcString() string { - return "1992deab" -} -func (*IPNeighborAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// IPNeighborDetails represents VPP binary API message 'ip_neighbor_details'. -type IPNeighborDetails struct { - Neighbor IPNeighbor -} - -func (*IPNeighborDetails) GetMessageName() string { - return "ip_neighbor_details" -} -func (*IPNeighborDetails) GetCrcString() string { - return "c1a190ed" -} -func (*IPNeighborDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// IPNeighborDump represents VPP binary API message 'ip_neighbor_dump'. -type IPNeighborDump struct { - SwIfIndex uint32 - IsIPv6 uint8 -} - -func (*IPNeighborDump) GetMessageName() string { - return "ip_neighbor_dump" -} -func (*IPNeighborDump) GetCrcString() string { - return "6b7bcd0a" -} -func (*IPNeighborDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IPProbeNeighbor represents VPP binary API message 'ip_probe_neighbor'. -type IPProbeNeighbor struct { - SwIfIndex uint32 - Dst Address -} - -func (*IPProbeNeighbor) GetMessageName() string { - return "ip_probe_neighbor" -} -func (*IPProbeNeighbor) GetCrcString() string { - return "37bc128d" -} -func (*IPProbeNeighbor) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IPProbeNeighborReply represents VPP binary API message 'ip_probe_neighbor_reply'. -type IPProbeNeighborReply struct { - Retval int32 -} - -func (*IPProbeNeighborReply) GetMessageName() string { - return "ip_probe_neighbor_reply" -} -func (*IPProbeNeighborReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPProbeNeighborReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPMtableDump) Reset() { *m = IPMtableDump{} } +func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" } +func (*IPMtableDump) GetCrcString() string { return "51077d14" } +func (*IPMtableDump) GetMessageType() api.MessageType { return api.RequestMessage } // IPPuntPolice represents VPP binary API message 'ip_punt_police'. type IPPuntPolice struct { PolicerIndex uint32 - IsAdd uint8 - IsIP6 uint8 + IsAdd bool + IsIP6 bool } -func (*IPPuntPolice) GetMessageName() string { - return "ip_punt_police" -} -func (*IPPuntPolice) GetCrcString() string { - return "38691592" -} -func (*IPPuntPolice) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} } +func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" } +func (*IPPuntPolice) GetCrcString() string { return "db867cea" } +func (*IPPuntPolice) GetMessageType() api.MessageType { return api.RequestMessage } // IPPuntPoliceReply represents VPP binary API message 'ip_punt_police_reply'. type IPPuntPoliceReply struct { Retval int32 } -func (*IPPuntPoliceReply) GetMessageName() string { - return "ip_punt_police_reply" -} -func (*IPPuntPoliceReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPPuntPoliceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} } +func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" } +func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" } +func (*IPPuntPoliceReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPPuntRedirect represents VPP binary API message 'ip_punt_redirect'. type IPPuntRedirect struct { Punt PuntRedirect - IsAdd uint8 + IsAdd bool } -func (*IPPuntRedirect) GetMessageName() string { - return "ip_punt_redirect" -} -func (*IPPuntRedirect) GetCrcString() string { - return "f9ea79a8" -} -func (*IPPuntRedirect) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} } +func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" } +func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" } +func (*IPPuntRedirect) GetMessageType() api.MessageType { return api.RequestMessage } // IPPuntRedirectDetails represents VPP binary API message 'ip_punt_redirect_details'. type IPPuntRedirectDetails struct { Punt PuntRedirect } -func (*IPPuntRedirectDetails) GetMessageName() string { - return "ip_punt_redirect_details" -} -func (*IPPuntRedirectDetails) GetCrcString() string { - return "d6441360" -} -func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} } +func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" } +func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" } +func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // IPPuntRedirectDump represents VPP binary API message 'ip_punt_redirect_dump'. type IPPuntRedirectDump struct { - SwIfIndex uint32 - IsIPv6 uint8 + SwIfIndex InterfaceIndex + IsIPv6 bool } -func (*IPPuntRedirectDump) GetMessageName() string { - return "ip_punt_redirect_dump" -} -func (*IPPuntRedirectDump) GetCrcString() string { - return "6b7bcd0a" -} -func (*IPPuntRedirectDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} } +func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" } +func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" } +func (*IPPuntRedirectDump) GetMessageType() api.MessageType { return api.RequestMessage } // IPPuntRedirectReply represents VPP binary API message 'ip_punt_redirect_reply'. type IPPuntRedirectReply struct { Retval int32 } -func (*IPPuntRedirectReply) GetMessageName() string { - return "ip_punt_redirect_reply" -} -func (*IPPuntRedirectReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPPuntRedirectReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} } +func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" } +func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" } +func (*IPPuntRedirectReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPReassemblyEnableDisable represents VPP binary API message 'ip_reassembly_enable_disable'. type IPReassemblyEnableDisable struct { - SwIfIndex uint32 - EnableIP4 uint8 - EnableIP6 uint8 + SwIfIndex InterfaceIndex + EnableIP4 bool + EnableIP6 bool + Type IPReassType } -func (*IPReassemblyEnableDisable) GetMessageName() string { - return "ip_reassembly_enable_disable" -} -func (*IPReassemblyEnableDisable) GetCrcString() string { - return "bb8dc5d0" -} -func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} } +func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" } +func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" } +func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } // IPReassemblyEnableDisableReply represents VPP binary API message 'ip_reassembly_enable_disable_reply'. type IPReassemblyEnableDisableReply struct { Retval int32 } +func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} } func (*IPReassemblyEnableDisableReply) GetMessageName() string { return "ip_reassembly_enable_disable_reply" } -func (*IPReassemblyEnableDisableReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" } +func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPReassemblyGet represents VPP binary API message 'ip_reassembly_get'. type IPReassemblyGet struct { - IsIP6 uint8 + IsIP6 bool + Type IPReassType } -func (*IPReassemblyGet) GetMessageName() string { - return "ip_reassembly_get" -} -func (*IPReassemblyGet) GetCrcString() string { - return "6fe91190" -} -func (*IPReassemblyGet) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} } +func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" } +func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" } +func (*IPReassemblyGet) GetMessageType() api.MessageType { return api.RequestMessage } // IPReassemblyGetReply represents VPP binary API message 'ip_reassembly_get_reply'. type IPReassemblyGetReply struct { @@ -1356,18 +653,13 @@ type IPReassemblyGetReply struct { MaxReassemblies uint32 MaxReassemblyLength uint32 ExpireWalkIntervalMs uint32 - IsIP6 uint8 + IsIP6 bool } -func (*IPReassemblyGetReply) GetMessageName() string { - return "ip_reassembly_get_reply" -} -func (*IPReassemblyGetReply) GetCrcString() string { - return "c96e518d" -} -func (*IPReassemblyGetReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} } +func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" } +func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" } +func (*IPReassemblyGetReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPReassemblySet represents VPP binary API message 'ip_reassembly_set'. type IPReassemblySet struct { @@ -1375,50 +667,36 @@ type IPReassemblySet struct { MaxReassemblies uint32 MaxReassemblyLength uint32 ExpireWalkIntervalMs uint32 - IsIP6 uint8 + IsIP6 bool + Type IPReassType } -func (*IPReassemblySet) GetMessageName() string { - return "ip_reassembly_set" -} -func (*IPReassemblySet) GetCrcString() string { - return "403051cd" -} -func (*IPReassemblySet) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} } +func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" } +func (*IPReassemblySet) GetCrcString() string { return "16467d25" } +func (*IPReassemblySet) GetMessageType() api.MessageType { return api.RequestMessage } // IPReassemblySetReply represents VPP binary API message 'ip_reassembly_set_reply'. type IPReassemblySetReply struct { Retval int32 } -func (*IPReassemblySetReply) GetMessageName() string { - return "ip_reassembly_set_reply" -} -func (*IPReassemblySetReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPReassemblySetReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} } +func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" } +func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" } +func (*IPReassemblySetReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPRouteAddDel represents VPP binary API message 'ip_route_add_del'. type IPRouteAddDel struct { - IsAdd uint8 - IsMultipath uint8 + IsAdd bool + IsMultipath bool Route IPRoute } -func (*IPRouteAddDel) GetMessageName() string { - return "ip_route_add_del" -} -func (*IPRouteAddDel) GetCrcString() string { - return "5ceee41c" -} -func (*IPRouteAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} } +func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" } +func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" } +func (*IPRouteAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // IPRouteAddDelReply represents VPP binary API message 'ip_route_add_del_reply'. type IPRouteAddDelReply struct { @@ -1426,84 +704,34 @@ type IPRouteAddDelReply struct { StatsIndex uint32 } -func (*IPRouteAddDelReply) GetMessageName() string { - return "ip_route_add_del_reply" -} -func (*IPRouteAddDelReply) GetCrcString() string { - return "1992deab" -} -func (*IPRouteAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} } +func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" } +func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" } +func (*IPRouteAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPRouteDetails represents VPP binary API message 'ip_route_details'. type IPRouteDetails struct { Route IPRoute } -func (*IPRouteDetails) GetMessageName() string { - return "ip_route_details" -} -func (*IPRouteDetails) GetCrcString() string { - return "d1ffaae1" -} -func (*IPRouteDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} } +func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" } +func (*IPRouteDetails) GetCrcString() string { return "d1ffaae1" } +func (*IPRouteDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // IPRouteDump represents VPP binary API message 'ip_route_dump'. type IPRouteDump struct { Table IPTable } -func (*IPRouteDump) GetMessageName() string { - return "ip_route_dump" -} -func (*IPRouteDump) GetCrcString() string { - return "f5ad78e8" -} -func (*IPRouteDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IPScanNeighborEnableDisable represents VPP binary API message 'ip_scan_neighbor_enable_disable'. -type IPScanNeighborEnableDisable struct { - Mode uint8 - ScanInterval uint8 - MaxProcTime uint8 - MaxUpdate uint8 - ScanIntDelay uint8 - StaleThreshold uint8 -} - -func (*IPScanNeighborEnableDisable) GetMessageName() string { - return "ip_scan_neighbor_enable_disable" -} -func (*IPScanNeighborEnableDisable) GetCrcString() string { - return "0a6bf57a" -} -func (*IPScanNeighborEnableDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IPScanNeighborEnableDisableReply represents VPP binary API message 'ip_scan_neighbor_enable_disable_reply'. -type IPScanNeighborEnableDisableReply struct { - Retval int32 -} - -func (*IPScanNeighborEnableDisableReply) GetMessageName() string { - return "ip_scan_neighbor_enable_disable_reply" -} -func (*IPScanNeighborEnableDisableReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPScanNeighborEnableDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPRouteDump) Reset() { *m = IPRouteDump{} } +func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" } +func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" } +func (*IPRouteDump) GetMessageType() api.MessageType { return api.RequestMessage } // IPSourceAndPortRangeCheckAddDel represents VPP binary API message 'ip_source_and_port_range_check_add_del'. type IPSourceAndPortRangeCheckAddDel struct { - IsAdd uint8 + IsAdd bool Prefix Prefix NumberOfRanges uint8 LowPorts []uint16 `struc:"[32]uint16"` @@ -1511,47 +739,44 @@ type IPSourceAndPortRangeCheckAddDel struct { VrfID uint32 } +func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} } func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string { return "ip_source_and_port_range_check_add_del" } -func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { - return "97e10a78" -} -func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" } +func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // IPSourceAndPortRangeCheckAddDelReply represents VPP binary API message 'ip_source_and_port_range_check_add_del_reply'. type IPSourceAndPortRangeCheckAddDelReply struct { Retval int32 } +func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} } func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string { return "ip_source_and_port_range_check_add_del_reply" } -func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { - return "e8d4e804" -} +func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" } func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPSourceAndPortRangeCheckInterfaceAddDel represents VPP binary API message 'ip_source_and_port_range_check_interface_add_del'. type IPSourceAndPortRangeCheckInterfaceAddDel struct { - IsAdd uint8 - SwIfIndex uint32 + IsAdd bool + SwIfIndex InterfaceIndex TCPInVrfID uint32 TCPOutVrfID uint32 UDPInVrfID uint32 UDPOutVrfID uint32 } +func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() { + *m = IPSourceAndPortRangeCheckInterfaceAddDel{} +} func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string { return "ip_source_and_port_range_check_interface_add_del" } -func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { - return "6966bc44" -} +func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" } func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType { return api.RequestMessage } @@ -1561,641 +786,270 @@ type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { Retval int32 } +func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() { + *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{} +} func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string { return "ip_source_and_port_range_check_interface_add_del_reply" } -func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { - return "e8d4e804" -} +func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPSourceCheckInterfaceAddDel represents VPP binary API message 'ip_source_check_interface_add_del'. type IPSourceCheckInterfaceAddDel struct { - IsAdd uint8 - Loose uint8 - SwIfIndex uint32 + IsAdd bool + Loose bool + SwIfIndex InterfaceIndex } +func (m *IPSourceCheckInterfaceAddDel) Reset() { *m = IPSourceCheckInterfaceAddDel{} } func (*IPSourceCheckInterfaceAddDel) GetMessageName() string { return "ip_source_check_interface_add_del" } -func (*IPSourceCheckInterfaceAddDel) GetCrcString() string { - return "0a60152a" -} -func (*IPSourceCheckInterfaceAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (*IPSourceCheckInterfaceAddDel) GetCrcString() string { return "6612356b" } +func (*IPSourceCheckInterfaceAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // IPSourceCheckInterfaceAddDelReply represents VPP binary API message 'ip_source_check_interface_add_del_reply'. type IPSourceCheckInterfaceAddDelReply struct { Retval int32 } +func (m *IPSourceCheckInterfaceAddDelReply) Reset() { *m = IPSourceCheckInterfaceAddDelReply{} } func (*IPSourceCheckInterfaceAddDelReply) GetMessageName() string { return "ip_source_check_interface_add_del_reply" } -func (*IPSourceCheckInterfaceAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPSourceCheckInterfaceAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*IPSourceCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPSourceCheckInterfaceAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPTableAddDel represents VPP binary API message 'ip_table_add_del'. type IPTableAddDel struct { - IsAdd uint8 + IsAdd bool Table IPTable } -func (*IPTableAddDel) GetMessageName() string { - return "ip_table_add_del" -} -func (*IPTableAddDel) GetCrcString() string { - return "e5d378f2" -} -func (*IPTableAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} } +func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" } +func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" } +func (*IPTableAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // IPTableAddDelReply represents VPP binary API message 'ip_table_add_del_reply'. type IPTableAddDelReply struct { Retval int32 } -func (*IPTableAddDelReply) GetMessageName() string { - return "ip_table_add_del_reply" -} -func (*IPTableAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func (*IPTableAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} } +func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" } +func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // IPTableDetails represents VPP binary API message 'ip_table_details'. type IPTableDetails struct { Table IPTable } -func (*IPTableDetails) GetMessageName() string { - return "ip_table_details" -} -func (*IPTableDetails) GetCrcString() string { - return "4d251961" -} -func (*IPTableDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPTableDetails) Reset() { *m = IPTableDetails{} } +func (*IPTableDetails) GetMessageName() string { return "ip_table_details" } +func (*IPTableDetails) GetCrcString() string { return "c79fca0f" } +func (*IPTableDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // IPTableDump represents VPP binary API message 'ip_table_dump'. type IPTableDump struct{} -func (*IPTableDump) GetMessageName() string { - return "ip_table_dump" -} -func (*IPTableDump) GetCrcString() string { - return "51077d14" -} -func (*IPTableDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// IPUnnumberedDetails represents VPP binary API message 'ip_unnumbered_details'. -type IPUnnumberedDetails struct { - SwIfIndex uint32 - IPSwIfIndex uint32 -} - -func (*IPUnnumberedDetails) GetMessageName() string { - return "ip_unnumbered_details" -} -func (*IPUnnumberedDetails) GetCrcString() string { - return "ae694cf4" -} -func (*IPUnnumberedDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// IPUnnumberedDump represents VPP binary API message 'ip_unnumbered_dump'. -type IPUnnumberedDump struct { - SwIfIndex uint32 -} - -func (*IPUnnumberedDump) GetMessageName() string { - return "ip_unnumbered_dump" -} -func (*IPUnnumberedDump) GetCrcString() string { - return "529cb13f" -} -func (*IPUnnumberedDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// MfibSignalDetails represents VPP binary API message 'mfib_signal_details'. -type MfibSignalDetails struct { - SwIfIndex uint32 - TableID uint32 - Prefix Mprefix - IPPacketLen uint16 - IPPacketData []byte `struc:"[256]byte"` -} - -func (*MfibSignalDetails) GetMessageName() string { - return "mfib_signal_details" -} -func (*MfibSignalDetails) GetCrcString() string { - return "697ab6b4" -} -func (*MfibSignalDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// MfibSignalDump represents VPP binary API message 'mfib_signal_dump'. -type MfibSignalDump struct{} +func (m *IPTableDump) Reset() { *m = IPTableDump{} } +func (*IPTableDump) GetMessageName() string { return "ip_table_dump" } +func (*IPTableDump) GetCrcString() string { return "51077d14" } +func (*IPTableDump) GetMessageType() api.MessageType { return api.RequestMessage } -func (*MfibSignalDump) GetMessageName() string { - return "mfib_signal_dump" -} -func (*MfibSignalDump) GetCrcString() string { - return "51077d14" -} -func (*MfibSignalDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// ProxyArpAddDel represents VPP binary API message 'proxy_arp_add_del'. -type ProxyArpAddDel struct { - IsAdd uint8 - Proxy ProxyArp +// IPTableFlush represents VPP binary API message 'ip_table_flush'. +type IPTableFlush struct { + Table IPTable } -func (*ProxyArpAddDel) GetMessageName() string { - return "proxy_arp_add_del" -} -func (*ProxyArpAddDel) GetCrcString() string { - return "320b4c54" -} -func (*ProxyArpAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPTableFlush) Reset() { *m = IPTableFlush{} } +func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" } +func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" } +func (*IPTableFlush) GetMessageType() api.MessageType { return api.RequestMessage } -// ProxyArpAddDelReply represents VPP binary API message 'proxy_arp_add_del_reply'. -type ProxyArpAddDelReply struct { +// IPTableFlushReply represents VPP binary API message 'ip_table_flush_reply'. +type IPTableFlushReply struct { Retval int32 } -func (*ProxyArpAddDelReply) GetMessageName() string { - return "proxy_arp_add_del_reply" -} -func (*ProxyArpAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func (*ProxyArpAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// ProxyArpDetails represents VPP binary API message 'proxy_arp_details'. -type ProxyArpDetails struct { - Proxy ProxyArp -} +func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} } +func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" } +func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableFlushReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (*ProxyArpDetails) GetMessageName() string { - return "proxy_arp_details" -} -func (*ProxyArpDetails) GetCrcString() string { - return "9228c150" -} -func (*ProxyArpDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// ProxyArpDump represents VPP binary API message 'proxy_arp_dump'. -type ProxyArpDump struct{} - -func (*ProxyArpDump) GetMessageName() string { - return "proxy_arp_dump" -} -func (*ProxyArpDump) GetCrcString() string { - return "51077d14" -} -func (*ProxyArpDump) GetMessageType() api.MessageType { - return api.RequestMessage +// IPTableReplaceBegin represents VPP binary API message 'ip_table_replace_begin'. +type IPTableReplaceBegin struct { + Table IPTable } -// ProxyArpIntfcDetails represents VPP binary API message 'proxy_arp_intfc_details'. -type ProxyArpIntfcDetails struct { - SwIfIndex uint32 -} +func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} } +func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" } +func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" } +func (*IPTableReplaceBegin) GetMessageType() api.MessageType { return api.RequestMessage } -func (*ProxyArpIntfcDetails) GetMessageName() string { - return "proxy_arp_intfc_details" -} -func (*ProxyArpIntfcDetails) GetCrcString() string { - return "f6458e5f" -} -func (*ProxyArpIntfcDetails) GetMessageType() api.MessageType { - return api.ReplyMessage +// IPTableReplaceBeginReply represents VPP binary API message 'ip_table_replace_begin_reply'. +type IPTableReplaceBeginReply struct { + Retval int32 } -// ProxyArpIntfcDump represents VPP binary API message 'proxy_arp_intfc_dump'. -type ProxyArpIntfcDump struct{} +func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} } +func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" } +func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (*ProxyArpIntfcDump) GetMessageName() string { - return "proxy_arp_intfc_dump" -} -func (*ProxyArpIntfcDump) GetCrcString() string { - return "51077d14" -} -func (*ProxyArpIntfcDump) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// ProxyArpIntfcEnableDisable represents VPP binary API message 'proxy_arp_intfc_enable_disable'. -type ProxyArpIntfcEnableDisable struct { - SwIfIndex uint32 - EnableDisable uint8 +// IPTableReplaceEnd represents VPP binary API message 'ip_table_replace_end'. +type IPTableReplaceEnd struct { + Table IPTable } -func (*ProxyArpIntfcEnableDisable) GetMessageName() string { - return "proxy_arp_intfc_enable_disable" -} -func (*ProxyArpIntfcEnableDisable) GetCrcString() string { - return "69d24598" -} -func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} } +func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" } +func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" } +func (*IPTableReplaceEnd) GetMessageType() api.MessageType { return api.RequestMessage } -// ProxyArpIntfcEnableDisableReply represents VPP binary API message 'proxy_arp_intfc_enable_disable_reply'. -type ProxyArpIntfcEnableDisableReply struct { +// IPTableReplaceEndReply represents VPP binary API message 'ip_table_replace_end_reply'. +type IPTableReplaceEndReply struct { Retval int32 } -func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string { - return "proxy_arp_intfc_enable_disable_reply" -} -func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { - return "e8d4e804" -} -func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} } +func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" } +func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableReplaceEndReply) GetMessageType() api.MessageType { return api.ReplyMessage } -// ResetFib represents VPP binary API message 'reset_fib'. -type ResetFib struct { - VrfID uint32 - IsIPv6 uint8 +// IPUnnumberedDetails represents VPP binary API message 'ip_unnumbered_details'. +type IPUnnumberedDetails struct { + SwIfIndex InterfaceIndex + IPSwIfIndex InterfaceIndex } -func (*ResetFib) GetMessageName() string { - return "reset_fib" -} -func (*ResetFib) GetCrcString() string { - return "8553ebd9" -} -func (*ResetFib) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} } +func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" } +func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" } +func (*IPUnnumberedDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -// ResetFibReply represents VPP binary API message 'reset_fib_reply'. -type ResetFibReply struct { - Retval int32 +// IPUnnumberedDump represents VPP binary API message 'ip_unnumbered_dump'. +type IPUnnumberedDump struct { + SwIfIndex InterfaceIndex } -func (*ResetFibReply) GetMessageName() string { - return "reset_fib_reply" -} -func (*ResetFibReply) GetCrcString() string { - return "e8d4e804" -} -func (*ResetFibReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} } +func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" } +func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" } +func (*IPUnnumberedDump) GetMessageType() api.MessageType { return api.RequestMessage } -// SetArpNeighborLimit represents VPP binary API message 'set_arp_neighbor_limit'. -type SetArpNeighborLimit struct { - IsIPv6 uint8 - ArpNeighborLimit uint32 +// MfibSignalDetails represents VPP binary API message 'mfib_signal_details'. +type MfibSignalDetails struct { + SwIfIndex InterfaceIndex + TableID uint32 + Prefix Mprefix + IPPacketLen uint16 + IPPacketData []byte `struc:"[256]byte"` } -func (*SetArpNeighborLimit) GetMessageName() string { - return "set_arp_neighbor_limit" -} -func (*SetArpNeighborLimit) GetCrcString() string { - return "97d01fd6" -} -func (*SetArpNeighborLimit) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} } +func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" } +func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" } +func (*MfibSignalDetails) GetMessageType() api.MessageType { return api.ReplyMessage } -// SetArpNeighborLimitReply represents VPP binary API message 'set_arp_neighbor_limit_reply'. -type SetArpNeighborLimitReply struct { - Retval int32 -} +// MfibSignalDump represents VPP binary API message 'mfib_signal_dump'. +type MfibSignalDump struct{} -func (*SetArpNeighborLimitReply) GetMessageName() string { - return "set_arp_neighbor_limit_reply" -} -func (*SetArpNeighborLimitReply) GetCrcString() string { - return "e8d4e804" -} -func (*SetArpNeighborLimitReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} } +func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" } +func (*MfibSignalDump) GetCrcString() string { return "51077d14" } +func (*MfibSignalDump) GetMessageType() api.MessageType { return api.RequestMessage } // SetIPFlowHash represents VPP binary API message 'set_ip_flow_hash'. type SetIPFlowHash struct { VrfID uint32 - IsIPv6 uint8 - Src uint8 - Dst uint8 - Sport uint8 - Dport uint8 - Proto uint8 - Reverse uint8 - Symmetric uint8 + IsIPv6 bool + Src bool + Dst bool + Sport bool + Dport bool + Proto bool + Reverse bool + Symmetric bool } -func (*SetIPFlowHash) GetMessageName() string { - return "set_ip_flow_hash" -} -func (*SetIPFlowHash) GetCrcString() string { - return "a9084bfb" -} -func (*SetIPFlowHash) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} } +func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" } +func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" } +func (*SetIPFlowHash) GetMessageType() api.MessageType { return api.RequestMessage } // SetIPFlowHashReply represents VPP binary API message 'set_ip_flow_hash_reply'. type SetIPFlowHashReply struct { Retval int32 } -func (*SetIPFlowHashReply) GetMessageName() string { - return "set_ip_flow_hash_reply" -} -func (*SetIPFlowHashReply) GetCrcString() string { - return "e8d4e804" -} -func (*SetIPFlowHashReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} } +func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" } +func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" } +func (*SetIPFlowHashReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceIP6EnableDisable represents VPP binary API message 'sw_interface_ip6_enable_disable'. type SwInterfaceIP6EnableDisable struct { - SwIfIndex uint32 - Enable uint8 + SwIfIndex InterfaceIndex + Enable bool } -func (*SwInterfaceIP6EnableDisable) GetMessageName() string { - return "sw_interface_ip6_enable_disable" -} -func (*SwInterfaceIP6EnableDisable) GetCrcString() string { - return "a36fadc0" -} -func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} } +func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" } +func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" } +func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceIP6EnableDisableReply represents VPP binary API message 'sw_interface_ip6_enable_disable_reply'. type SwInterfaceIP6EnableDisableReply struct { Retval int32 } +func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} } func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string { return "sw_interface_ip6_enable_disable_reply" } -func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SwInterfaceIP6SetLinkLocalAddress represents VPP binary API message 'sw_interface_ip6_set_link_local_address'. type SwInterfaceIP6SetLinkLocalAddress struct { - SwIfIndex uint32 - Address []byte `struc:"[16]byte"` + SwIfIndex InterfaceIndex + IP IP6Address } +func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} } func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { return "sw_interface_ip6_set_link_local_address" } -func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { - return "d73bf1ab" -} -func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" } +func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { return api.RequestMessage } // SwInterfaceIP6SetLinkLocalAddressReply represents VPP binary API message 'sw_interface_ip6_set_link_local_address_reply'. type SwInterfaceIP6SetLinkLocalAddressReply struct { Retval int32 } +func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() { + *m = SwInterfaceIP6SetLinkLocalAddressReply{} +} func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { return "sw_interface_ip6_set_link_local_address_reply" } -func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { - return "e8d4e804" -} +func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" } func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage } -// SwInterfaceIP6ndRaConfig represents VPP binary API message 'sw_interface_ip6nd_ra_config'. -type SwInterfaceIP6ndRaConfig struct { - SwIfIndex uint32 - Suppress uint8 - Managed uint8 - Other uint8 - LlOption uint8 - SendUnicast uint8 - Cease uint8 - IsNo uint8 - DefaultRouter uint8 - MaxInterval uint32 - MinInterval uint32 - Lifetime uint32 - InitialCount uint32 - InitialInterval uint32 -} - -func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { - return "sw_interface_ip6nd_ra_config" -} -func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { - return "c3f02daa" -} -func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// SwInterfaceIP6ndRaConfigReply represents VPP binary API message 'sw_interface_ip6nd_ra_config_reply'. -type SwInterfaceIP6ndRaConfigReply struct { - Retval int32 -} - -func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string { - return "sw_interface_ip6nd_ra_config_reply" -} -func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// SwInterfaceIP6ndRaPrefix represents VPP binary API message 'sw_interface_ip6nd_ra_prefix'. -type SwInterfaceIP6ndRaPrefix struct { - SwIfIndex uint32 - Prefix Prefix - UseDefault uint8 - NoAdvertise uint8 - OffLink uint8 - NoAutoconfig uint8 - NoOnlink uint8 - IsNo uint8 - ValLifetime uint32 - PrefLifetime uint32 -} - -func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { - return "sw_interface_ip6nd_ra_prefix" -} -func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { - return "6449c040" -} -func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// SwInterfaceIP6ndRaPrefixReply represents VPP binary API message 'sw_interface_ip6nd_ra_prefix_reply'. -type SwInterfaceIP6ndRaPrefixReply struct { - Retval int32 -} - -func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string { - return "sw_interface_ip6nd_ra_prefix_reply" -} -func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { - return "e8d4e804" -} -func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// WantIP4ArpEvents represents VPP binary API message 'want_ip4_arp_events'. -type WantIP4ArpEvents struct { - EnableDisable uint8 - PID uint32 - IP IP4Address -} - -func (*WantIP4ArpEvents) GetMessageName() string { - return "want_ip4_arp_events" -} -func (*WantIP4ArpEvents) GetCrcString() string { - return "2678f421" -} -func (*WantIP4ArpEvents) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// WantIP4ArpEventsReply represents VPP binary API message 'want_ip4_arp_events_reply'. -type WantIP4ArpEventsReply struct { - Retval int32 -} - -func (*WantIP4ArpEventsReply) GetMessageName() string { - return "want_ip4_arp_events_reply" -} -func (*WantIP4ArpEventsReply) GetCrcString() string { - return "e8d4e804" -} -func (*WantIP4ArpEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// WantIP6NdEvents represents VPP binary API message 'want_ip6_nd_events'. -type WantIP6NdEvents struct { - EnableDisable uint8 - PID uint32 - IP IP6Address -} - -func (*WantIP6NdEvents) GetMessageName() string { - return "want_ip6_nd_events" -} -func (*WantIP6NdEvents) GetCrcString() string { - return "08283da1" -} -func (*WantIP6NdEvents) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// WantIP6NdEventsReply represents VPP binary API message 'want_ip6_nd_events_reply'. -type WantIP6NdEventsReply struct { - Retval int32 -} - -func (*WantIP6NdEventsReply) GetMessageName() string { - return "want_ip6_nd_events_reply" -} -func (*WantIP6NdEventsReply) GetCrcString() string { - return "e8d4e804" -} -func (*WantIP6NdEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -// WantIP6RaEvents represents VPP binary API message 'want_ip6_ra_events'. -type WantIP6RaEvents struct { - EnableDisable uint8 - PID uint32 -} - -func (*WantIP6RaEvents) GetMessageName() string { - return "want_ip6_ra_events" -} -func (*WantIP6RaEvents) GetCrcString() string { - return "05b454b5" -} -func (*WantIP6RaEvents) GetMessageType() api.MessageType { - return api.RequestMessage -} - -// WantIP6RaEventsReply represents VPP binary API message 'want_ip6_ra_events_reply'. -type WantIP6RaEventsReply struct { - Retval int32 -} - -func (*WantIP6RaEventsReply) GetMessageName() string { - return "want_ip6_ra_events_reply" -} -func (*WantIP6RaEventsReply) GetCrcString() string { - return "e8d4e804" -} -func (*WantIP6RaEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - func init() { api.RegisterMessage((*IoamDisable)(nil), "ip.IoamDisable") api.RegisterMessage((*IoamDisableReply)(nil), "ip.IoamDisableReply") api.RegisterMessage((*IoamEnable)(nil), "ip.IoamEnable") api.RegisterMessage((*IoamEnableReply)(nil), "ip.IoamEnableReply") - api.RegisterMessage((*IP4ArpEvent)(nil), "ip.IP4ArpEvent") - api.RegisterMessage((*IP6NdEvent)(nil), "ip.IP6NdEvent") - api.RegisterMessage((*IP6RaEvent)(nil), "ip.IP6RaEvent") - api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip.IP6ndProxyAddDel") - api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip.IP6ndProxyAddDelReply") - api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip.IP6ndProxyDetails") - api.RegisterMessage((*IP6ndProxyDump)(nil), "ip.IP6ndProxyDump") - api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip.IP6ndSendRouterSolicitation") - api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip.IP6ndSendRouterSolicitationReply") api.RegisterMessage((*IPAddressDetails)(nil), "ip.IPAddressDetails") api.RegisterMessage((*IPAddressDump)(nil), "ip.IPAddressDump") api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip.IPContainerProxyAddDel") @@ -2210,12 +1064,6 @@ func init() { api.RegisterMessage((*IPMrouteDump)(nil), "ip.IPMrouteDump") api.RegisterMessage((*IPMtableDetails)(nil), "ip.IPMtableDetails") api.RegisterMessage((*IPMtableDump)(nil), "ip.IPMtableDump") - api.RegisterMessage((*IPNeighborAddDel)(nil), "ip.IPNeighborAddDel") - api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip.IPNeighborAddDelReply") - api.RegisterMessage((*IPNeighborDetails)(nil), "ip.IPNeighborDetails") - api.RegisterMessage((*IPNeighborDump)(nil), "ip.IPNeighborDump") - api.RegisterMessage((*IPProbeNeighbor)(nil), "ip.IPProbeNeighbor") - api.RegisterMessage((*IPProbeNeighborReply)(nil), "ip.IPProbeNeighborReply") api.RegisterMessage((*IPPuntPolice)(nil), "ip.IPPuntPolice") api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip.IPPuntPoliceReply") api.RegisterMessage((*IPPuntRedirect)(nil), "ip.IPPuntRedirect") @@ -2232,8 +1080,6 @@ func init() { api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip.IPRouteAddDelReply") api.RegisterMessage((*IPRouteDetails)(nil), "ip.IPRouteDetails") api.RegisterMessage((*IPRouteDump)(nil), "ip.IPRouteDump") - api.RegisterMessage((*IPScanNeighborEnableDisable)(nil), "ip.IPScanNeighborEnableDisable") - api.RegisterMessage((*IPScanNeighborEnableDisableReply)(nil), "ip.IPScanNeighborEnableDisableReply") api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip.IPSourceAndPortRangeCheckAddDel") api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip.IPSourceAndPortRangeCheckAddDelReply") api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip.IPSourceAndPortRangeCheckInterfaceAddDel") @@ -2244,38 +1090,22 @@ func init() { api.RegisterMessage((*IPTableAddDelReply)(nil), "ip.IPTableAddDelReply") api.RegisterMessage((*IPTableDetails)(nil), "ip.IPTableDetails") api.RegisterMessage((*IPTableDump)(nil), "ip.IPTableDump") + api.RegisterMessage((*IPTableFlush)(nil), "ip.IPTableFlush") + api.RegisterMessage((*IPTableFlushReply)(nil), "ip.IPTableFlushReply") + api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip.IPTableReplaceBegin") + api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip.IPTableReplaceBeginReply") + api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip.IPTableReplaceEnd") + api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip.IPTableReplaceEndReply") api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip.IPUnnumberedDetails") api.RegisterMessage((*IPUnnumberedDump)(nil), "ip.IPUnnumberedDump") api.RegisterMessage((*MfibSignalDetails)(nil), "ip.MfibSignalDetails") api.RegisterMessage((*MfibSignalDump)(nil), "ip.MfibSignalDump") - api.RegisterMessage((*ProxyArpAddDel)(nil), "ip.ProxyArpAddDel") - api.RegisterMessage((*ProxyArpAddDelReply)(nil), "ip.ProxyArpAddDelReply") - api.RegisterMessage((*ProxyArpDetails)(nil), "ip.ProxyArpDetails") - api.RegisterMessage((*ProxyArpDump)(nil), "ip.ProxyArpDump") - api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "ip.ProxyArpIntfcDetails") - api.RegisterMessage((*ProxyArpIntfcDump)(nil), "ip.ProxyArpIntfcDump") - api.RegisterMessage((*ProxyArpIntfcEnableDisable)(nil), "ip.ProxyArpIntfcEnableDisable") - api.RegisterMessage((*ProxyArpIntfcEnableDisableReply)(nil), "ip.ProxyArpIntfcEnableDisableReply") - api.RegisterMessage((*ResetFib)(nil), "ip.ResetFib") - api.RegisterMessage((*ResetFibReply)(nil), "ip.ResetFibReply") - api.RegisterMessage((*SetArpNeighborLimit)(nil), "ip.SetArpNeighborLimit") - api.RegisterMessage((*SetArpNeighborLimitReply)(nil), "ip.SetArpNeighborLimitReply") api.RegisterMessage((*SetIPFlowHash)(nil), "ip.SetIPFlowHash") api.RegisterMessage((*SetIPFlowHashReply)(nil), "ip.SetIPFlowHashReply") api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "ip.SwInterfaceIP6EnableDisable") api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "ip.SwInterfaceIP6EnableDisableReply") api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "ip.SwInterfaceIP6SetLinkLocalAddress") api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "ip.SwInterfaceIP6SetLinkLocalAddressReply") - api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "ip.SwInterfaceIP6ndRaConfig") - api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "ip.SwInterfaceIP6ndRaConfigReply") - api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "ip.SwInterfaceIP6ndRaPrefix") - api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "ip.SwInterfaceIP6ndRaPrefixReply") - api.RegisterMessage((*WantIP4ArpEvents)(nil), "ip.WantIP4ArpEvents") - api.RegisterMessage((*WantIP4ArpEventsReply)(nil), "ip.WantIP4ArpEventsReply") - api.RegisterMessage((*WantIP6NdEvents)(nil), "ip.WantIP6NdEvents") - api.RegisterMessage((*WantIP6NdEventsReply)(nil), "ip.WantIP6NdEventsReply") - api.RegisterMessage((*WantIP6RaEvents)(nil), "ip.WantIP6RaEvents") - api.RegisterMessage((*WantIP6RaEventsReply)(nil), "ip.WantIP6RaEventsReply") } // Messages returns list of all messages in this module. @@ -2285,15 +1115,6 @@ func AllMessages() []api.Message { (*IoamDisableReply)(nil), (*IoamEnable)(nil), (*IoamEnableReply)(nil), - (*IP4ArpEvent)(nil), - (*IP6NdEvent)(nil), - (*IP6RaEvent)(nil), - (*IP6ndProxyAddDel)(nil), - (*IP6ndProxyAddDelReply)(nil), - (*IP6ndProxyDetails)(nil), - (*IP6ndProxyDump)(nil), - (*IP6ndSendRouterSolicitation)(nil), - (*IP6ndSendRouterSolicitationReply)(nil), (*IPAddressDetails)(nil), (*IPAddressDump)(nil), (*IPContainerProxyAddDel)(nil), @@ -2308,12 +1129,6 @@ func AllMessages() []api.Message { (*IPMrouteDump)(nil), (*IPMtableDetails)(nil), (*IPMtableDump)(nil), - (*IPNeighborAddDel)(nil), - (*IPNeighborAddDelReply)(nil), - (*IPNeighborDetails)(nil), - (*IPNeighborDump)(nil), - (*IPProbeNeighbor)(nil), - (*IPProbeNeighborReply)(nil), (*IPPuntPolice)(nil), (*IPPuntPoliceReply)(nil), (*IPPuntRedirect)(nil), @@ -2330,8 +1145,6 @@ func AllMessages() []api.Message { (*IPRouteAddDelReply)(nil), (*IPRouteDetails)(nil), (*IPRouteDump)(nil), - (*IPScanNeighborEnableDisable)(nil), - (*IPScanNeighborEnableDisableReply)(nil), (*IPSourceAndPortRangeCheckAddDel)(nil), (*IPSourceAndPortRangeCheckAddDelReply)(nil), (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), @@ -2342,88 +1155,57 @@ func AllMessages() []api.Message { (*IPTableAddDelReply)(nil), (*IPTableDetails)(nil), (*IPTableDump)(nil), + (*IPTableFlush)(nil), + (*IPTableFlushReply)(nil), + (*IPTableReplaceBegin)(nil), + (*IPTableReplaceBeginReply)(nil), + (*IPTableReplaceEnd)(nil), + (*IPTableReplaceEndReply)(nil), (*IPUnnumberedDetails)(nil), (*IPUnnumberedDump)(nil), (*MfibSignalDetails)(nil), (*MfibSignalDump)(nil), - (*ProxyArpAddDel)(nil), - (*ProxyArpAddDelReply)(nil), - (*ProxyArpDetails)(nil), - (*ProxyArpDump)(nil), - (*ProxyArpIntfcDetails)(nil), - (*ProxyArpIntfcDump)(nil), - (*ProxyArpIntfcEnableDisable)(nil), - (*ProxyArpIntfcEnableDisableReply)(nil), - (*ResetFib)(nil), - (*ResetFibReply)(nil), - (*SetArpNeighborLimit)(nil), - (*SetArpNeighborLimitReply)(nil), (*SetIPFlowHash)(nil), (*SetIPFlowHashReply)(nil), (*SwInterfaceIP6EnableDisable)(nil), (*SwInterfaceIP6EnableDisableReply)(nil), (*SwInterfaceIP6SetLinkLocalAddress)(nil), (*SwInterfaceIP6SetLinkLocalAddressReply)(nil), - (*SwInterfaceIP6ndRaConfig)(nil), - (*SwInterfaceIP6ndRaConfigReply)(nil), - (*SwInterfaceIP6ndRaPrefix)(nil), - (*SwInterfaceIP6ndRaPrefixReply)(nil), - (*WantIP4ArpEvents)(nil), - (*WantIP4ArpEventsReply)(nil), - (*WantIP6NdEvents)(nil), - (*WantIP6NdEventsReply)(nil), - (*WantIP6RaEvents)(nil), - (*WantIP6RaEventsReply)(nil), } } // RPCService represents RPC service API for ip module. type RPCService interface { - DumpIP6ndProxy(ctx context.Context, in *IP6ndProxyDump) (RPCService_DumpIP6ndProxyClient, error) DumpIPAddress(ctx context.Context, in *IPAddressDump) (RPCService_DumpIPAddressClient, error) DumpIPContainerProxy(ctx context.Context, in *IPContainerProxyDump) (RPCService_DumpIPContainerProxyClient, error) DumpIP(ctx context.Context, in *IPDump) (RPCService_DumpIPClient, error) DumpIPMroute(ctx context.Context, in *IPMrouteDump) (RPCService_DumpIPMrouteClient, error) DumpIPMtable(ctx context.Context, in *IPMtableDump) (RPCService_DumpIPMtableClient, error) - DumpIPNeighbor(ctx context.Context, in *IPNeighborDump) (RPCService_DumpIPNeighborClient, error) DumpIPPuntRedirect(ctx context.Context, in *IPPuntRedirectDump) (RPCService_DumpIPPuntRedirectClient, error) DumpIPRoute(ctx context.Context, in *IPRouteDump) (RPCService_DumpIPRouteClient, error) DumpIPTable(ctx context.Context, in *IPTableDump) (RPCService_DumpIPTableClient, error) DumpIPUnnumbered(ctx context.Context, in *IPUnnumberedDump) (RPCService_DumpIPUnnumberedClient, error) DumpMfibSignal(ctx context.Context, in *MfibSignalDump) (RPCService_DumpMfibSignalClient, error) - DumpProxyArp(ctx context.Context, in *ProxyArpDump) (RPCService_DumpProxyArpClient, error) - DumpProxyArpIntfc(ctx context.Context, in *ProxyArpIntfcDump) (RPCService_DumpProxyArpIntfcClient, error) IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error) IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error) - IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error) - IP6ndSendRouterSolicitation(ctx context.Context, in *IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error) IPContainerProxyAddDel(ctx context.Context, in *IPContainerProxyAddDel) (*IPContainerProxyAddDelReply, error) IPMrouteAddDel(ctx context.Context, in *IPMrouteAddDel) (*IPMrouteAddDelReply, error) - IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error) - IPProbeNeighbor(ctx context.Context, in *IPProbeNeighbor) (*IPProbeNeighborReply, error) IPPuntPolice(ctx context.Context, in *IPPuntPolice) (*IPPuntPoliceReply, error) IPPuntRedirect(ctx context.Context, in *IPPuntRedirect) (*IPPuntRedirectReply, error) IPReassemblyEnableDisable(ctx context.Context, in *IPReassemblyEnableDisable) (*IPReassemblyEnableDisableReply, error) IPReassemblyGet(ctx context.Context, in *IPReassemblyGet) (*IPReassemblyGetReply, error) IPReassemblySet(ctx context.Context, in *IPReassemblySet) (*IPReassemblySetReply, error) IPRouteAddDel(ctx context.Context, in *IPRouteAddDel) (*IPRouteAddDelReply, error) - IPScanNeighborEnableDisable(ctx context.Context, in *IPScanNeighborEnableDisable) (*IPScanNeighborEnableDisableReply, error) IPSourceAndPortRangeCheckAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error) IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error) IPSourceCheckInterfaceAddDel(ctx context.Context, in *IPSourceCheckInterfaceAddDel) (*IPSourceCheckInterfaceAddDelReply, error) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*IPTableAddDelReply, error) - ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error) - ProxyArpIntfcEnableDisable(ctx context.Context, in *ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error) - ResetFib(ctx context.Context, in *ResetFib) (*ResetFibReply, error) - SetArpNeighborLimit(ctx context.Context, in *SetArpNeighborLimit) (*SetArpNeighborLimitReply, error) + IPTableFlush(ctx context.Context, in *IPTableFlush) (*IPTableFlushReply, error) + IPTableReplaceBegin(ctx context.Context, in *IPTableReplaceBegin) (*IPTableReplaceBeginReply, error) + IPTableReplaceEnd(ctx context.Context, in *IPTableReplaceEnd) (*IPTableReplaceEndReply, error) SetIPFlowHash(ctx context.Context, in *SetIPFlowHash) (*SetIPFlowHashReply, error) SwInterfaceIP6EnableDisable(ctx context.Context, in *SwInterfaceIP6EnableDisable) (*SwInterfaceIP6EnableDisableReply, error) SwInterfaceIP6SetLinkLocalAddress(ctx context.Context, in *SwInterfaceIP6SetLinkLocalAddress) (*SwInterfaceIP6SetLinkLocalAddressReply, error) - SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) - SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) - WantIP4ArpEvents(ctx context.Context, in *WantIP4ArpEvents) (*WantIP4ArpEventsReply, error) - WantIP6NdEvents(ctx context.Context, in *WantIP6NdEvents) (*WantIP6NdEventsReply, error) - WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents) (*WantIP6RaEventsReply, error) } type serviceClient struct { @@ -2434,32 +1216,6 @@ func NewServiceClient(ch api.Channel) RPCService { return &serviceClient{ch} } -func (c *serviceClient) DumpIP6ndProxy(ctx context.Context, in *IP6ndProxyDump) (RPCService_DumpIP6ndProxyClient, error) { - stream := c.ch.SendMultiRequest(in) - x := &serviceClient_DumpIP6ndProxyClient{stream} - return x, nil -} - -type RPCService_DumpIP6ndProxyClient interface { - Recv() (*IP6ndProxyDetails, error) -} - -type serviceClient_DumpIP6ndProxyClient struct { - api.MultiRequestCtx -} - -func (c *serviceClient_DumpIP6ndProxyClient) Recv() (*IP6ndProxyDetails, error) { - m := new(IP6ndProxyDetails) - stop, err := c.MultiRequestCtx.ReceiveReply(m) - if err != nil { - return nil, err - } - if stop { - return nil, io.EOF - } - return m, nil -} - func (c *serviceClient) DumpIPAddress(ctx context.Context, in *IPAddressDump) (RPCService_DumpIPAddressClient, error) { stream := c.ch.SendMultiRequest(in) x := &serviceClient_DumpIPAddressClient{stream} @@ -2590,32 +1346,6 @@ func (c *serviceClient_DumpIPMtableClient) Recv() (*IPMtableDetails, error) { return m, nil } -func (c *serviceClient) DumpIPNeighbor(ctx context.Context, in *IPNeighborDump) (RPCService_DumpIPNeighborClient, error) { - stream := c.ch.SendMultiRequest(in) - x := &serviceClient_DumpIPNeighborClient{stream} - return x, nil -} - -type RPCService_DumpIPNeighborClient interface { - Recv() (*IPNeighborDetails, error) -} - -type serviceClient_DumpIPNeighborClient struct { - api.MultiRequestCtx -} - -func (c *serviceClient_DumpIPNeighborClient) Recv() (*IPNeighborDetails, error) { - m := new(IPNeighborDetails) - stop, err := c.MultiRequestCtx.ReceiveReply(m) - if err != nil { - return nil, err - } - if stop { - return nil, io.EOF - } - return m, nil -} - func (c *serviceClient) DumpIPPuntRedirect(ctx context.Context, in *IPPuntRedirectDump) (RPCService_DumpIPPuntRedirectClient, error) { stream := c.ch.SendMultiRequest(in) x := &serviceClient_DumpIPPuntRedirectClient{stream} @@ -2746,58 +1476,6 @@ func (c *serviceClient_DumpMfibSignalClient) Recv() (*MfibSignalDetails, error) return m, nil } -func (c *serviceClient) DumpProxyArp(ctx context.Context, in *ProxyArpDump) (RPCService_DumpProxyArpClient, error) { - stream := c.ch.SendMultiRequest(in) - x := &serviceClient_DumpProxyArpClient{stream} - return x, nil -} - -type RPCService_DumpProxyArpClient interface { - Recv() (*ProxyArpDetails, error) -} - -type serviceClient_DumpProxyArpClient struct { - api.MultiRequestCtx -} - -func (c *serviceClient_DumpProxyArpClient) Recv() (*ProxyArpDetails, error) { - m := new(ProxyArpDetails) - stop, err := c.MultiRequestCtx.ReceiveReply(m) - if err != nil { - return nil, err - } - if stop { - return nil, io.EOF - } - return m, nil -} - -func (c *serviceClient) DumpProxyArpIntfc(ctx context.Context, in *ProxyArpIntfcDump) (RPCService_DumpProxyArpIntfcClient, error) { - stream := c.ch.SendMultiRequest(in) - x := &serviceClient_DumpProxyArpIntfcClient{stream} - return x, nil -} - -type RPCService_DumpProxyArpIntfcClient interface { - Recv() (*ProxyArpIntfcDetails, error) -} - -type serviceClient_DumpProxyArpIntfcClient struct { - api.MultiRequestCtx -} - -func (c *serviceClient_DumpProxyArpIntfcClient) Recv() (*ProxyArpIntfcDetails, error) { - m := new(ProxyArpIntfcDetails) - stop, err := c.MultiRequestCtx.ReceiveReply(m) - if err != nil { - return nil, err - } - if stop { - return nil, io.EOF - } - return m, nil -} - func (c *serviceClient) IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error) { out := new(IoamDisableReply) err := c.ch.SendRequest(in).ReceiveReply(out) @@ -2816,24 +1494,6 @@ func (c *serviceClient) IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEn return out, nil } -func (c *serviceClient) IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error) { - out := new(IP6ndProxyAddDelReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) IP6ndSendRouterSolicitation(ctx context.Context, in *IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error) { - out := new(IP6ndSendRouterSolicitationReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - func (c *serviceClient) IPContainerProxyAddDel(ctx context.Context, in *IPContainerProxyAddDel) (*IPContainerProxyAddDelReply, error) { out := new(IPContainerProxyAddDelReply) err := c.ch.SendRequest(in).ReceiveReply(out) @@ -2852,24 +1512,6 @@ func (c *serviceClient) IPMrouteAddDel(ctx context.Context, in *IPMrouteAddDel) return out, nil } -func (c *serviceClient) IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error) { - out := new(IPNeighborAddDelReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) IPProbeNeighbor(ctx context.Context, in *IPProbeNeighbor) (*IPProbeNeighborReply, error) { - out := new(IPProbeNeighborReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - func (c *serviceClient) IPPuntPolice(ctx context.Context, in *IPPuntPolice) (*IPPuntPoliceReply, error) { out := new(IPPuntPoliceReply) err := c.ch.SendRequest(in).ReceiveReply(out) @@ -2924,15 +1566,6 @@ func (c *serviceClient) IPRouteAddDel(ctx context.Context, in *IPRouteAddDel) (* return out, nil } -func (c *serviceClient) IPScanNeighborEnableDisable(ctx context.Context, in *IPScanNeighborEnableDisable) (*IPScanNeighborEnableDisableReply, error) { - out := new(IPScanNeighborEnableDisableReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - func (c *serviceClient) IPSourceAndPortRangeCheckAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error) { out := new(IPSourceAndPortRangeCheckAddDelReply) err := c.ch.SendRequest(in).ReceiveReply(out) @@ -2969,17 +1602,8 @@ func (c *serviceClient) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (* return out, nil } -func (c *serviceClient) ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error) { - out := new(ProxyArpAddDelReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error) { - out := new(ProxyArpIntfcEnableDisableReply) +func (c *serviceClient) IPTableFlush(ctx context.Context, in *IPTableFlush) (*IPTableFlushReply, error) { + out := new(IPTableFlushReply) err := c.ch.SendRequest(in).ReceiveReply(out) if err != nil { return nil, err @@ -2987,8 +1611,8 @@ func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *Prox return out, nil } -func (c *serviceClient) ResetFib(ctx context.Context, in *ResetFib) (*ResetFibReply, error) { - out := new(ResetFibReply) +func (c *serviceClient) IPTableReplaceBegin(ctx context.Context, in *IPTableReplaceBegin) (*IPTableReplaceBeginReply, error) { + out := new(IPTableReplaceBeginReply) err := c.ch.SendRequest(in).ReceiveReply(out) if err != nil { return nil, err @@ -2996,8 +1620,8 @@ func (c *serviceClient) ResetFib(ctx context.Context, in *ResetFib) (*ResetFibRe return out, nil } -func (c *serviceClient) SetArpNeighborLimit(ctx context.Context, in *SetArpNeighborLimit) (*SetArpNeighborLimitReply, error) { - out := new(SetArpNeighborLimitReply) +func (c *serviceClient) IPTableReplaceEnd(ctx context.Context, in *IPTableReplaceEnd) (*IPTableReplaceEndReply, error) { + out := new(IPTableReplaceEndReply) err := c.ch.SendRequest(in).ReceiveReply(out) if err != nil { return nil, err @@ -3032,51 +1656,6 @@ func (c *serviceClient) SwInterfaceIP6SetLinkLocalAddress(ctx context.Context, i return out, nil } -func (c *serviceClient) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) { - out := new(SwInterfaceIP6ndRaConfigReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) { - out := new(SwInterfaceIP6ndRaPrefixReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) WantIP4ArpEvents(ctx context.Context, in *WantIP4ArpEvents) (*WantIP4ArpEventsReply, error) { - out := new(WantIP4ArpEventsReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) WantIP6NdEvents(ctx context.Context, in *WantIP6NdEvents) (*WantIP6NdEventsReply, error) { - out := new(WantIP6NdEventsReply) - err := c.ch.SendRequest(in).ReceiveReply(out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents) (*WantIP6RaEventsReply, error) { - out := new(WantIP6RaEventsReply) - 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 diff --git a/examples/binapi/ip_types/ip_types.ba.go b/examples/binapi/ip_types/ip_types.ba.go new file mode 100644 index 0000000..1812746 --- /dev/null +++ b/examples/binapi/ip_types/ip_types.ba.go @@ -0,0 +1,348 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// source: /usr/share/vpp/api/core/ip_types.api.json + +/* +Package ip_types is a generated VPP binary API for 'ip_types' module. + +It consists of: + 4 enums + 5 aliases + 6 types + 1 union +*/ +package ip_types + +import ( + bytes "bytes" + context "context" + api "git.fd.io/govpp.git/api" + struc "github.com/lunixbochs/struc" + io "io" + strconv "strconv" +) + +const ( + // ModuleName is the name of this module. + ModuleName = "ip_types" + // APIVersion is the API version of this module. + APIVersion = "3.0.0" + // VersionCrc is the CRC of this module. + VersionCrc = 0x80424562 +) + +// 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", +} + +var 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 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", +} + +var 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 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", +} + +var 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 strconv.Itoa(int(x)) +} + +// IPProto represents VPP binary API enum 'ip_proto'. +type IPProto uint32 + +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 +) + +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", +} + +var 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, +} + +func (x IPProto) String() string { + s, ok := IPProto_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// AddressWithPrefix represents VPP binary API alias 'address_with_prefix'. +type AddressWithPrefix Prefix + +// 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 + +// Address represents VPP binary API type 'address'. +type Address struct { + Af AddressFamily + Un AddressUnion +} + +func (*Address) GetTypeName() string { return "address" } + +// IP4Prefix represents VPP binary API type 'ip4_prefix'. +type IP4Prefix struct { + Address IP4Address + Len uint8 +} + +func (*IP4Prefix) GetTypeName() string { return "ip4_prefix" } + +// IP6Prefix represents VPP binary API type 'ip6_prefix'. +type IP6Prefix struct { + Address IP6Address + Len uint8 +} + +func (*IP6Prefix) GetTypeName() string { return "ip6_prefix" } + +// Mprefix represents VPP binary API type 'mprefix'. +type Mprefix struct { + Af AddressFamily + GrpAddressLength uint16 + GrpAddress AddressUnion + SrcAddress AddressUnion +} + +func (*Mprefix) GetTypeName() string { return "mprefix" } + +// Prefix represents VPP binary API type 'prefix'. +type Prefix struct { + Address Address + Len uint8 +} + +func (*Prefix) GetTypeName() string { return "prefix" } + +// PrefixMatcher represents VPP binary API type 'prefix_matcher'. +type PrefixMatcher struct { + Le uint8 + Ge uint8 +} + +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 +} + +// 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 _ = bytes.NewBuffer +var _ = context.Background +var _ = io.Copy +var _ = strconv.Itoa +var _ = struc.Pack diff --git a/examples/binapi/memclnt/memclnt.ba.go b/examples/binapi/memclnt/memclnt.ba.go index 04e8ae4..5c8d1eb 100644 --- a/examples/binapi/memclnt/memclnt.ba.go +++ b/examples/binapi/memclnt/memclnt.ba.go @@ -26,43 +26,34 @@ const ( // APIVersion is the API version of this module. APIVersion = "2.1.0" // VersionCrc is the CRC of this module. - VersionCrc = 0x949f3cb1 + VersionCrc = 0x8d3dd881 ) // MessageTableEntry represents VPP binary API type 'message_table_entry'. type MessageTableEntry struct { Index uint16 - Name []byte `struc:"[64]byte"` + Name string `struc:"[64]byte"` } -func (*MessageTableEntry) GetTypeName() string { - return "message_table_entry" -} +func (*MessageTableEntry) GetTypeName() string { return "message_table_entry" } // ModuleVersion represents VPP binary API type 'module_version'. type ModuleVersion struct { Major uint32 Minor uint32 Patch uint32 - Name []byte `struc:"[64]byte"` + Name string `struc:"[64]byte"` } -func (*ModuleVersion) GetTypeName() string { - return "module_version" -} +func (*ModuleVersion) GetTypeName() string { return "module_version" } // APIVersions represents VPP binary API message 'api_versions'. type APIVersions struct{} -func (*APIVersions) GetMessageName() string { - return "api_versions" -} -func (*APIVersions) GetCrcString() string { - return "51077d14" -} -func (*APIVersions) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *APIVersions) Reset() { *m = APIVersions{} } +func (*APIVersions) GetMessageName() string { return "api_versions" } +func (*APIVersions) GetCrcString() string { return "51077d14" } +func (*APIVersions) GetMessageType() api.MessageType { return api.RequestMessage } // APIVersionsReply represents VPP binary API message 'api_versions_reply'. type APIVersionsReply struct { @@ -71,30 +62,20 @@ type APIVersionsReply struct { APIVersions []ModuleVersion } -func (*APIVersionsReply) GetMessageName() string { - return "api_versions_reply" -} -func (*APIVersionsReply) GetCrcString() string { - return "76f45113" -} -func (*APIVersionsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *APIVersionsReply) Reset() { *m = APIVersionsReply{} } +func (*APIVersionsReply) GetMessageName() string { return "api_versions_reply" } +func (*APIVersionsReply) GetCrcString() string { return "5f0d99d6" } +func (*APIVersionsReply) GetMessageType() api.MessageType { return api.ReplyMessage } // GetFirstMsgID represents VPP binary API message 'get_first_msg_id'. type GetFirstMsgID struct { - Name []byte `struc:"[64]byte"` + Name string `struc:"[64]byte"` } -func (*GetFirstMsgID) GetMessageName() string { - return "get_first_msg_id" -} -func (*GetFirstMsgID) GetCrcString() string { - return "0cb71b0e" -} -func (*GetFirstMsgID) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *GetFirstMsgID) Reset() { *m = GetFirstMsgID{} } +func (*GetFirstMsgID) GetMessageName() string { return "get_first_msg_id" } +func (*GetFirstMsgID) GetCrcString() string { return "ebf79a66" } +func (*GetFirstMsgID) GetMessageType() api.MessageType { return api.RequestMessage } // GetFirstMsgIDReply represents VPP binary API message 'get_first_msg_id_reply'. type GetFirstMsgIDReply struct { @@ -102,33 +83,23 @@ type GetFirstMsgIDReply struct { FirstMsgID uint16 } -func (*GetFirstMsgIDReply) GetMessageName() string { - return "get_first_msg_id_reply" -} -func (*GetFirstMsgIDReply) GetCrcString() string { - return "7d337472" -} -func (*GetFirstMsgIDReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *GetFirstMsgIDReply) Reset() { *m = GetFirstMsgIDReply{} } +func (*GetFirstMsgIDReply) GetMessageName() string { return "get_first_msg_id_reply" } +func (*GetFirstMsgIDReply) GetCrcString() string { return "7d337472" } +func (*GetFirstMsgIDReply) GetMessageType() api.MessageType { return api.ReplyMessage } // MemclntCreate represents VPP binary API message 'memclnt_create'. type MemclntCreate struct { CtxQuota int32 InputQueue uint64 - Name []byte `struc:"[64]byte"` + Name string `struc:"[64]byte"` APIVersions []uint32 `struc:"[8]uint32"` } -func (*MemclntCreate) GetMessageName() string { - return "memclnt_create" -} -func (*MemclntCreate) GetCrcString() string { - return "6d33c5ea" -} -func (*MemclntCreate) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MemclntCreate) Reset() { *m = MemclntCreate{} } +func (*MemclntCreate) GetMessageName() string { return "memclnt_create" } +func (*MemclntCreate) GetCrcString() string { return "9c5e1c2f" } +func (*MemclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage } // MemclntCreateReply represents VPP binary API message 'memclnt_create_reply'. type MemclntCreateReply struct { @@ -138,32 +109,22 @@ type MemclntCreateReply struct { MessageTable uint64 } -func (*MemclntCreateReply) GetMessageName() string { - return "memclnt_create_reply" -} -func (*MemclntCreateReply) GetCrcString() string { - return "42ec4560" -} -func (*MemclntCreateReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MemclntCreateReply) Reset() { *m = MemclntCreateReply{} } +func (*MemclntCreateReply) GetMessageName() string { return "memclnt_create_reply" } +func (*MemclntCreateReply) GetCrcString() string { return "42ec4560" } +func (*MemclntCreateReply) GetMessageType() api.MessageType { return api.ReplyMessage } // MemclntDelete represents VPP binary API message 'memclnt_delete'. type MemclntDelete struct { Index uint32 Handle uint64 - DoCleanup uint8 + DoCleanup bool } -func (*MemclntDelete) GetMessageName() string { - return "memclnt_delete" -} -func (*MemclntDelete) GetCrcString() string { - return "4dd351e9" -} -func (*MemclntDelete) GetMessageType() api.MessageType { - return api.OtherMessage -} +func (m *MemclntDelete) Reset() { *m = MemclntDelete{} } +func (*MemclntDelete) GetMessageName() string { return "memclnt_delete" } +func (*MemclntDelete) GetCrcString() string { return "7e1c04e3" } +func (*MemclntDelete) GetMessageType() api.MessageType { return api.OtherMessage } // MemclntDeleteReply represents VPP binary API message 'memclnt_delete_reply'. type MemclntDeleteReply struct { @@ -171,73 +132,48 @@ type MemclntDeleteReply struct { Handle uint64 } -func (*MemclntDeleteReply) GetMessageName() string { - return "memclnt_delete_reply" -} -func (*MemclntDeleteReply) GetCrcString() string { - return "3d3b6312" -} -func (*MemclntDeleteReply) GetMessageType() api.MessageType { - return api.OtherMessage -} +func (m *MemclntDeleteReply) Reset() { *m = MemclntDeleteReply{} } +func (*MemclntDeleteReply) GetMessageName() string { return "memclnt_delete_reply" } +func (*MemclntDeleteReply) GetCrcString() string { return "3d3b6312" } +func (*MemclntDeleteReply) GetMessageType() api.MessageType { return api.OtherMessage } // MemclntKeepalive represents VPP binary API message 'memclnt_keepalive'. type MemclntKeepalive struct{} -func (*MemclntKeepalive) GetMessageName() string { - return "memclnt_keepalive" -} -func (*MemclntKeepalive) GetCrcString() string { - return "51077d14" -} -func (*MemclntKeepalive) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *MemclntKeepalive) Reset() { *m = MemclntKeepalive{} } +func (*MemclntKeepalive) GetMessageName() string { return "memclnt_keepalive" } +func (*MemclntKeepalive) GetCrcString() string { return "51077d14" } +func (*MemclntKeepalive) GetMessageType() api.MessageType { return api.RequestMessage } // MemclntKeepaliveReply represents VPP binary API message 'memclnt_keepalive_reply'. type MemclntKeepaliveReply struct { Retval int32 } -func (*MemclntKeepaliveReply) GetMessageName() string { - return "memclnt_keepalive_reply" -} -func (*MemclntKeepaliveReply) GetCrcString() string { - return "e8d4e804" -} -func (*MemclntKeepaliveReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MemclntKeepaliveReply) Reset() { *m = MemclntKeepaliveReply{} } +func (*MemclntKeepaliveReply) GetMessageName() string { return "memclnt_keepalive_reply" } +func (*MemclntKeepaliveReply) GetCrcString() string { return "e8d4e804" } +func (*MemclntKeepaliveReply) GetMessageType() api.MessageType { return api.ReplyMessage } // MemclntReadTimeout represents VPP binary API message 'memclnt_read_timeout'. type MemclntReadTimeout struct { Dummy uint8 } -func (*MemclntReadTimeout) GetMessageName() string { - return "memclnt_read_timeout" -} -func (*MemclntReadTimeout) GetCrcString() string { - return "c3a3a452" -} -func (*MemclntReadTimeout) GetMessageType() api.MessageType { - return api.OtherMessage -} +func (m *MemclntReadTimeout) Reset() { *m = MemclntReadTimeout{} } +func (*MemclntReadTimeout) GetMessageName() string { return "memclnt_read_timeout" } +func (*MemclntReadTimeout) GetCrcString() string { return "c3a3a452" } +func (*MemclntReadTimeout) GetMessageType() api.MessageType { return api.OtherMessage } // MemclntRxThreadSuspend represents VPP binary API message 'memclnt_rx_thread_suspend'. type MemclntRxThreadSuspend struct { Dummy uint8 } -func (*MemclntRxThreadSuspend) GetMessageName() string { - return "memclnt_rx_thread_suspend" -} -func (*MemclntRxThreadSuspend) GetCrcString() string { - return "c3a3a452" -} -func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType { - return api.OtherMessage -} +func (m *MemclntRxThreadSuspend) Reset() { *m = MemclntRxThreadSuspend{} } +func (*MemclntRxThreadSuspend) GetMessageName() string { return "memclnt_rx_thread_suspend" } +func (*MemclntRxThreadSuspend) GetCrcString() string { return "c3a3a452" } +func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType { return api.OtherMessage } // RPCCall represents VPP binary API message 'rpc_call'. type RPCCall struct { @@ -249,45 +185,30 @@ type RPCCall struct { Data []byte } -func (*RPCCall) GetMessageName() string { - return "rpc_call" -} -func (*RPCCall) GetCrcString() string { - return "7e8a2c95" -} -func (*RPCCall) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *RPCCall) Reset() { *m = RPCCall{} } +func (*RPCCall) GetMessageName() string { return "rpc_call" } +func (*RPCCall) GetCrcString() string { return "7e8a2c95" } +func (*RPCCall) GetMessageType() api.MessageType { return api.RequestMessage } // RPCCallReply represents VPP binary API message 'rpc_call_reply'. type RPCCallReply struct { Retval int32 } -func (*RPCCallReply) GetMessageName() string { - return "rpc_call_reply" -} -func (*RPCCallReply) GetCrcString() string { - return "e8d4e804" -} -func (*RPCCallReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *RPCCallReply) Reset() { *m = RPCCallReply{} } +func (*RPCCallReply) GetMessageName() string { return "rpc_call_reply" } +func (*RPCCallReply) GetCrcString() string { return "e8d4e804" } +func (*RPCCallReply) GetMessageType() api.MessageType { return api.ReplyMessage } // RxThreadExit represents VPP binary API message 'rx_thread_exit'. type RxThreadExit struct { Dummy uint8 } -func (*RxThreadExit) GetMessageName() string { - return "rx_thread_exit" -} -func (*RxThreadExit) GetCrcString() string { - return "c3a3a452" -} -func (*RxThreadExit) GetMessageType() api.MessageType { - return api.OtherMessage -} +func (m *RxThreadExit) Reset() { *m = RxThreadExit{} } +func (*RxThreadExit) GetMessageName() string { return "rx_thread_exit" } +func (*RxThreadExit) GetCrcString() string { return "c3a3a452" } +func (*RxThreadExit) GetMessageType() api.MessageType { return api.OtherMessage } // SockInitShm represents VPP binary API message 'sock_init_shm'. type SockInitShm struct { @@ -296,45 +217,30 @@ type SockInitShm struct { Configs []uint64 } -func (*SockInitShm) GetMessageName() string { - return "sock_init_shm" -} -func (*SockInitShm) GetCrcString() string { - return "51646d92" -} -func (*SockInitShm) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SockInitShm) Reset() { *m = SockInitShm{} } +func (*SockInitShm) GetMessageName() string { return "sock_init_shm" } +func (*SockInitShm) GetCrcString() string { return "51646d92" } +func (*SockInitShm) GetMessageType() api.MessageType { return api.RequestMessage } // SockInitShmReply represents VPP binary API message 'sock_init_shm_reply'. type SockInitShmReply struct { Retval int32 } -func (*SockInitShmReply) GetMessageName() string { - return "sock_init_shm_reply" -} -func (*SockInitShmReply) GetCrcString() string { - return "e8d4e804" -} -func (*SockInitShmReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SockInitShmReply) Reset() { *m = SockInitShmReply{} } +func (*SockInitShmReply) GetMessageName() string { return "sock_init_shm_reply" } +func (*SockInitShmReply) GetCrcString() string { return "e8d4e804" } +func (*SockInitShmReply) GetMessageType() api.MessageType { return api.ReplyMessage } // SockclntCreate represents VPP binary API message 'sockclnt_create'. type SockclntCreate struct { - Name []byte `struc:"[64]byte"` + Name string `struc:"[64]byte"` } -func (*SockclntCreate) GetMessageName() string { - return "sockclnt_create" -} -func (*SockclntCreate) GetCrcString() string { - return "df2cf94d" -} -func (*SockclntCreate) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SockclntCreate) Reset() { *m = SockclntCreate{} } +func (*SockclntCreate) GetMessageName() string { return "sockclnt_create" } +func (*SockclntCreate) GetCrcString() string { return "455fb9c4" } +func (*SockclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage } // SockclntCreateReply represents VPP binary API message 'sockclnt_create_reply'. type SockclntCreateReply struct { @@ -344,62 +250,42 @@ type SockclntCreateReply struct { MessageTable []MessageTableEntry } -func (*SockclntCreateReply) GetMessageName() string { - return "sockclnt_create_reply" -} -func (*SockclntCreateReply) GetCrcString() string { - return "21795657" -} -func (*SockclntCreateReply) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SockclntCreateReply) Reset() { *m = SockclntCreateReply{} } +func (*SockclntCreateReply) GetMessageName() string { return "sockclnt_create_reply" } +func (*SockclntCreateReply) GetCrcString() string { return "35166268" } +func (*SockclntCreateReply) GetMessageType() api.MessageType { return api.RequestMessage } // SockclntDelete represents VPP binary API message 'sockclnt_delete'. type SockclntDelete struct { Index uint32 } -func (*SockclntDelete) GetMessageName() string { - return "sockclnt_delete" -} -func (*SockclntDelete) GetCrcString() string { - return "8ac76db6" -} -func (*SockclntDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *SockclntDelete) Reset() { *m = SockclntDelete{} } +func (*SockclntDelete) GetMessageName() string { return "sockclnt_delete" } +func (*SockclntDelete) GetCrcString() string { return "8ac76db6" } +func (*SockclntDelete) GetMessageType() api.MessageType { return api.RequestMessage } // SockclntDeleteReply represents VPP binary API message 'sockclnt_delete_reply'. type SockclntDeleteReply struct { Response int32 } -func (*SockclntDeleteReply) GetMessageName() string { - return "sockclnt_delete_reply" -} -func (*SockclntDeleteReply) GetCrcString() string { - return "8f38b1ee" -} -func (*SockclntDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *SockclntDeleteReply) Reset() { *m = SockclntDeleteReply{} } +func (*SockclntDeleteReply) GetMessageName() string { return "sockclnt_delete_reply" } +func (*SockclntDeleteReply) GetCrcString() string { return "8f38b1ee" } +func (*SockclntDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage } // TracePluginMsgIds represents VPP binary API message 'trace_plugin_msg_ids'. type TracePluginMsgIds struct { - PluginName []byte `struc:"[128]byte"` + PluginName string `struc:"[128]byte"` FirstMsgID uint16 LastMsgID uint16 } -func (*TracePluginMsgIds) GetMessageName() string { - return "trace_plugin_msg_ids" -} -func (*TracePluginMsgIds) GetCrcString() string { - return "64af79f9" -} -func (*TracePluginMsgIds) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *TracePluginMsgIds) Reset() { *m = TracePluginMsgIds{} } +func (*TracePluginMsgIds) GetMessageName() string { return "trace_plugin_msg_ids" } +func (*TracePluginMsgIds) GetCrcString() string { return "f476d3ce" } +func (*TracePluginMsgIds) GetMessageType() api.MessageType { return api.RequestMessage } func init() { api.RegisterMessage((*APIVersions)(nil), "memclnt.APIVersions") diff --git a/examples/binapi/memif/memif.ba.go b/examples/binapi/memif/memif.ba.go index f9babf7..4bc35aa 100644 --- a/examples/binapi/memif/memif.ba.go +++ b/examples/binapi/memif/memif.ba.go @@ -5,6 +5,8 @@ Package memif is a generated VPP binary API for 'memif' module. It consists of: + 8 enums + 2 aliases 10 messages 5 services */ @@ -17,185 +19,212 @@ import ( struc "github.com/lunixbochs/struc" io "io" strconv "strconv" + + ethernet_types "git.fd.io/govpp.git/examples/ethernet_types" + interface_types "git.fd.io/govpp.git/examples/interface_types" ) const ( // ModuleName is the name of this module. ModuleName = "memif" // APIVersion is the API version of this module. - APIVersion = "2.0.0" + APIVersion = "3.0.0" // VersionCrc is the CRC of this module. - VersionCrc = 0x939f78a7 + VersionCrc = 0x88dc56c9 +) + +type IfStatusFlags = interface_types.IfStatusFlags + +type IfType = interface_types.IfType + +type LinkDuplex = interface_types.LinkDuplex + +// MemifMode represents VPP binary API enum 'memif_mode'. +type MemifMode uint32 + +const ( + MEMIF_MODE_API_ETHERNET MemifMode = 0 + MEMIF_MODE_API_IP MemifMode = 1 + MEMIF_MODE_API_PUNT_INJECT MemifMode = 2 +) + +var MemifMode_name = map[uint32]string{ + 0: "MEMIF_MODE_API_ETHERNET", + 1: "MEMIF_MODE_API_IP", + 2: "MEMIF_MODE_API_PUNT_INJECT", +} + +var MemifMode_value = map[string]uint32{ + "MEMIF_MODE_API_ETHERNET": 0, + "MEMIF_MODE_API_IP": 1, + "MEMIF_MODE_API_PUNT_INJECT": 2, +} + +func (x MemifMode) String() string { + s, ok := MemifMode_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// MemifRole represents VPP binary API enum 'memif_role'. +type MemifRole uint32 + +const ( + MEMIF_ROLE_API_MASTER MemifRole = 0 + MEMIF_ROLE_API_SLAVE MemifRole = 1 ) +var MemifRole_name = map[uint32]string{ + 0: "MEMIF_ROLE_API_MASTER", + 1: "MEMIF_ROLE_API_SLAVE", +} + +var MemifRole_value = map[string]uint32{ + "MEMIF_ROLE_API_MASTER": 0, + "MEMIF_ROLE_API_SLAVE": 1, +} + +func (x MemifRole) String() string { + s, ok := MemifRole_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +type MtuProto = interface_types.MtuProto + +type RxMode = interface_types.RxMode + +type SubIfFlags = interface_types.SubIfFlags + +type InterfaceIndex = interface_types.InterfaceIndex + +type MacAddress = ethernet_types.MacAddress + // MemifCreate represents VPP binary API message 'memif_create'. type MemifCreate struct { - Role uint8 - Mode uint8 + Role MemifRole + Mode MemifMode RxQueues uint8 TxQueues uint8 ID uint32 SocketID uint32 - Secret []byte `struc:"[24]byte"` RingSize uint32 BufferSize uint16 - HwAddr []byte `struc:"[6]byte"` + NoZeroCopy bool + HwAddr MacAddress + Secret string `struc:"[24]byte"` } -func (*MemifCreate) GetMessageName() string { - return "memif_create" -} -func (*MemifCreate) GetCrcString() string { - return "6597cdb2" -} -func (*MemifCreate) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *MemifCreate) Reset() { *m = MemifCreate{} } +func (*MemifCreate) GetMessageName() string { return "memif_create" } +func (*MemifCreate) GetCrcString() string { return "b1b25061" } +func (*MemifCreate) GetMessageType() api.MessageType { return api.RequestMessage } // MemifCreateReply represents VPP binary API message 'memif_create_reply'. type MemifCreateReply struct { Retval int32 - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*MemifCreateReply) GetMessageName() string { - return "memif_create_reply" -} -func (*MemifCreateReply) GetCrcString() string { - return "fda5941f" -} -func (*MemifCreateReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MemifCreateReply) Reset() { *m = MemifCreateReply{} } +func (*MemifCreateReply) GetMessageName() string { return "memif_create_reply" } +func (*MemifCreateReply) GetCrcString() string { return "5383d31f" } +func (*MemifCreateReply) GetMessageType() api.MessageType { return api.ReplyMessage } // MemifDelete represents VPP binary API message 'memif_delete'. type MemifDelete struct { - SwIfIndex uint32 + SwIfIndex InterfaceIndex } -func (*MemifDelete) GetMessageName() string { - return "memif_delete" -} -func (*MemifDelete) GetCrcString() string { - return "529cb13f" -} -func (*MemifDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *MemifDelete) Reset() { *m = MemifDelete{} } +func (*MemifDelete) GetMessageName() string { return "memif_delete" } +func (*MemifDelete) GetCrcString() string { return "f9e6675e" } +func (*MemifDelete) GetMessageType() api.MessageType { return api.RequestMessage } // MemifDeleteReply represents VPP binary API message 'memif_delete_reply'. type MemifDeleteReply struct { Retval int32 } -func (*MemifDeleteReply) GetMessageName() string { - return "memif_delete_reply" -} -func (*MemifDeleteReply) GetCrcString() string { - return "e8d4e804" -} -func (*MemifDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MemifDeleteReply) Reset() { *m = MemifDeleteReply{} } +func (*MemifDeleteReply) GetMessageName() string { return "memif_delete_reply" } +func (*MemifDeleteReply) GetCrcString() string { return "e8d4e804" } +func (*MemifDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage } // MemifDetails represents VPP binary API message 'memif_details'. type MemifDetails struct { - SwIfIndex uint32 - IfName []byte `struc:"[64]byte"` - HwAddr []byte `struc:"[6]byte"` - ID uint32 - Role uint8 - Mode uint8 - SocketID uint32 - RingSize uint32 - BufferSize uint16 - AdminUpDown uint8 - LinkUpDown uint8 + SwIfIndex InterfaceIndex + HwAddr MacAddress + ID uint32 + Role MemifRole + Mode MemifMode + ZeroCopy bool + SocketID uint32 + RingSize uint32 + BufferSize uint16 + Flags IfStatusFlags + IfName string `struc:"[64]byte"` } -func (*MemifDetails) GetMessageName() string { - return "memif_details" -} -func (*MemifDetails) GetCrcString() string { - return "4f5a3397" -} -func (*MemifDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MemifDetails) Reset() { *m = MemifDetails{} } +func (*MemifDetails) GetMessageName() string { return "memif_details" } +func (*MemifDetails) GetCrcString() string { return "d0382c4c" } +func (*MemifDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // MemifDump represents VPP binary API message 'memif_dump'. type MemifDump struct{} -func (*MemifDump) GetMessageName() string { - return "memif_dump" -} -func (*MemifDump) GetCrcString() string { - return "51077d14" -} -func (*MemifDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *MemifDump) Reset() { *m = MemifDump{} } +func (*MemifDump) GetMessageName() string { return "memif_dump" } +func (*MemifDump) GetCrcString() string { return "51077d14" } +func (*MemifDump) GetMessageType() api.MessageType { return api.RequestMessage } // MemifSocketFilenameAddDel represents VPP binary API message 'memif_socket_filename_add_del'. type MemifSocketFilenameAddDel struct { - IsAdd uint8 + IsAdd bool SocketID uint32 - SocketFilename []byte `struc:"[128]byte"` + SocketFilename string `struc:"[108]byte"` } -func (*MemifSocketFilenameAddDel) GetMessageName() string { - return "memif_socket_filename_add_del" -} -func (*MemifSocketFilenameAddDel) GetCrcString() string { - return "30e3929d" -} -func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *MemifSocketFilenameAddDel) Reset() { *m = MemifSocketFilenameAddDel{} } +func (*MemifSocketFilenameAddDel) GetMessageName() string { return "memif_socket_filename_add_del" } +func (*MemifSocketFilenameAddDel) GetCrcString() string { return "a2ce1a10" } +func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType { return api.RequestMessage } // MemifSocketFilenameAddDelReply represents VPP binary API message 'memif_socket_filename_add_del_reply'. type MemifSocketFilenameAddDelReply struct { Retval int32 } +func (m *MemifSocketFilenameAddDelReply) Reset() { *m = MemifSocketFilenameAddDelReply{} } func (*MemifSocketFilenameAddDelReply) GetMessageName() string { return "memif_socket_filename_add_del_reply" } -func (*MemifSocketFilenameAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (*MemifSocketFilenameAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } // MemifSocketFilenameDetails represents VPP binary API message 'memif_socket_filename_details'. type MemifSocketFilenameDetails struct { SocketID uint32 - SocketFilename []byte `struc:"[128]byte"` + SocketFilename string `struc:"[108]byte"` } -func (*MemifSocketFilenameDetails) GetMessageName() string { - return "memif_socket_filename_details" -} -func (*MemifSocketFilenameDetails) GetCrcString() string { - return "e347e32f" -} -func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *MemifSocketFilenameDetails) Reset() { *m = MemifSocketFilenameDetails{} } +func (*MemifSocketFilenameDetails) GetMessageName() string { return "memif_socket_filename_details" } +func (*MemifSocketFilenameDetails) GetCrcString() string { return "7ff326f7" } +func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // MemifSocketFilenameDump represents VPP binary API message 'memif_socket_filename_dump'. type MemifSocketFilenameDump struct{} -func (*MemifSocketFilenameDump) GetMessageName() string { - return "memif_socket_filename_dump" -} -func (*MemifSocketFilenameDump) GetCrcString() string { - return "51077d14" -} -func (*MemifSocketFilenameDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *MemifSocketFilenameDump) Reset() { *m = MemifSocketFilenameDump{} } +func (*MemifSocketFilenameDump) GetMessageName() string { return "memif_socket_filename_dump" } +func (*MemifSocketFilenameDump) GetCrcString() string { return "51077d14" } +func (*MemifSocketFilenameDump) GetMessageType() api.MessageType { return api.RequestMessage } func init() { api.RegisterMessage((*MemifCreate)(nil), "memif.MemifCreate") diff --git a/examples/binapi/vpe/vpe.ba.go b/examples/binapi/vpe/vpe.ba.go index 129f868..2738029 100644 --- a/examples/binapi/vpe/vpe.ba.go +++ b/examples/binapi/vpe/vpe.ba.go @@ -20,6 +20,8 @@ import ( struc "github.com/lunixbochs/struc" io "io" strconv "strconv" + + vpe_types "git.fd.io/govpp.git/examples/vpe_types" ) const ( @@ -28,61 +30,14 @@ const ( // APIVersion is the API version of this module. APIVersion = "1.6.0" // VersionCrc is the CRC of this module. - VersionCrc = 0x1bf55581 -) - -// LogLevel represents VPP binary API enum 'log_level'. -type LogLevel uint32 - -const ( - VPE_API_LOG_LEVEL_EMERG LogLevel = 0 - VPE_API_LOG_LEVEL_ALERT LogLevel = 1 - VPE_API_LOG_LEVEL_CRIT LogLevel = 2 - VPE_API_LOG_LEVEL_ERR LogLevel = 3 - VPE_API_LOG_LEVEL_WARNING LogLevel = 4 - VPE_API_LOG_LEVEL_NOTICE LogLevel = 5 - VPE_API_LOG_LEVEL_INFO LogLevel = 6 - VPE_API_LOG_LEVEL_DEBUG LogLevel = 7 - VPE_API_LOG_LEVEL_DISABLED LogLevel = 8 + VersionCrc = 0xc6c0bcf6 ) -var LogLevel_name = map[uint32]string{ - 0: "VPE_API_LOG_LEVEL_EMERG", - 1: "VPE_API_LOG_LEVEL_ALERT", - 2: "VPE_API_LOG_LEVEL_CRIT", - 3: "VPE_API_LOG_LEVEL_ERR", - 4: "VPE_API_LOG_LEVEL_WARNING", - 5: "VPE_API_LOG_LEVEL_NOTICE", - 6: "VPE_API_LOG_LEVEL_INFO", - 7: "VPE_API_LOG_LEVEL_DEBUG", - 8: "VPE_API_LOG_LEVEL_DISABLED", -} - -var LogLevel_value = map[string]uint32{ - "VPE_API_LOG_LEVEL_EMERG": 0, - "VPE_API_LOG_LEVEL_ALERT": 1, - "VPE_API_LOG_LEVEL_CRIT": 2, - "VPE_API_LOG_LEVEL_ERR": 3, - "VPE_API_LOG_LEVEL_WARNING": 4, - "VPE_API_LOG_LEVEL_NOTICE": 5, - "VPE_API_LOG_LEVEL_INFO": 6, - "VPE_API_LOG_LEVEL_DEBUG": 7, - "VPE_API_LOG_LEVEL_DISABLED": 8, -} - -func (x LogLevel) String() string { - s, ok := LogLevel_name[uint32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} +type LogLevel = vpe_types.LogLevel -// Timedelta represents VPP binary API alias 'timedelta'. -type Timedelta float64 +type Timedelta = vpe_types.Timedelta -// Timestamp represents VPP binary API alias 'timestamp'. -type Timestamp float64 +type Timestamp = vpe_types.Timestamp // ThreadData represents VPP binary API type 'thread_data'. type ThreadData struct { @@ -95,22 +50,9 @@ type ThreadData struct { CPUSocket uint32 } -func (*ThreadData) GetTypeName() string { - return "thread_data" -} - -// Version represents VPP binary API type 'version'. -type Version struct { - Major uint32 - Minor uint32 - Patch uint32 - PreRelease []byte `struc:"[17]byte"` - BuildMetadata []byte `struc:"[17]byte"` -} +func (*ThreadData) GetTypeName() string { return "thread_data" } -func (*Version) GetTypeName() string { - return "version" -} +type Version = vpe_types.Version // AddNodeNext represents VPP binary API message 'add_node_next'. type AddNodeNext struct { @@ -118,15 +60,10 @@ type AddNodeNext struct { NextName []byte `struc:"[64]byte"` } -func (*AddNodeNext) GetMessageName() string { - return "add_node_next" -} -func (*AddNodeNext) GetCrcString() string { - return "9ab92f7a" -} -func (*AddNodeNext) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *AddNodeNext) Reset() { *m = AddNodeNext{} } +func (*AddNodeNext) GetMessageName() string { return "add_node_next" } +func (*AddNodeNext) GetCrcString() string { return "9ab92f7a" } +func (*AddNodeNext) GetMessageType() api.MessageType { return api.RequestMessage } // AddNodeNextReply represents VPP binary API message 'add_node_next_reply'. type AddNodeNextReply struct { @@ -134,30 +71,20 @@ type AddNodeNextReply struct { NextIndex uint32 } -func (*AddNodeNextReply) GetMessageName() string { - return "add_node_next_reply" -} -func (*AddNodeNextReply) GetCrcString() string { - return "2ed75f32" -} -func (*AddNodeNextReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} } +func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" } +func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" } +func (*AddNodeNextReply) GetMessageType() api.MessageType { return api.ReplyMessage } // Cli represents VPP binary API message 'cli'. type Cli struct { CmdInShmem uint64 } -func (*Cli) GetMessageName() string { - return "cli" -} -func (*Cli) GetCrcString() string { - return "23bfbfff" -} -func (*Cli) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *Cli) Reset() { *m = Cli{} } +func (*Cli) GetMessageName() string { return "cli" } +func (*Cli) GetCrcString() string { return "23bfbfff" } +func (*Cli) GetMessageType() api.MessageType { return api.RequestMessage } // CliInband represents VPP binary API message 'cli_inband'. type CliInband struct { @@ -165,15 +92,10 @@ type CliInband struct { Cmd string } -func (*CliInband) GetMessageName() string { - return "cli_inband" -} -func (*CliInband) GetCrcString() string { - return "f8377302" -} -func (*CliInband) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *CliInband) Reset() { *m = CliInband{} } +func (*CliInband) GetMessageName() string { return "cli_inband" } +func (*CliInband) GetCrcString() string { return "f8377302" } +func (*CliInband) GetMessageType() api.MessageType { return api.RequestMessage } // CliInbandReply represents VPP binary API message 'cli_inband_reply'. type CliInbandReply struct { @@ -182,15 +104,10 @@ type CliInbandReply struct { Reply string } -func (*CliInbandReply) GetMessageName() string { - return "cli_inband_reply" -} -func (*CliInbandReply) GetCrcString() string { - return "05879051" -} -func (*CliInbandReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *CliInbandReply) Reset() { *m = CliInbandReply{} } +func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" } +func (*CliInbandReply) GetCrcString() string { return "05879051" } +func (*CliInbandReply) GetMessageType() api.MessageType { return api.ReplyMessage } // CliReply represents VPP binary API message 'cli_reply'. type CliReply struct { @@ -198,28 +115,18 @@ type CliReply struct { ReplyInShmem uint64 } -func (*CliReply) GetMessageName() string { - return "cli_reply" -} -func (*CliReply) GetCrcString() string { - return "06d68297" -} -func (*CliReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *CliReply) Reset() { *m = CliReply{} } +func (*CliReply) GetMessageName() string { return "cli_reply" } +func (*CliReply) GetCrcString() string { return "06d68297" } +func (*CliReply) GetMessageType() api.MessageType { return api.ReplyMessage } // ControlPing represents VPP binary API message 'control_ping'. type ControlPing struct{} -func (*ControlPing) GetMessageName() string { - return "control_ping" -} -func (*ControlPing) GetCrcString() string { - return "51077d14" -} -func (*ControlPing) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *ControlPing) Reset() { *m = ControlPing{} } +func (*ControlPing) GetMessageName() string { return "control_ping" } +func (*ControlPing) GetCrcString() string { return "51077d14" } +func (*ControlPing) GetMessageType() api.MessageType { return api.RequestMessage } // ControlPingReply represents VPP binary API message 'control_ping_reply'. type ControlPingReply struct { @@ -228,30 +135,20 @@ type ControlPingReply struct { VpePID uint32 } -func (*ControlPingReply) GetMessageName() string { - return "control_ping_reply" -} -func (*ControlPingReply) GetCrcString() string { - return "f6b0b8ca" -} -func (*ControlPingReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *ControlPingReply) Reset() { *m = ControlPingReply{} } +func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" } +func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" } +func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage } // GetF64EndianValue represents VPP binary API message 'get_f64_endian_value'. type GetF64EndianValue struct { F64One float64 } -func (*GetF64EndianValue) GetMessageName() string { - return "get_f64_endian_value" -} -func (*GetF64EndianValue) GetCrcString() string { - return "809fcd44" -} -func (*GetF64EndianValue) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} } +func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" } +func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" } +func (*GetF64EndianValue) GetMessageType() api.MessageType { return api.RequestMessage } // GetF64EndianValueReply represents VPP binary API message 'get_f64_endian_value_reply'. type GetF64EndianValueReply struct { @@ -259,30 +156,20 @@ type GetF64EndianValueReply struct { F64OneResult float64 } -func (*GetF64EndianValueReply) GetMessageName() string { - return "get_f64_endian_value_reply" -} -func (*GetF64EndianValueReply) GetCrcString() string { - return "7e02e404" -} -func (*GetF64EndianValueReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} } +func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" } +func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" } +func (*GetF64EndianValueReply) GetMessageType() api.MessageType { return api.ReplyMessage } // GetF64IncrementByOne represents VPP binary API message 'get_f64_increment_by_one'. type GetF64IncrementByOne struct { F64Value float64 } -func (*GetF64IncrementByOne) GetMessageName() string { - return "get_f64_increment_by_one" -} -func (*GetF64IncrementByOne) GetCrcString() string { - return "b64f027e" -} -func (*GetF64IncrementByOne) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} } +func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" } +func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" } +func (*GetF64IncrementByOne) GetMessageType() api.MessageType { return api.RequestMessage } // GetF64IncrementByOneReply represents VPP binary API message 'get_f64_increment_by_one_reply'. type GetF64IncrementByOneReply struct { @@ -290,15 +177,10 @@ type GetF64IncrementByOneReply struct { F64Value float64 } -func (*GetF64IncrementByOneReply) GetMessageName() string { - return "get_f64_increment_by_one_reply" -} -func (*GetF64IncrementByOneReply) GetCrcString() string { - return "d25dbaa3" -} -func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} } +func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" } +func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" } +func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType { return api.ReplyMessage } // GetNextIndex represents VPP binary API message 'get_next_index'. type GetNextIndex struct { @@ -306,15 +188,10 @@ type GetNextIndex struct { NextName []byte `struc:"[64]byte"` } -func (*GetNextIndex) GetMessageName() string { - return "get_next_index" -} -func (*GetNextIndex) GetCrcString() string { - return "9ab92f7a" -} -func (*GetNextIndex) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *GetNextIndex) Reset() { *m = GetNextIndex{} } +func (*GetNextIndex) GetMessageName() string { return "get_next_index" } +func (*GetNextIndex) GetCrcString() string { return "9ab92f7a" } +func (*GetNextIndex) GetMessageType() api.MessageType { return api.RequestMessage } // GetNextIndexReply represents VPP binary API message 'get_next_index_reply'. type GetNextIndexReply struct { @@ -322,28 +199,18 @@ type GetNextIndexReply struct { NextIndex uint32 } -func (*GetNextIndexReply) GetMessageName() string { - return "get_next_index_reply" -} -func (*GetNextIndexReply) GetCrcString() string { - return "2ed75f32" -} -func (*GetNextIndexReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} } +func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" } +func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" } +func (*GetNextIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage } // GetNodeGraph represents VPP binary API message 'get_node_graph'. type GetNodeGraph struct{} -func (*GetNodeGraph) GetMessageName() string { - return "get_node_graph" -} -func (*GetNodeGraph) GetCrcString() string { - return "51077d14" -} -func (*GetNodeGraph) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} } +func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" } +func (*GetNodeGraph) GetCrcString() string { return "51077d14" } +func (*GetNodeGraph) GetMessageType() api.MessageType { return api.RequestMessage } // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply'. type GetNodeGraphReply struct { @@ -351,30 +218,20 @@ type GetNodeGraphReply struct { ReplyInShmem uint64 } -func (*GetNodeGraphReply) GetMessageName() string { - return "get_node_graph_reply" -} -func (*GetNodeGraphReply) GetCrcString() string { - return "06d68297" -} -func (*GetNodeGraphReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} } +func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" } +func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" } +func (*GetNodeGraphReply) GetMessageType() api.MessageType { return api.ReplyMessage } // GetNodeIndex represents VPP binary API message 'get_node_index'. type GetNodeIndex struct { NodeName []byte `struc:"[64]byte"` } -func (*GetNodeIndex) GetMessageName() string { - return "get_node_index" -} -func (*GetNodeIndex) GetCrcString() string { - return "6c9a495d" -} -func (*GetNodeIndex) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} } +func (*GetNodeIndex) GetMessageName() string { return "get_node_index" } +func (*GetNodeIndex) GetCrcString() string { return "6c9a495d" } +func (*GetNodeIndex) GetMessageType() api.MessageType { return api.RequestMessage } // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply'. type GetNodeIndexReply struct { @@ -382,15 +239,10 @@ type GetNodeIndexReply struct { NodeIndex uint32 } -func (*GetNodeIndexReply) GetMessageName() string { - return "get_node_index_reply" -} -func (*GetNodeIndexReply) GetCrcString() string { - return "a8600b89" -} -func (*GetNodeIndexReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} } +func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" } +func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" } +func (*GetNodeIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage } // LogDetails represents VPP binary API message 'log_details'. type LogDetails struct { @@ -400,43 +252,28 @@ type LogDetails struct { Message string `struc:"[256]byte"` } -func (*LogDetails) GetMessageName() string { - return "log_details" -} -func (*LogDetails) GetCrcString() string { - return "255827a1" -} -func (*LogDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *LogDetails) Reset() { *m = LogDetails{} } +func (*LogDetails) GetMessageName() string { return "log_details" } +func (*LogDetails) GetCrcString() string { return "255827a1" } +func (*LogDetails) GetMessageType() api.MessageType { return api.ReplyMessage } // LogDump represents VPP binary API message 'log_dump'. type LogDump struct { StartTimestamp Timestamp } -func (*LogDump) GetMessageName() string { - return "log_dump" -} -func (*LogDump) GetCrcString() string { - return "6ab31753" -} -func (*LogDump) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *LogDump) Reset() { *m = LogDump{} } +func (*LogDump) GetMessageName() string { return "log_dump" } +func (*LogDump) GetCrcString() string { return "6ab31753" } +func (*LogDump) GetMessageType() api.MessageType { return api.RequestMessage } // ShowThreads represents VPP binary API message 'show_threads'. type ShowThreads struct{} -func (*ShowThreads) GetMessageName() string { - return "show_threads" -} -func (*ShowThreads) GetCrcString() string { - return "51077d14" -} -func (*ShowThreads) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *ShowThreads) Reset() { *m = ShowThreads{} } +func (*ShowThreads) GetMessageName() string { return "show_threads" } +func (*ShowThreads) GetCrcString() string { return "51077d14" } +func (*ShowThreads) GetMessageType() api.MessageType { return api.RequestMessage } // ShowThreadsReply represents VPP binary API message 'show_threads_reply'. type ShowThreadsReply struct { @@ -445,28 +282,18 @@ type ShowThreadsReply struct { ThreadData []ThreadData } -func (*ShowThreadsReply) GetMessageName() string { - return "show_threads_reply" -} -func (*ShowThreadsReply) GetCrcString() string { - return "f5e0b66f" -} -func (*ShowThreadsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} } +func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" } +func (*ShowThreadsReply) GetCrcString() string { return "f5e0b66f" } +func (*ShowThreadsReply) GetMessageType() api.MessageType { return api.ReplyMessage } // ShowVersion represents VPP binary API message 'show_version'. type ShowVersion struct{} -func (*ShowVersion) GetMessageName() string { - return "show_version" -} -func (*ShowVersion) GetCrcString() string { - return "51077d14" -} -func (*ShowVersion) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *ShowVersion) Reset() { *m = ShowVersion{} } +func (*ShowVersion) GetMessageName() string { return "show_version" } +func (*ShowVersion) GetCrcString() string { return "51077d14" } +func (*ShowVersion) GetMessageType() api.MessageType { return api.RequestMessage } // ShowVersionReply represents VPP binary API message 'show_version_reply'. type ShowVersionReply struct { @@ -477,28 +304,18 @@ type ShowVersionReply struct { BuildDirectory string `struc:"[256]byte"` } -func (*ShowVersionReply) GetMessageName() string { - return "show_version_reply" -} -func (*ShowVersionReply) GetCrcString() string { - return "c919bde1" -} -func (*ShowVersionReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} } +func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" } +func (*ShowVersionReply) GetCrcString() string { return "c919bde1" } +func (*ShowVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage } // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'. type ShowVpeSystemTime struct{} -func (*ShowVpeSystemTime) GetMessageName() string { - return "show_vpe_system_time" -} -func (*ShowVpeSystemTime) GetCrcString() string { - return "51077d14" -} -func (*ShowVpeSystemTime) GetMessageType() api.MessageType { - return api.RequestMessage -} +func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} } +func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" } +func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" } +func (*ShowVpeSystemTime) GetMessageType() api.MessageType { return api.RequestMessage } // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'. type ShowVpeSystemTimeReply struct { @@ -506,15 +323,10 @@ type ShowVpeSystemTimeReply struct { VpeSystemTime Timestamp } -func (*ShowVpeSystemTimeReply) GetMessageName() string { - return "show_vpe_system_time_reply" -} -func (*ShowVpeSystemTimeReply) GetCrcString() string { - return "7ffd8193" -} -func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} +func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} } +func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" } +func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" } +func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType { return api.ReplyMessage } func init() { api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext") diff --git a/examples/binapi/vpe_types/vpe_types.ba.go b/examples/binapi/vpe_types/vpe_types.ba.go new file mode 100644 index 0000000..c937c8f --- /dev/null +++ b/examples/binapi/vpe_types/vpe_types.ba.go @@ -0,0 +1,106 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// source: /usr/share/vpp/api/core/vpe_types.api.json + +/* +Package vpe_types is a generated VPP binary API for 'vpe_types' module. + +It consists of: + 1 enum + 2 aliases + 1 type +*/ +package vpe_types + +import ( + bytes "bytes" + context "context" + api "git.fd.io/govpp.git/api" + struc "github.com/lunixbochs/struc" + io "io" + strconv "strconv" +) + +const ( + // ModuleName is the name of this module. + ModuleName = "vpe_types" + // VersionCrc is the CRC of this module. + VersionCrc = 0x3369988d +) + +// LogLevel represents VPP binary API enum 'log_level'. +type LogLevel uint32 + +const ( + VPE_API_LOG_LEVEL_EMERG LogLevel = 0 + VPE_API_LOG_LEVEL_ALERT LogLevel = 1 + VPE_API_LOG_LEVEL_CRIT LogLevel = 2 + VPE_API_LOG_LEVEL_ERR LogLevel = 3 + VPE_API_LOG_LEVEL_WARNING LogLevel = 4 + VPE_API_LOG_LEVEL_NOTICE LogLevel = 5 + VPE_API_LOG_LEVEL_INFO LogLevel = 6 + VPE_API_LOG_LEVEL_DEBUG LogLevel = 7 + VPE_API_LOG_LEVEL_DISABLED LogLevel = 8 +) + +var LogLevel_name = map[uint32]string{ + 0: "VPE_API_LOG_LEVEL_EMERG", + 1: "VPE_API_LOG_LEVEL_ALERT", + 2: "VPE_API_LOG_LEVEL_CRIT", + 3: "VPE_API_LOG_LEVEL_ERR", + 4: "VPE_API_LOG_LEVEL_WARNING", + 5: "VPE_API_LOG_LEVEL_NOTICE", + 6: "VPE_API_LOG_LEVEL_INFO", + 7: "VPE_API_LOG_LEVEL_DEBUG", + 8: "VPE_API_LOG_LEVEL_DISABLED", +} + +var LogLevel_value = map[string]uint32{ + "VPE_API_LOG_LEVEL_EMERG": 0, + "VPE_API_LOG_LEVEL_ALERT": 1, + "VPE_API_LOG_LEVEL_CRIT": 2, + "VPE_API_LOG_LEVEL_ERR": 3, + "VPE_API_LOG_LEVEL_WARNING": 4, + "VPE_API_LOG_LEVEL_NOTICE": 5, + "VPE_API_LOG_LEVEL_INFO": 6, + "VPE_API_LOG_LEVEL_DEBUG": 7, + "VPE_API_LOG_LEVEL_DISABLED": 8, +} + +func (x LogLevel) String() string { + s, ok := LogLevel_name[uint32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +// Timedelta represents VPP binary API alias 'timedelta'. +type Timedelta float64 + +// Timestamp represents VPP binary API alias 'timestamp'. +type Timestamp float64 + +// Version represents VPP binary API type 'version'. +type Version struct { + Major uint32 + Minor uint32 + Patch uint32 + PreRelease []byte `struc:"[17]byte"` + BuildMetadata []byte `struc:"[17]byte"` +} + +func (*Version) GetTypeName() string { return "version" } + +// 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 _ = bytes.NewBuffer +var _ = context.Background +var _ = io.Copy +var _ = strconv.Itoa +var _ = struc.Pack |