// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+// versions:
+// binapi-generator: v0.4.0-dev
+// VPP: 20.05-release
// source: /usr/share/vpp/api/core/ip.api.json
/*
-Package ip is a generated VPP binary API for 'ip' module.
+Package ip contains generated code for VPP API file ip.api (3.0.1).
It consists of:
- 15 enums
7 aliases
+ 15 enums
+ 60 messages
14 types
1 union
- 60 messages
- 30 services
*/
package ip
import (
- bytes "bytes"
- context "context"
+ "bytes"
+ "context"
+ "encoding/binary"
+ "fmt"
+ "io"
+ "math"
+ "net"
+ "strconv"
+ "strings"
+
api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
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"
+ fib_types "git.fd.io/govpp.git/examples/binapi/fib_types"
+ interface_types "git.fd.io/govpp.git/examples/binapi/interface_types"
)
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the GoVPP api package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// GoVPP api package needs to be updated.
+const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
+
const (
// ModuleName is the name of this module.
ModuleName = "ip"
// APIVersion is the API version of this module.
APIVersion = "3.0.1"
// VersionCrc is the CRC of this module.
- VersionCrc = 0xfc3fea46
-)
-
-type AddressFamily = ip_types.AddressFamily
-
-// FibPathFlags represents VPP binary API enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
-}
-
-var FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
-}
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- return strconv.Itoa(int(x))
-}
-
-// FibPathNhProto represents VPP binary API enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
-}
-
-var FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
-}
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return strconv.Itoa(int(x))
-}
-
-// FibPathType represents VPP binary API enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
+ VersionCrc = 0x765d74b1
)
-var FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
-}
-
-var FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
-}
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return strconv.Itoa(int(x))
-}
-
-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
-
// IPReassType represents VPP binary API enum 'ip_reass_type'.
type IPReassType uint32
IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1
)
-var IPReassType_name = map[uint32]string{
- 0: "IP_REASS_TYPE_FULL",
- 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
-}
-
-var IPReassType_value = map[string]uint32{
- "IP_REASS_TYPE_FULL": 0,
- "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
-}
+var (
+ IPReassType_name = map[uint32]string{
+ 0: "IP_REASS_TYPE_FULL",
+ 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
+ }
+ IPReassType_value = map[string]uint32{
+ "IP_REASS_TYPE_FULL": 0,
+ "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
+ }
+)
func (x IPReassType) String() string {
s, ok := IPReassType_name[uint32(x)]
if ok {
return s
}
- return strconv.Itoa(int(x))
+ return "IPReassType(" + strconv.Itoa(int(x)) + ")"
}
-type LinkDuplex = interface_types.LinkDuplex
-
// MfibItfFlags represents VPP binary API enum 'mfib_itf_flags'.
type MfibItfFlags uint32
MFIB_API_ITF_FLAG_DONT_PRESERVE MfibItfFlags = 16
)
-var MfibItfFlags_name = map[uint32]string{
- 0: "MFIB_API_ITF_FLAG_NONE",
- 1: "MFIB_API_ITF_FLAG_NEGATE_SIGNAL",
- 2: "MFIB_API_ITF_FLAG_ACCEPT",
- 4: "MFIB_API_ITF_FLAG_FORWARD",
- 8: "MFIB_API_ITF_FLAG_SIGNAL_PRESENT",
- 16: "MFIB_API_ITF_FLAG_DONT_PRESERVE",
-}
-
-var MfibItfFlags_value = map[string]uint32{
- "MFIB_API_ITF_FLAG_NONE": 0,
- "MFIB_API_ITF_FLAG_NEGATE_SIGNAL": 1,
- "MFIB_API_ITF_FLAG_ACCEPT": 2,
- "MFIB_API_ITF_FLAG_FORWARD": 4,
- "MFIB_API_ITF_FLAG_SIGNAL_PRESENT": 8,
- "MFIB_API_ITF_FLAG_DONT_PRESERVE": 16,
-}
+var (
+ MfibItfFlags_name = map[uint32]string{
+ 0: "MFIB_API_ITF_FLAG_NONE",
+ 1: "MFIB_API_ITF_FLAG_NEGATE_SIGNAL",
+ 2: "MFIB_API_ITF_FLAG_ACCEPT",
+ 4: "MFIB_API_ITF_FLAG_FORWARD",
+ 8: "MFIB_API_ITF_FLAG_SIGNAL_PRESENT",
+ 16: "MFIB_API_ITF_FLAG_DONT_PRESERVE",
+ }
+ MfibItfFlags_value = map[string]uint32{
+ "MFIB_API_ITF_FLAG_NONE": 0,
+ "MFIB_API_ITF_FLAG_NEGATE_SIGNAL": 1,
+ "MFIB_API_ITF_FLAG_ACCEPT": 2,
+ "MFIB_API_ITF_FLAG_FORWARD": 4,
+ "MFIB_API_ITF_FLAG_SIGNAL_PRESENT": 8,
+ "MFIB_API_ITF_FLAG_DONT_PRESERVE": 16,
+ }
+)
func (x MfibItfFlags) String() string {
s, ok := MfibItfFlags_name[uint32(x)]
if ok {
return s
}
- return strconv.Itoa(int(x))
+ return "MfibItfFlags(" + strconv.Itoa(int(x)) + ")"
}
-type MtuProto = interface_types.MtuProto
+// MacAddress represents VPP binary API alias 'mac_address'.
+type MacAddress [6]uint8
-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
-
-// FibMplsLabel represents VPP binary API type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8
- Label uint32
- TTL uint8
- Exp uint8
-}
-
-func (*FibMplsLabel) GetTypeName() string { return "fib_mpls_label" }
-
-// FibPath represents VPP binary API type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32
- TableID uint32
- RpfID uint32
- Weight uint8
- Preference uint8
- Type FibPathType
- Flags FibPathFlags
- Proto FibPathNhProto
- Nh FibPathNh
- NLabels uint8
- LabelStack []FibMplsLabel `struc:"[16]FibMplsLabel"`
+func ParseMAC(mac string) (parsed MacAddress, err error) {
+ var hw net.HardwareAddr
+ if hw, err = net.ParseMAC(mac); err != nil {
+ return
+ }
+ copy(parsed[:], hw[:])
+ return
}
-func (*FibPath) GetTypeName() string { return "fib_path" }
-
-// FibPathNh represents VPP binary API type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion
- ViaLabel uint32
- ObjID uint32
- ClassifyTableIndex uint32
+func (m *MacAddress) ToString() string {
+ return net.HardwareAddr(m[:]).String()
}
-func (*FibPathNh) GetTypeName() string { return "fib_path_nh" }
-
-type IP4Prefix = ip_types.IP4Prefix
-
-type IP6Prefix = ip_types.IP6Prefix
-
// IPMroute represents VPP binary API type 'ip_mroute'.
type IPMroute struct {
- TableID uint32
- EntryFlags uint32
- RpfID uint32
- Prefix Mprefix
- NPaths uint8 `struc:"sizeof=Paths"`
- Paths []MfibPath
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ EntryFlags uint32 `binapi:"u32,name=entry_flags" json:"entry_flags,omitempty"`
+ RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
+ Prefix fib_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
+ NPaths uint8 `binapi:"u8,name=n_paths" json:"n_paths,omitempty" struc:"sizeof=Paths"`
+ Paths []MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
}
func (*IPMroute) GetTypeName() string { return "ip_mroute" }
// IPRoute represents VPP binary API type 'ip_route'.
type IPRoute struct {
- TableID uint32
- StatsIndex uint32
- Prefix Prefix
- NPaths uint8 `struc:"sizeof=Paths"`
- Paths []FibPath
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
+ Prefix fib_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
+ NPaths uint8 `binapi:"u8,name=n_paths" json:"n_paths,omitempty" struc:"sizeof=Paths"`
+ Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
}
func (*IPRoute) GetTypeName() string { return "ip_route" }
// IPTable represents VPP binary API type 'ip_table'.
type IPTable struct {
- TableID uint32
- IsIP6 bool
- Name string `struc:"[64]byte"`
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
+ Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
}
func (*IPTable) GetTypeName() string { return "ip_table" }
// MfibPath represents VPP binary API type 'mfib_path'.
type MfibPath struct {
- ItfFlags MfibItfFlags
- Path FibPath
+ ItfFlags MfibItfFlags `binapi:"mfib_itf_flags,name=itf_flags" json:"itf_flags,omitempty"`
+ Path fib_types.FibPath `binapi:"fib_path,name=path" json:"path,omitempty"`
}
func (*MfibPath) GetTypeName() string { return "mfib_path" }
-type Mprefix = ip_types.Mprefix
-
-type Prefix = ip_types.Prefix
-
-type PrefixMatcher = ip_types.PrefixMatcher
-
// PuntRedirect represents VPP binary API type 'punt_redirect'.
type PuntRedirect struct {
- RxSwIfIndex InterfaceIndex
- TxSwIfIndex InterfaceIndex
- Nh Address
+ RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
+ TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
+ Nh fib_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
}
func (*PuntRedirect) GetTypeName() string { return "punt_redirect" }
-type AddressUnion = ip_types.AddressUnion
-
// IoamDisable represents VPP binary API message 'ioam_disable'.
type IoamDisable struct {
- ID uint16
+ ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
}
func (m *IoamDisable) Reset() { *m = IoamDisable{} }
func (*IoamDisable) GetCrcString() string { return "6b16a45e" }
func (*IoamDisable) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IoamDisable) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ID
+ size += 2
+ return size
+}
+func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ID
+ o.PutUint16(buf[pos:pos+2], uint16(m.ID))
+ pos += 2
+ return buf, nil
+}
+func (m *IoamDisable) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ID
+ m.ID = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ return nil
+}
+
// IoamDisableReply represents VPP binary API message 'ioam_disable_reply'.
type IoamDisableReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} }
func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" }
func (*IoamDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IoamDisableReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IoamDisableReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IoamEnable represents VPP binary API message 'ioam_enable'.
type IoamEnable struct {
- ID uint16
- Seqno bool
- Analyse bool
- PotEnable bool
- TraceEnable bool
- NodeID uint32
+ ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
+ Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"`
+ Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"`
+ PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
+ TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
+ NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
}
func (m *IoamEnable) Reset() { *m = IoamEnable{} }
func (*IoamEnable) GetCrcString() string { return "51ccd868" }
func (*IoamEnable) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IoamEnable) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ID
+ size += 2
+ // field[1] m.Seqno
+ size += 1
+ // field[1] m.Analyse
+ size += 1
+ // field[1] m.PotEnable
+ size += 1
+ // field[1] m.TraceEnable
+ size += 1
+ // field[1] m.NodeID
+ size += 4
+ return size
+}
+func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ID
+ o.PutUint16(buf[pos:pos+2], uint16(m.ID))
+ pos += 2
+ // field[1] m.Seqno
+ if m.Seqno {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Analyse
+ if m.Analyse {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.PotEnable
+ if m.PotEnable {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.TraceEnable
+ if m.TraceEnable {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.NodeID
+ o.PutUint32(buf[pos:pos+4], uint32(m.NodeID))
+ pos += 4
+ return buf, nil
+}
+func (m *IoamEnable) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ID
+ m.ID = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.Seqno
+ m.Seqno = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Analyse
+ m.Analyse = tmp[pos] != 0
+ pos += 1
+ // field[1] m.PotEnable
+ m.PotEnable = tmp[pos] != 0
+ pos += 1
+ // field[1] m.TraceEnable
+ m.TraceEnable = tmp[pos] != 0
+ pos += 1
+ // field[1] m.NodeID
+ m.NodeID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IoamEnableReply represents VPP binary API message 'ioam_enable_reply'.
type IoamEnableReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} }
func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" }
func (*IoamEnableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IoamEnableReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IoamEnableReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPAddressDetails represents VPP binary API message 'ip_address_details'.
type IPAddressDetails struct {
- SwIfIndex InterfaceIndex
- Prefix AddressWithPrefix
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Prefix fib_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
}
func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
func (*IPAddressDetails) GetCrcString() string { return "b1199745" }
func (*IPAddressDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPAddressDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ size += 1
+ // field[3] m.Prefix.Address.Un
+ size += 16
+ // field[2] m.Prefix.Len
+ size += 1
+ return size
+}
+func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ buf[pos] = uint8(m.Prefix.Address.Af)
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Prefix.Len
+ buf[pos] = uint8(m.Prefix.Len)
+ pos += 1
+ return buf, nil
+}
+func (m *IPAddressDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ m.Prefix.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Prefix.Len
+ m.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ return nil
+}
+
// IPAddressDump represents VPP binary API message 'ip_address_dump'.
type IPAddressDump struct {
- SwIfIndex InterfaceIndex
- IsIPv6 bool
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
}
func (m *IPAddressDump) Reset() { *m = IPAddressDump{} }
func (*IPAddressDump) GetCrcString() string { return "2d033de4" }
func (*IPAddressDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPAddressDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IsIPv6
+ size += 1
+ return size
+}
+func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IsIPv6
+ if m.IsIPv6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPAddressDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIPv6
+ m.IsIPv6 = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPContainerProxyAddDel represents VPP binary API message 'ip_container_proxy_add_del'.
type IPContainerProxyAddDel struct {
- Pfx Prefix
- SwIfIndex InterfaceIndex
- IsAdd bool
+ Pfx fib_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
}
func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" }
func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPContainerProxyAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Pfx
+ // field[2] m.Pfx.Address
+ // field[3] m.Pfx.Address.Af
+ size += 1
+ // field[3] m.Pfx.Address.Un
+ size += 16
+ // field[2] m.Pfx.Len
+ size += 1
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IsAdd
+ size += 1
+ return size
+}
+func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Pfx
+ // field[2] m.Pfx.Address
+ // field[3] m.Pfx.Address.Af
+ buf[pos] = uint8(m.Pfx.Address.Af)
+ pos += 1
+ // field[3] m.Pfx.Address.Un
+ copy(buf[pos:pos+16], m.Pfx.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Pfx.Len
+ buf[pos] = uint8(m.Pfx.Len)
+ pos += 1
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPContainerProxyAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Pfx
+ // field[2] m.Pfx.Address
+ // field[3] m.Pfx.Address.Af
+ m.Pfx.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Pfx.Address.Un
+ copy(m.Pfx.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Pfx.Len
+ m.Pfx.Len = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPContainerProxyAddDelReply represents VPP binary API message 'ip_container_proxy_add_del_reply'.
type IPContainerProxyAddDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPContainerProxyAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPContainerProxyAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPContainerProxyDetails represents VPP binary API message 'ip_container_proxy_details'.
type IPContainerProxyDetails struct {
- SwIfIndex InterfaceIndex
- Prefix Prefix
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Prefix fib_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
}
func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" }
func (*IPContainerProxyDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPContainerProxyDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ size += 1
+ // field[3] m.Prefix.Address.Un
+ size += 16
+ // field[2] m.Prefix.Len
+ size += 1
+ return size
+}
+func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ buf[pos] = uint8(m.Prefix.Address.Af)
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Prefix.Len
+ buf[pos] = uint8(m.Prefix.Len)
+ pos += 1
+ return buf, nil
+}
+func (m *IPContainerProxyDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ m.Prefix.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Prefix.Len
+ m.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ return nil
+}
+
// IPContainerProxyDump represents VPP binary API message 'ip_container_proxy_dump'.
type IPContainerProxyDump struct{}
func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" }
func (*IPContainerProxyDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPContainerProxyDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
+}
+func (m *IPContainerProxyDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
+}
+
// IPDetails represents VPP binary API message 'ip_details'.
type IPDetails struct {
- SwIfIndex InterfaceIndex
- IsIPv6 bool
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
}
func (m *IPDetails) Reset() { *m = IPDetails{} }
func (*IPDetails) GetCrcString() string { return "eb152d07" }
func (*IPDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IsIPv6
+ size += 1
+ return size
+}
+func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IsIPv6
+ if m.IsIPv6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIPv6
+ m.IsIPv6 = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPDump represents VPP binary API message 'ip_dump'.
type IPDump struct {
- IsIPv6 bool
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
}
func (m *IPDump) Reset() { *m = IPDump{} }
func (*IPDump) GetCrcString() string { return "98d231ca" }
func (*IPDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsIPv6
+ size += 1
+ return size
+}
+func (m *IPDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsIPv6
+ if m.IsIPv6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsIPv6
+ m.IsIPv6 = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPMrouteAddDel represents VPP binary API message 'ip_mroute_add_del'.
type IPMrouteAddDel struct {
- IsAdd bool
- IsMultipath bool
- Route IPMroute
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
+ Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
}
func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" }
func (*IPMrouteAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPMrouteAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.IsMultipath
+ size += 1
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ size += 4
+ // field[2] m.Route.EntryFlags
+ size += 4
+ // field[2] m.Route.RpfID
+ size += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Af
+ size += 1
+ // field[3] m.Route.Prefix.GrpAddressLength
+ size += 2
+ // field[3] m.Route.Prefix.GrpAddress
+ size += 16
+ // field[3] m.Route.Prefix.SrcAddress
+ size += 16
+ // field[2] m.Route.NPaths
+ size += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var s2 MfibPath
+ _ = s2
+ if j2 < len(m.Route.Paths) {
+ s2 = m.Route.Paths[j2]
+ }
+ // field[3] s2.ItfFlags
+ size += 4
+ // field[3] s2.Path
+ // field[4] s2.Path.SwIfIndex
+ size += 4
+ // field[4] s2.Path.TableID
+ size += 4
+ // field[4] s2.Path.RpfID
+ size += 4
+ // field[4] s2.Path.Weight
+ size += 1
+ // field[4] s2.Path.Preference
+ size += 1
+ // field[4] s2.Path.Type
+ size += 4
+ // field[4] s2.Path.Flags
+ size += 4
+ // field[4] s2.Path.Proto
+ size += 4
+ // field[4] s2.Path.Nh
+ // field[5] s2.Path.Nh.Address
+ size += 16
+ // field[5] s2.Path.Nh.ViaLabel
+ size += 4
+ // field[5] s2.Path.Nh.ObjID
+ size += 4
+ // field[5] s2.Path.Nh.ClassifyTableIndex
+ size += 4
+ // field[4] s2.Path.NLabels
+ size += 1
+ // field[4] s2.Path.LabelStack
+ for j4 := 0; j4 < 16; j4++ {
+ var s4 fib_types.FibMplsLabel
+ _ = s4
+ if j4 < len(s2.Path.LabelStack) {
+ s4 = s2.Path.LabelStack[j4]
+ }
+ // field[5] s4.IsUniform
+ size += 1
+ // field[5] s4.Label
+ size += 4
+ // field[5] s4.TTL
+ size += 1
+ // field[5] s4.Exp
+ size += 1
+ }
+ }
+ return size
+}
+func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.IsMultipath
+ if m.IsMultipath {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.TableID))
+ pos += 4
+ // field[2] m.Route.EntryFlags
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.EntryFlags))
+ pos += 4
+ // field[2] m.Route.RpfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.RpfID))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Af
+ buf[pos] = uint8(m.Route.Prefix.Af)
+ pos += 1
+ // field[3] m.Route.Prefix.GrpAddressLength
+ o.PutUint16(buf[pos:pos+2], uint16(m.Route.Prefix.GrpAddressLength))
+ pos += 2
+ // field[3] m.Route.Prefix.GrpAddress
+ copy(buf[pos:pos+16], m.Route.Prefix.GrpAddress.XXX_UnionData[:])
+ pos += 16
+ // field[3] m.Route.Prefix.SrcAddress
+ copy(buf[pos:pos+16], m.Route.Prefix.SrcAddress.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Route.NPaths
+ buf[pos] = uint8(len(m.Route.Paths))
+ pos += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var v2 MfibPath
+ if j2 < len(m.Route.Paths) {
+ v2 = m.Route.Paths[j2]
+ }
+ // field[3] v2.ItfFlags
+ o.PutUint32(buf[pos:pos+4], uint32(v2.ItfFlags))
+ pos += 4
+ // field[3] v2.Path
+ // field[4] v2.Path.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.SwIfIndex))
+ pos += 4
+ // field[4] v2.Path.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.TableID))
+ pos += 4
+ // field[4] v2.Path.RpfID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.RpfID))
+ pos += 4
+ // field[4] v2.Path.Weight
+ buf[pos] = uint8(v2.Path.Weight)
+ pos += 1
+ // field[4] v2.Path.Preference
+ buf[pos] = uint8(v2.Path.Preference)
+ pos += 1
+ // field[4] v2.Path.Type
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Type))
+ pos += 4
+ // field[4] v2.Path.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Flags))
+ pos += 4
+ // field[4] v2.Path.Proto
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Proto))
+ pos += 4
+ // field[4] v2.Path.Nh
+ // field[5] v2.Path.Nh.Address
+ copy(buf[pos:pos+16], v2.Path.Nh.Address.XXX_UnionData[:])
+ pos += 16
+ // field[5] v2.Path.Nh.ViaLabel
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Nh.ViaLabel))
+ pos += 4
+ // field[5] v2.Path.Nh.ObjID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Nh.ObjID))
+ pos += 4
+ // field[5] v2.Path.Nh.ClassifyTableIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Nh.ClassifyTableIndex))
+ pos += 4
+ // field[4] v2.Path.NLabels
+ buf[pos] = uint8(v2.Path.NLabels)
+ pos += 1
+ // field[4] v2.Path.LabelStack
+ for j4 := 0; j4 < 16; j4++ {
+ var v4 fib_types.FibMplsLabel
+ if j4 < len(v2.Path.LabelStack) {
+ v4 = v2.Path.LabelStack[j4]
+ }
+ // field[5] v4.IsUniform
+ buf[pos] = uint8(v4.IsUniform)
+ pos += 1
+ // field[5] v4.Label
+ o.PutUint32(buf[pos:pos+4], uint32(v4.Label))
+ pos += 4
+ // field[5] v4.TTL
+ buf[pos] = uint8(v4.TTL)
+ pos += 1
+ // field[5] v4.Exp
+ buf[pos] = uint8(v4.Exp)
+ pos += 1
+ }
+ }
+ return buf, nil
+}
+func (m *IPMrouteAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.IsMultipath
+ m.IsMultipath = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ m.Route.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.EntryFlags
+ m.Route.EntryFlags = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.RpfID
+ m.Route.RpfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Af
+ m.Route.Prefix.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Prefix.GrpAddressLength
+ m.Route.Prefix.GrpAddressLength = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[3] m.Route.Prefix.GrpAddress
+ copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[3] m.Route.Prefix.SrcAddress
+ copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Route.NPaths
+ m.Route.NPaths = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.Paths
+ m.Route.Paths = make([]MfibPath, int(m.Route.NPaths))
+ for j2 := 0; j2 < int(m.Route.NPaths); j2++ {
+ // field[3] m.Route.Paths[j2].ItfFlags
+ m.Route.Paths[j2].ItfFlags = MfibItfFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Path
+ // field[4] m.Route.Paths[j2].Path.SwIfIndex
+ m.Route.Paths[j2].Path.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.TableID
+ m.Route.Paths[j2].Path.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.RpfID
+ m.Route.Paths[j2].Path.RpfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Weight
+ m.Route.Paths[j2].Path.Weight = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].Path.Preference
+ m.Route.Paths[j2].Path.Preference = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].Path.Type
+ m.Route.Paths[j2].Path.Type = fib_types.FibPathType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Flags
+ m.Route.Paths[j2].Path.Flags = fib_types.FibPathFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Proto
+ m.Route.Paths[j2].Path.Proto = fib_types.FibPathNhProto(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Nh
+ // field[5] m.Route.Paths[j2].Path.Nh.Address
+ copy(m.Route.Paths[j2].Path.Nh.Address.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[5] m.Route.Paths[j2].Path.Nh.ViaLabel
+ m.Route.Paths[j2].Path.Nh.ViaLabel = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[5] m.Route.Paths[j2].Path.Nh.ObjID
+ m.Route.Paths[j2].Path.Nh.ObjID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[5] m.Route.Paths[j2].Path.Nh.ClassifyTableIndex
+ m.Route.Paths[j2].Path.Nh.ClassifyTableIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.NLabels
+ m.Route.Paths[j2].Path.NLabels = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].Path.LabelStack
+ for j4 := 0; j4 < 16; j4++ {
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].IsUniform
+ m.Route.Paths[j2].Path.LabelStack[j4].IsUniform = uint8(tmp[pos])
+ pos += 1
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].Label
+ m.Route.Paths[j2].Path.LabelStack[j4].Label = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].TTL
+ m.Route.Paths[j2].Path.LabelStack[j4].TTL = uint8(tmp[pos])
+ pos += 1
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].Exp
+ m.Route.Paths[j2].Path.LabelStack[j4].Exp = uint8(tmp[pos])
+ pos += 1
+ }
+ }
+ return nil
+}
+
// IPMrouteAddDelReply represents VPP binary API message 'ip_mroute_add_del_reply'.
type IPMrouteAddDelReply struct {
- Retval int32
- StatsIndex uint32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
}
func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} }
func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" }
func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPMrouteAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.StatsIndex
+ size += 4
+ return size
+}
+func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.StatsIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.StatsIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *IPMrouteAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.StatsIndex
+ m.StatsIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPMrouteDetails represents VPP binary API message 'ip_mroute_details'.
type IPMrouteDetails struct {
- Route IPMroute
+ Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
}
func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" }
func (*IPMrouteDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPMrouteDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ size += 4
+ // field[2] m.Route.EntryFlags
+ size += 4
+ // field[2] m.Route.RpfID
+ size += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Af
+ size += 1
+ // field[3] m.Route.Prefix.GrpAddressLength
+ size += 2
+ // field[3] m.Route.Prefix.GrpAddress
+ size += 16
+ // field[3] m.Route.Prefix.SrcAddress
+ size += 16
+ // field[2] m.Route.NPaths
+ size += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var s2 MfibPath
+ _ = s2
+ if j2 < len(m.Route.Paths) {
+ s2 = m.Route.Paths[j2]
+ }
+ // field[3] s2.ItfFlags
+ size += 4
+ // field[3] s2.Path
+ // field[4] s2.Path.SwIfIndex
+ size += 4
+ // field[4] s2.Path.TableID
+ size += 4
+ // field[4] s2.Path.RpfID
+ size += 4
+ // field[4] s2.Path.Weight
+ size += 1
+ // field[4] s2.Path.Preference
+ size += 1
+ // field[4] s2.Path.Type
+ size += 4
+ // field[4] s2.Path.Flags
+ size += 4
+ // field[4] s2.Path.Proto
+ size += 4
+ // field[4] s2.Path.Nh
+ // field[5] s2.Path.Nh.Address
+ size += 16
+ // field[5] s2.Path.Nh.ViaLabel
+ size += 4
+ // field[5] s2.Path.Nh.ObjID
+ size += 4
+ // field[5] s2.Path.Nh.ClassifyTableIndex
+ size += 4
+ // field[4] s2.Path.NLabels
+ size += 1
+ // field[4] s2.Path.LabelStack
+ for j4 := 0; j4 < 16; j4++ {
+ var s4 fib_types.FibMplsLabel
+ _ = s4
+ if j4 < len(s2.Path.LabelStack) {
+ s4 = s2.Path.LabelStack[j4]
+ }
+ // field[5] s4.IsUniform
+ size += 1
+ // field[5] s4.Label
+ size += 4
+ // field[5] s4.TTL
+ size += 1
+ // field[5] s4.Exp
+ size += 1
+ }
+ }
+ return size
+}
+func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.TableID))
+ pos += 4
+ // field[2] m.Route.EntryFlags
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.EntryFlags))
+ pos += 4
+ // field[2] m.Route.RpfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.RpfID))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Af
+ buf[pos] = uint8(m.Route.Prefix.Af)
+ pos += 1
+ // field[3] m.Route.Prefix.GrpAddressLength
+ o.PutUint16(buf[pos:pos+2], uint16(m.Route.Prefix.GrpAddressLength))
+ pos += 2
+ // field[3] m.Route.Prefix.GrpAddress
+ copy(buf[pos:pos+16], m.Route.Prefix.GrpAddress.XXX_UnionData[:])
+ pos += 16
+ // field[3] m.Route.Prefix.SrcAddress
+ copy(buf[pos:pos+16], m.Route.Prefix.SrcAddress.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Route.NPaths
+ buf[pos] = uint8(len(m.Route.Paths))
+ pos += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var v2 MfibPath
+ if j2 < len(m.Route.Paths) {
+ v2 = m.Route.Paths[j2]
+ }
+ // field[3] v2.ItfFlags
+ o.PutUint32(buf[pos:pos+4], uint32(v2.ItfFlags))
+ pos += 4
+ // field[3] v2.Path
+ // field[4] v2.Path.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.SwIfIndex))
+ pos += 4
+ // field[4] v2.Path.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.TableID))
+ pos += 4
+ // field[4] v2.Path.RpfID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.RpfID))
+ pos += 4
+ // field[4] v2.Path.Weight
+ buf[pos] = uint8(v2.Path.Weight)
+ pos += 1
+ // field[4] v2.Path.Preference
+ buf[pos] = uint8(v2.Path.Preference)
+ pos += 1
+ // field[4] v2.Path.Type
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Type))
+ pos += 4
+ // field[4] v2.Path.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Flags))
+ pos += 4
+ // field[4] v2.Path.Proto
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Proto))
+ pos += 4
+ // field[4] v2.Path.Nh
+ // field[5] v2.Path.Nh.Address
+ copy(buf[pos:pos+16], v2.Path.Nh.Address.XXX_UnionData[:])
+ pos += 16
+ // field[5] v2.Path.Nh.ViaLabel
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Nh.ViaLabel))
+ pos += 4
+ // field[5] v2.Path.Nh.ObjID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Nh.ObjID))
+ pos += 4
+ // field[5] v2.Path.Nh.ClassifyTableIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Path.Nh.ClassifyTableIndex))
+ pos += 4
+ // field[4] v2.Path.NLabels
+ buf[pos] = uint8(v2.Path.NLabels)
+ pos += 1
+ // field[4] v2.Path.LabelStack
+ for j4 := 0; j4 < 16; j4++ {
+ var v4 fib_types.FibMplsLabel
+ if j4 < len(v2.Path.LabelStack) {
+ v4 = v2.Path.LabelStack[j4]
+ }
+ // field[5] v4.IsUniform
+ buf[pos] = uint8(v4.IsUniform)
+ pos += 1
+ // field[5] v4.Label
+ o.PutUint32(buf[pos:pos+4], uint32(v4.Label))
+ pos += 4
+ // field[5] v4.TTL
+ buf[pos] = uint8(v4.TTL)
+ pos += 1
+ // field[5] v4.Exp
+ buf[pos] = uint8(v4.Exp)
+ pos += 1
+ }
+ }
+ return buf, nil
+}
+func (m *IPMrouteDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ m.Route.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.EntryFlags
+ m.Route.EntryFlags = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.RpfID
+ m.Route.RpfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Af
+ m.Route.Prefix.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Prefix.GrpAddressLength
+ m.Route.Prefix.GrpAddressLength = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[3] m.Route.Prefix.GrpAddress
+ copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[3] m.Route.Prefix.SrcAddress
+ copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Route.NPaths
+ m.Route.NPaths = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.Paths
+ m.Route.Paths = make([]MfibPath, int(m.Route.NPaths))
+ for j2 := 0; j2 < int(m.Route.NPaths); j2++ {
+ // field[3] m.Route.Paths[j2].ItfFlags
+ m.Route.Paths[j2].ItfFlags = MfibItfFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Path
+ // field[4] m.Route.Paths[j2].Path.SwIfIndex
+ m.Route.Paths[j2].Path.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.TableID
+ m.Route.Paths[j2].Path.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.RpfID
+ m.Route.Paths[j2].Path.RpfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Weight
+ m.Route.Paths[j2].Path.Weight = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].Path.Preference
+ m.Route.Paths[j2].Path.Preference = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].Path.Type
+ m.Route.Paths[j2].Path.Type = fib_types.FibPathType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Flags
+ m.Route.Paths[j2].Path.Flags = fib_types.FibPathFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Proto
+ m.Route.Paths[j2].Path.Proto = fib_types.FibPathNhProto(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.Nh
+ // field[5] m.Route.Paths[j2].Path.Nh.Address
+ copy(m.Route.Paths[j2].Path.Nh.Address.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[5] m.Route.Paths[j2].Path.Nh.ViaLabel
+ m.Route.Paths[j2].Path.Nh.ViaLabel = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[5] m.Route.Paths[j2].Path.Nh.ObjID
+ m.Route.Paths[j2].Path.Nh.ObjID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[5] m.Route.Paths[j2].Path.Nh.ClassifyTableIndex
+ m.Route.Paths[j2].Path.Nh.ClassifyTableIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Path.NLabels
+ m.Route.Paths[j2].Path.NLabels = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].Path.LabelStack
+ for j4 := 0; j4 < 16; j4++ {
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].IsUniform
+ m.Route.Paths[j2].Path.LabelStack[j4].IsUniform = uint8(tmp[pos])
+ pos += 1
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].Label
+ m.Route.Paths[j2].Path.LabelStack[j4].Label = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].TTL
+ m.Route.Paths[j2].Path.LabelStack[j4].TTL = uint8(tmp[pos])
+ pos += 1
+ // field[5] m.Route.Paths[j2].Path.LabelStack[j4].Exp
+ m.Route.Paths[j2].Path.LabelStack[j4].Exp = uint8(tmp[pos])
+ pos += 1
+ }
+ }
+ return nil
+}
+
// IPMrouteDump represents VPP binary API message 'ip_mroute_dump'.
type IPMrouteDump struct {
- Table IPTable
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
}
func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} }
func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" }
func (*IPMrouteDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPMrouteDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPMrouteDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// IPMtableDetails represents VPP binary API message 'ip_mtable_details'.
type IPMtableDetails struct {
- Table IPTable
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
}
func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} }
func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" }
func (*IPMtableDetails) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPMtableDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPMtableDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// IPMtableDump represents VPP binary API message 'ip_mtable_dump'.
type IPMtableDump struct{}
func (*IPMtableDump) GetCrcString() string { return "51077d14" }
func (*IPMtableDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPMtableDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
+}
+func (m *IPMtableDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
+}
+
// IPPuntPolice represents VPP binary API message 'ip_punt_police'.
type IPPuntPolice struct {
- PolicerIndex uint32
- IsAdd bool
- IsIP6 bool
+ PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
}
func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} }
func (*IPPuntPolice) GetCrcString() string { return "db867cea" }
func (*IPPuntPolice) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPPuntPolice) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.PolicerIndex
+ size += 4
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.IsIP6
+ size += 1
+ return size
+}
+func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.PolicerIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.PolicerIndex))
+ pos += 4
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.IsIP6
+ if m.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPPuntPolice) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.PolicerIndex
+ m.PolicerIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.IsIP6
+ m.IsIP6 = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPPuntPoliceReply represents VPP binary API message 'ip_punt_police_reply'.
type IPPuntPoliceReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} }
func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" }
func (*IPPuntPoliceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPPuntPoliceReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPPuntPoliceReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPPuntRedirect represents VPP binary API message 'ip_punt_redirect'.
type IPPuntRedirect struct {
- Punt PuntRedirect
- IsAdd bool
+ Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
}
func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" }
func (*IPPuntRedirect) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPPuntRedirect) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Punt
+ // field[2] m.Punt.RxSwIfIndex
+ size += 4
+ // field[2] m.Punt.TxSwIfIndex
+ size += 4
+ // field[2] m.Punt.Nh
+ // field[3] m.Punt.Nh.Af
+ size += 1
+ // field[3] m.Punt.Nh.Un
+ size += 16
+ // field[1] m.IsAdd
+ size += 1
+ return size
+}
+func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Punt
+ // field[2] m.Punt.RxSwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.Punt.RxSwIfIndex))
+ pos += 4
+ // field[2] m.Punt.TxSwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.Punt.TxSwIfIndex))
+ pos += 4
+ // field[2] m.Punt.Nh
+ // field[3] m.Punt.Nh.Af
+ buf[pos] = uint8(m.Punt.Nh.Af)
+ pos += 1
+ // field[3] m.Punt.Nh.Un
+ copy(buf[pos:pos+16], m.Punt.Nh.Un.XXX_UnionData[:])
+ pos += 16
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPPuntRedirect) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Punt
+ // field[2] m.Punt.RxSwIfIndex
+ m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Punt.TxSwIfIndex
+ m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Punt.Nh
+ // field[3] m.Punt.Nh.Af
+ m.Punt.Nh.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Punt.Nh.Un
+ copy(m.Punt.Nh.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPPuntRedirectDetails represents VPP binary API message 'ip_punt_redirect_details'.
type IPPuntRedirectDetails struct {
- Punt PuntRedirect
+ Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
}
func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" }
func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPPuntRedirectDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Punt
+ // field[2] m.Punt.RxSwIfIndex
+ size += 4
+ // field[2] m.Punt.TxSwIfIndex
+ size += 4
+ // field[2] m.Punt.Nh
+ // field[3] m.Punt.Nh.Af
+ size += 1
+ // field[3] m.Punt.Nh.Un
+ size += 16
+ return size
+}
+func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Punt
+ // field[2] m.Punt.RxSwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.Punt.RxSwIfIndex))
+ pos += 4
+ // field[2] m.Punt.TxSwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.Punt.TxSwIfIndex))
+ pos += 4
+ // field[2] m.Punt.Nh
+ // field[3] m.Punt.Nh.Af
+ buf[pos] = uint8(m.Punt.Nh.Af)
+ pos += 1
+ // field[3] m.Punt.Nh.Un
+ copy(buf[pos:pos+16], m.Punt.Nh.Un.XXX_UnionData[:])
+ pos += 16
+ return buf, nil
+}
+func (m *IPPuntRedirectDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Punt
+ // field[2] m.Punt.RxSwIfIndex
+ m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Punt.TxSwIfIndex
+ m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Punt.Nh
+ // field[3] m.Punt.Nh.Af
+ m.Punt.Nh.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Punt.Nh.Un
+ copy(m.Punt.Nh.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ return nil
+}
+
// IPPuntRedirectDump represents VPP binary API message 'ip_punt_redirect_dump'.
type IPPuntRedirectDump struct {
- SwIfIndex InterfaceIndex
- IsIPv6 bool
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
}
func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} }
func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" }
func (*IPPuntRedirectDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPPuntRedirectDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IsIPv6
+ size += 1
+ return size
+}
+func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IsIPv6
+ if m.IsIPv6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPPuntRedirectDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIPv6
+ m.IsIPv6 = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPPuntRedirectReply represents VPP binary API message 'ip_punt_redirect_reply'.
type IPPuntRedirectReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} }
func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" }
func (*IPPuntRedirectReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPPuntRedirectReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPPuntRedirectReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPReassemblyEnableDisable represents VPP binary API message 'ip_reassembly_enable_disable'.
type IPReassemblyEnableDisable struct {
- SwIfIndex InterfaceIndex
- EnableIP4 bool
- EnableIP6 bool
- Type IPReassType
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
+ EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
+ Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
}
func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" }
func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPReassemblyEnableDisable) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.EnableIP4
+ size += 1
+ // field[1] m.EnableIP6
+ size += 1
+ // field[1] m.Type
+ size += 4
+ return size
+}
+func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.EnableIP4
+ if m.EnableIP4 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.EnableIP6
+ if m.EnableIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Type
+ o.PutUint32(buf[pos:pos+4], uint32(m.Type))
+ pos += 4
+ return buf, nil
+}
+func (m *IPReassemblyEnableDisable) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.EnableIP4
+ m.EnableIP4 = tmp[pos] != 0
+ pos += 1
+ // field[1] m.EnableIP6
+ m.EnableIP6 = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Type
+ m.Type = IPReassType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPReassemblyEnableDisableReply represents VPP binary API message 'ip_reassembly_enable_disable_reply'.
type IPReassemblyEnableDisableReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPReassemblyEnableDisableReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPReassemblyEnableDisableReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPReassemblyGet represents VPP binary API message 'ip_reassembly_get'.
type IPReassemblyGet struct {
- IsIP6 bool
- Type IPReassType
+ IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
+ Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
}
func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} }
func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" }
func (*IPReassemblyGet) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPReassemblyGet) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsIP6
+ size += 1
+ // field[1] m.Type
+ size += 4
+ return size
+}
+func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsIP6
+ if m.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Type
+ o.PutUint32(buf[pos:pos+4], uint32(m.Type))
+ pos += 4
+ return buf, nil
+}
+func (m *IPReassemblyGet) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsIP6
+ m.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Type
+ m.Type = IPReassType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPReassemblyGetReply represents VPP binary API message 'ip_reassembly_get_reply'.
type IPReassemblyGetReply struct {
- Retval int32
- TimeoutMs uint32
- MaxReassemblies uint32
- MaxReassemblyLength uint32
- ExpireWalkIntervalMs uint32
- IsIP6 bool
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
+ MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
+ MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
+ ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
+ IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
}
func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} }
func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" }
func (*IPReassemblyGetReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPReassemblyGetReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.TimeoutMs
+ size += 4
+ // field[1] m.MaxReassemblies
+ size += 4
+ // field[1] m.MaxReassemblyLength
+ size += 4
+ // field[1] m.ExpireWalkIntervalMs
+ size += 4
+ // field[1] m.IsIP6
+ size += 1
+ return size
+}
+func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.TimeoutMs
+ o.PutUint32(buf[pos:pos+4], uint32(m.TimeoutMs))
+ pos += 4
+ // field[1] m.MaxReassemblies
+ o.PutUint32(buf[pos:pos+4], uint32(m.MaxReassemblies))
+ pos += 4
+ // field[1] m.MaxReassemblyLength
+ o.PutUint32(buf[pos:pos+4], uint32(m.MaxReassemblyLength))
+ pos += 4
+ // field[1] m.ExpireWalkIntervalMs
+ o.PutUint32(buf[pos:pos+4], uint32(m.ExpireWalkIntervalMs))
+ pos += 4
+ // field[1] m.IsIP6
+ if m.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *IPReassemblyGetReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.TimeoutMs
+ m.TimeoutMs = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.MaxReassemblies
+ m.MaxReassemblies = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.MaxReassemblyLength
+ m.MaxReassemblyLength = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.ExpireWalkIntervalMs
+ m.ExpireWalkIntervalMs = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIP6
+ m.IsIP6 = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// IPReassemblySet represents VPP binary API message 'ip_reassembly_set'.
type IPReassemblySet struct {
- TimeoutMs uint32
- MaxReassemblies uint32
- MaxReassemblyLength uint32
- ExpireWalkIntervalMs uint32
- IsIP6 bool
- Type IPReassType
+ TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
+ MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
+ MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
+ ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
+ IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
+ Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
}
func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} }
func (*IPReassemblySet) GetCrcString() string { return "16467d25" }
func (*IPReassemblySet) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPReassemblySet) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.TimeoutMs
+ size += 4
+ // field[1] m.MaxReassemblies
+ size += 4
+ // field[1] m.MaxReassemblyLength
+ size += 4
+ // field[1] m.ExpireWalkIntervalMs
+ size += 4
+ // field[1] m.IsIP6
+ size += 1
+ // field[1] m.Type
+ size += 4
+ return size
+}
+func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.TimeoutMs
+ o.PutUint32(buf[pos:pos+4], uint32(m.TimeoutMs))
+ pos += 4
+ // field[1] m.MaxReassemblies
+ o.PutUint32(buf[pos:pos+4], uint32(m.MaxReassemblies))
+ pos += 4
+ // field[1] m.MaxReassemblyLength
+ o.PutUint32(buf[pos:pos+4], uint32(m.MaxReassemblyLength))
+ pos += 4
+ // field[1] m.ExpireWalkIntervalMs
+ o.PutUint32(buf[pos:pos+4], uint32(m.ExpireWalkIntervalMs))
+ pos += 4
+ // field[1] m.IsIP6
+ if m.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Type
+ o.PutUint32(buf[pos:pos+4], uint32(m.Type))
+ pos += 4
+ return buf, nil
+}
+func (m *IPReassemblySet) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.TimeoutMs
+ m.TimeoutMs = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.MaxReassemblies
+ m.MaxReassemblies = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.MaxReassemblyLength
+ m.MaxReassemblyLength = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.ExpireWalkIntervalMs
+ m.ExpireWalkIntervalMs = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIP6
+ m.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Type
+ m.Type = IPReassType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPReassemblySetReply represents VPP binary API message 'ip_reassembly_set_reply'.
type IPReassemblySetReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} }
func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" }
func (*IPReassemblySetReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPReassemblySetReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPReassemblySetReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPRouteAddDel represents VPP binary API message 'ip_route_add_del'.
type IPRouteAddDel struct {
- IsAdd bool
- IsMultipath bool
- Route IPRoute
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
+ Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
}
func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" }
func (*IPRouteAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPRouteAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.IsMultipath
+ size += 1
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ size += 4
+ // field[2] m.Route.StatsIndex
+ size += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ size += 1
+ // field[4] m.Route.Prefix.Address.Un
+ size += 16
+ // field[3] m.Route.Prefix.Len
+ size += 1
+ // field[2] m.Route.NPaths
+ size += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var s2 fib_types.FibPath
+ _ = s2
+ if j2 < len(m.Route.Paths) {
+ s2 = m.Route.Paths[j2]
+ }
+ // field[3] s2.SwIfIndex
+ size += 4
+ // field[3] s2.TableID
+ size += 4
+ // field[3] s2.RpfID
+ size += 4
+ // field[3] s2.Weight
+ size += 1
+ // field[3] s2.Preference
+ size += 1
+ // field[3] s2.Type
+ size += 4
+ // field[3] s2.Flags
+ size += 4
+ // field[3] s2.Proto
+ size += 4
+ // field[3] s2.Nh
+ // field[4] s2.Nh.Address
+ size += 16
+ // field[4] s2.Nh.ViaLabel
+ size += 4
+ // field[4] s2.Nh.ObjID
+ size += 4
+ // field[4] s2.Nh.ClassifyTableIndex
+ size += 4
+ // field[3] s2.NLabels
+ size += 1
+ // field[3] s2.LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ var s3 fib_types.FibMplsLabel
+ _ = s3
+ if j3 < len(s2.LabelStack) {
+ s3 = s2.LabelStack[j3]
+ }
+ // field[4] s3.IsUniform
+ size += 1
+ // field[4] s3.Label
+ size += 4
+ // field[4] s3.TTL
+ size += 1
+ // field[4] s3.Exp
+ size += 1
+ }
+ }
+ return size
+}
+func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.IsMultipath
+ if m.IsMultipath {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.TableID))
+ pos += 4
+ // field[2] m.Route.StatsIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.StatsIndex))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ buf[pos] = uint8(m.Route.Prefix.Address.Af)
+ pos += 1
+ // field[4] m.Route.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Route.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[3] m.Route.Prefix.Len
+ buf[pos] = uint8(m.Route.Prefix.Len)
+ pos += 1
+ // field[2] m.Route.NPaths
+ buf[pos] = uint8(len(m.Route.Paths))
+ pos += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var v2 fib_types.FibPath
+ if j2 < len(m.Route.Paths) {
+ v2 = m.Route.Paths[j2]
+ }
+ // field[3] v2.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.SwIfIndex))
+ pos += 4
+ // field[3] v2.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.TableID))
+ pos += 4
+ // field[3] v2.RpfID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.RpfID))
+ pos += 4
+ // field[3] v2.Weight
+ buf[pos] = uint8(v2.Weight)
+ pos += 1
+ // field[3] v2.Preference
+ buf[pos] = uint8(v2.Preference)
+ pos += 1
+ // field[3] v2.Type
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Type))
+ pos += 4
+ // field[3] v2.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Flags))
+ pos += 4
+ // field[3] v2.Proto
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Proto))
+ pos += 4
+ // field[3] v2.Nh
+ // field[4] v2.Nh.Address
+ copy(buf[pos:pos+16], v2.Nh.Address.XXX_UnionData[:])
+ pos += 16
+ // field[4] v2.Nh.ViaLabel
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ViaLabel))
+ pos += 4
+ // field[4] v2.Nh.ObjID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ObjID))
+ pos += 4
+ // field[4] v2.Nh.ClassifyTableIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ClassifyTableIndex))
+ pos += 4
+ // field[3] v2.NLabels
+ buf[pos] = uint8(v2.NLabels)
+ pos += 1
+ // field[3] v2.LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ var v3 fib_types.FibMplsLabel
+ if j3 < len(v2.LabelStack) {
+ v3 = v2.LabelStack[j3]
+ }
+ // field[4] v3.IsUniform
+ buf[pos] = uint8(v3.IsUniform)
+ pos += 1
+ // field[4] v3.Label
+ o.PutUint32(buf[pos:pos+4], uint32(v3.Label))
+ pos += 4
+ // field[4] v3.TTL
+ buf[pos] = uint8(v3.TTL)
+ pos += 1
+ // field[4] v3.Exp
+ buf[pos] = uint8(v3.Exp)
+ pos += 1
+ }
+ }
+ return buf, nil
+}
+func (m *IPRouteAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.IsMultipath
+ m.IsMultipath = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ m.Route.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.StatsIndex
+ m.Route.StatsIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ m.Route.Prefix.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Prefix.Address.Un
+ copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[3] m.Route.Prefix.Len
+ m.Route.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.NPaths
+ m.Route.NPaths = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.Paths
+ m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
+ for j2 := 0; j2 < int(m.Route.NPaths); j2++ {
+ // field[3] m.Route.Paths[j2].SwIfIndex
+ m.Route.Paths[j2].SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].TableID
+ m.Route.Paths[j2].TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].RpfID
+ m.Route.Paths[j2].RpfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Weight
+ m.Route.Paths[j2].Weight = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].Preference
+ m.Route.Paths[j2].Preference = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].Type
+ m.Route.Paths[j2].Type = fib_types.FibPathType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Flags
+ m.Route.Paths[j2].Flags = fib_types.FibPathFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Proto
+ m.Route.Paths[j2].Proto = fib_types.FibPathNhProto(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Nh
+ // field[4] m.Route.Paths[j2].Nh.Address
+ copy(m.Route.Paths[j2].Nh.Address.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[4] m.Route.Paths[j2].Nh.ViaLabel
+ m.Route.Paths[j2].Nh.ViaLabel = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Nh.ObjID
+ m.Route.Paths[j2].Nh.ObjID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Nh.ClassifyTableIndex
+ m.Route.Paths[j2].Nh.ClassifyTableIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].NLabels
+ m.Route.Paths[j2].NLabels = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ // field[4] m.Route.Paths[j2].LabelStack[j3].IsUniform
+ m.Route.Paths[j2].LabelStack[j3].IsUniform = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].LabelStack[j3].Label
+ m.Route.Paths[j2].LabelStack[j3].Label = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].LabelStack[j3].TTL
+ m.Route.Paths[j2].LabelStack[j3].TTL = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].LabelStack[j3].Exp
+ m.Route.Paths[j2].LabelStack[j3].Exp = uint8(tmp[pos])
+ pos += 1
+ }
+ }
+ return nil
+}
+
// IPRouteAddDelReply represents VPP binary API message 'ip_route_add_del_reply'.
type IPRouteAddDelReply struct {
- Retval int32
- StatsIndex uint32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
}
func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} }
func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" }
func (*IPRouteAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPRouteAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.StatsIndex
+ size += 4
+ return size
+}
+func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.StatsIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.StatsIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *IPRouteAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.StatsIndex
+ m.StatsIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPRouteDetails represents VPP binary API message 'ip_route_details'.
type IPRouteDetails struct {
- Route IPRoute
+ Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
}
func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
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 (m *IPRouteDump) Reset() { *m = IPRouteDump{} }
+func (m *IPRouteDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ size += 4
+ // field[2] m.Route.StatsIndex
+ size += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ size += 1
+ // field[4] m.Route.Prefix.Address.Un
+ size += 16
+ // field[3] m.Route.Prefix.Len
+ size += 1
+ // field[2] m.Route.NPaths
+ size += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var s2 fib_types.FibPath
+ _ = s2
+ if j2 < len(m.Route.Paths) {
+ s2 = m.Route.Paths[j2]
+ }
+ // field[3] s2.SwIfIndex
+ size += 4
+ // field[3] s2.TableID
+ size += 4
+ // field[3] s2.RpfID
+ size += 4
+ // field[3] s2.Weight
+ size += 1
+ // field[3] s2.Preference
+ size += 1
+ // field[3] s2.Type
+ size += 4
+ // field[3] s2.Flags
+ size += 4
+ // field[3] s2.Proto
+ size += 4
+ // field[3] s2.Nh
+ // field[4] s2.Nh.Address
+ size += 16
+ // field[4] s2.Nh.ViaLabel
+ size += 4
+ // field[4] s2.Nh.ObjID
+ size += 4
+ // field[4] s2.Nh.ClassifyTableIndex
+ size += 4
+ // field[3] s2.NLabels
+ size += 1
+ // field[3] s2.LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ var s3 fib_types.FibMplsLabel
+ _ = s3
+ if j3 < len(s2.LabelStack) {
+ s3 = s2.LabelStack[j3]
+ }
+ // field[4] s3.IsUniform
+ size += 1
+ // field[4] s3.Label
+ size += 4
+ // field[4] s3.TTL
+ size += 1
+ // field[4] s3.Exp
+ size += 1
+ }
+ }
+ return size
+}
+func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.TableID))
+ pos += 4
+ // field[2] m.Route.StatsIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.StatsIndex))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ buf[pos] = uint8(m.Route.Prefix.Address.Af)
+ pos += 1
+ // field[4] m.Route.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Route.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[3] m.Route.Prefix.Len
+ buf[pos] = uint8(m.Route.Prefix.Len)
+ pos += 1
+ // field[2] m.Route.NPaths
+ buf[pos] = uint8(len(m.Route.Paths))
+ pos += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var v2 fib_types.FibPath
+ if j2 < len(m.Route.Paths) {
+ v2 = m.Route.Paths[j2]
+ }
+ // field[3] v2.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.SwIfIndex))
+ pos += 4
+ // field[3] v2.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.TableID))
+ pos += 4
+ // field[3] v2.RpfID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.RpfID))
+ pos += 4
+ // field[3] v2.Weight
+ buf[pos] = uint8(v2.Weight)
+ pos += 1
+ // field[3] v2.Preference
+ buf[pos] = uint8(v2.Preference)
+ pos += 1
+ // field[3] v2.Type
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Type))
+ pos += 4
+ // field[3] v2.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Flags))
+ pos += 4
+ // field[3] v2.Proto
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Proto))
+ pos += 4
+ // field[3] v2.Nh
+ // field[4] v2.Nh.Address
+ copy(buf[pos:pos+16], v2.Nh.Address.XXX_UnionData[:])
+ pos += 16
+ // field[4] v2.Nh.ViaLabel
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ViaLabel))
+ pos += 4
+ // field[4] v2.Nh.ObjID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ObjID))
+ pos += 4
+ // field[4] v2.Nh.ClassifyTableIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ClassifyTableIndex))
+ pos += 4
+ // field[3] v2.NLabels
+ buf[pos] = uint8(v2.NLabels)
+ pos += 1
+ // field[3] v2.LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ var v3 fib_types.FibMplsLabel
+ if j3 < len(v2.LabelStack) {
+ v3 = v2.LabelStack[j3]
+ }
+ // field[4] v3.IsUniform
+ buf[pos] = uint8(v3.IsUniform)
+ pos += 1
+ // field[4] v3.Label
+ o.PutUint32(buf[pos:pos+4], uint32(v3.Label))
+ pos += 4
+ // field[4] v3.TTL
+ buf[pos] = uint8(v3.TTL)
+ pos += 1
+ // field[4] v3.Exp
+ buf[pos] = uint8(v3.Exp)
+ pos += 1
+ }
+ }
+ return buf, nil
+}
+func (m *IPRouteDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ m.Route.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.StatsIndex
+ m.Route.StatsIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ m.Route.Prefix.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Prefix.Address.Un
+ copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[3] m.Route.Prefix.Len
+ m.Route.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.NPaths
+ m.Route.NPaths = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.Paths
+ m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
+ for j2 := 0; j2 < int(m.Route.NPaths); j2++ {
+ // field[3] m.Route.Paths[j2].SwIfIndex
+ m.Route.Paths[j2].SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].TableID
+ m.Route.Paths[j2].TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].RpfID
+ m.Route.Paths[j2].RpfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Weight
+ m.Route.Paths[j2].Weight = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].Preference
+ m.Route.Paths[j2].Preference = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].Type
+ m.Route.Paths[j2].Type = fib_types.FibPathType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Flags
+ m.Route.Paths[j2].Flags = fib_types.FibPathFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Proto
+ m.Route.Paths[j2].Proto = fib_types.FibPathNhProto(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Nh
+ // field[4] m.Route.Paths[j2].Nh.Address
+ copy(m.Route.Paths[j2].Nh.Address.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[4] m.Route.Paths[j2].Nh.ViaLabel
+ m.Route.Paths[j2].Nh.ViaLabel = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Nh.ObjID
+ m.Route.Paths[j2].Nh.ObjID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Nh.ClassifyTableIndex
+ m.Route.Paths[j2].Nh.ClassifyTableIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].NLabels
+ m.Route.Paths[j2].NLabels = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ // field[4] m.Route.Paths[j2].LabelStack[j3].IsUniform
+ m.Route.Paths[j2].LabelStack[j3].IsUniform = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].LabelStack[j3].Label
+ m.Route.Paths[j2].LabelStack[j3].Label = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].LabelStack[j3].TTL
+ m.Route.Paths[j2].LabelStack[j3].TTL = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].LabelStack[j3].Exp
+ m.Route.Paths[j2].LabelStack[j3].Exp = uint8(tmp[pos])
+ pos += 1
+ }
+ }
+ return nil
+}
+
+// IPRouteDump represents VPP binary API message 'ip_route_dump'.
+type IPRouteDump struct {
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
+}
+
+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 }
+func (m *IPRouteDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPRouteDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
+// IPRouteLookup represents VPP binary API message 'ip_route_lookup'.
+type IPRouteLookup struct {
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
+ Prefix fib_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
+}
+
+func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} }
+func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
+func (*IPRouteLookup) GetCrcString() string { return "e2986185" }
+func (*IPRouteLookup) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *IPRouteLookup) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.TableID
+ size += 4
+ // field[1] m.Exact
+ size += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ size += 1
+ // field[3] m.Prefix.Address.Un
+ size += 16
+ // field[2] m.Prefix.Len
+ size += 1
+ return size
+}
+func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.TableID))
+ pos += 4
+ // field[1] m.Exact
+ buf[pos] = uint8(m.Exact)
+ pos += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ buf[pos] = uint8(m.Prefix.Address.Af)
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Prefix.Len
+ buf[pos] = uint8(m.Prefix.Len)
+ pos += 1
+ return buf, nil
+}
+func (m *IPRouteLookup) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.TableID
+ m.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Exact
+ m.Exact = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ m.Prefix.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Prefix.Len
+ m.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ return nil
+}
+
+// IPRouteLookupReply represents VPP binary API message 'ip_route_lookup_reply'.
+type IPRouteLookupReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
+}
+
+func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} }
+func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
+func (*IPRouteLookupReply) GetCrcString() string { return "ae99de8e" }
+func (*IPRouteLookupReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *IPRouteLookupReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ size += 4
+ // field[2] m.Route.StatsIndex
+ size += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ size += 1
+ // field[4] m.Route.Prefix.Address.Un
+ size += 16
+ // field[3] m.Route.Prefix.Len
+ size += 1
+ // field[2] m.Route.NPaths
+ size += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var s2 fib_types.FibPath
+ _ = s2
+ if j2 < len(m.Route.Paths) {
+ s2 = m.Route.Paths[j2]
+ }
+ // field[3] s2.SwIfIndex
+ size += 4
+ // field[3] s2.TableID
+ size += 4
+ // field[3] s2.RpfID
+ size += 4
+ // field[3] s2.Weight
+ size += 1
+ // field[3] s2.Preference
+ size += 1
+ // field[3] s2.Type
+ size += 4
+ // field[3] s2.Flags
+ size += 4
+ // field[3] s2.Proto
+ size += 4
+ // field[3] s2.Nh
+ // field[4] s2.Nh.Address
+ size += 16
+ // field[4] s2.Nh.ViaLabel
+ size += 4
+ // field[4] s2.Nh.ObjID
+ size += 4
+ // field[4] s2.Nh.ClassifyTableIndex
+ size += 4
+ // field[3] s2.NLabels
+ size += 1
+ // field[3] s2.LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ var s3 fib_types.FibMplsLabel
+ _ = s3
+ if j3 < len(s2.LabelStack) {
+ s3 = s2.LabelStack[j3]
+ }
+ // field[4] s3.IsUniform
+ size += 1
+ // field[4] s3.Label
+ size += 4
+ // field[4] s3.TTL
+ size += 1
+ // field[4] s3.Exp
+ size += 1
+ }
+ }
+ return size
+}
+func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.TableID))
+ pos += 4
+ // field[2] m.Route.StatsIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.Route.StatsIndex))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ buf[pos] = uint8(m.Route.Prefix.Address.Af)
+ pos += 1
+ // field[4] m.Route.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Route.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[3] m.Route.Prefix.Len
+ buf[pos] = uint8(m.Route.Prefix.Len)
+ pos += 1
+ // field[2] m.Route.NPaths
+ buf[pos] = uint8(len(m.Route.Paths))
+ pos += 1
+ // field[2] m.Route.Paths
+ for j2 := 0; j2 < len(m.Route.Paths); j2++ {
+ var v2 fib_types.FibPath
+ if j2 < len(m.Route.Paths) {
+ v2 = m.Route.Paths[j2]
+ }
+ // field[3] v2.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.SwIfIndex))
+ pos += 4
+ // field[3] v2.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.TableID))
+ pos += 4
+ // field[3] v2.RpfID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.RpfID))
+ pos += 4
+ // field[3] v2.Weight
+ buf[pos] = uint8(v2.Weight)
+ pos += 1
+ // field[3] v2.Preference
+ buf[pos] = uint8(v2.Preference)
+ pos += 1
+ // field[3] v2.Type
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Type))
+ pos += 4
+ // field[3] v2.Flags
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Flags))
+ pos += 4
+ // field[3] v2.Proto
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Proto))
+ pos += 4
+ // field[3] v2.Nh
+ // field[4] v2.Nh.Address
+ copy(buf[pos:pos+16], v2.Nh.Address.XXX_UnionData[:])
+ pos += 16
+ // field[4] v2.Nh.ViaLabel
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ViaLabel))
+ pos += 4
+ // field[4] v2.Nh.ObjID
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ObjID))
+ pos += 4
+ // field[4] v2.Nh.ClassifyTableIndex
+ o.PutUint32(buf[pos:pos+4], uint32(v2.Nh.ClassifyTableIndex))
+ pos += 4
+ // field[3] v2.NLabels
+ buf[pos] = uint8(v2.NLabels)
+ pos += 1
+ // field[3] v2.LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ var v3 fib_types.FibMplsLabel
+ if j3 < len(v2.LabelStack) {
+ v3 = v2.LabelStack[j3]
+ }
+ // field[4] v3.IsUniform
+ buf[pos] = uint8(v3.IsUniform)
+ pos += 1
+ // field[4] v3.Label
+ o.PutUint32(buf[pos:pos+4], uint32(v3.Label))
+ pos += 4
+ // field[4] v3.TTL
+ buf[pos] = uint8(v3.TTL)
+ pos += 1
+ // field[4] v3.Exp
+ buf[pos] = uint8(v3.Exp)
+ pos += 1
+ }
+ }
+ return buf, nil
+}
+func (m *IPRouteLookupReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Route
+ // field[2] m.Route.TableID
+ m.Route.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.StatsIndex
+ m.Route.StatsIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Route.Prefix
+ // field[3] m.Route.Prefix.Address
+ // field[4] m.Route.Prefix.Address.Af
+ m.Route.Prefix.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Prefix.Address.Un
+ copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[3] m.Route.Prefix.Len
+ m.Route.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.NPaths
+ m.Route.NPaths = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.Route.Paths
+ m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
+ for j2 := 0; j2 < int(m.Route.NPaths); j2++ {
+ // field[3] m.Route.Paths[j2].SwIfIndex
+ m.Route.Paths[j2].SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].TableID
+ m.Route.Paths[j2].TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].RpfID
+ m.Route.Paths[j2].RpfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Weight
+ m.Route.Paths[j2].Weight = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].Preference
+ m.Route.Paths[j2].Preference = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].Type
+ m.Route.Paths[j2].Type = fib_types.FibPathType(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Flags
+ m.Route.Paths[j2].Flags = fib_types.FibPathFlags(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Proto
+ m.Route.Paths[j2].Proto = fib_types.FibPathNhProto(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].Nh
+ // field[4] m.Route.Paths[j2].Nh.Address
+ copy(m.Route.Paths[j2].Nh.Address.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[4] m.Route.Paths[j2].Nh.ViaLabel
+ m.Route.Paths[j2].Nh.ViaLabel = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Nh.ObjID
+ m.Route.Paths[j2].Nh.ObjID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].Nh.ClassifyTableIndex
+ m.Route.Paths[j2].Nh.ClassifyTableIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[3] m.Route.Paths[j2].NLabels
+ m.Route.Paths[j2].NLabels = uint8(tmp[pos])
+ pos += 1
+ // field[3] m.Route.Paths[j2].LabelStack
+ for j3 := 0; j3 < 16; j3++ {
+ // field[4] m.Route.Paths[j2].LabelStack[j3].IsUniform
+ m.Route.Paths[j2].LabelStack[j3].IsUniform = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].LabelStack[j3].Label
+ m.Route.Paths[j2].LabelStack[j3].Label = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[4] m.Route.Paths[j2].LabelStack[j3].TTL
+ m.Route.Paths[j2].LabelStack[j3].TTL = uint8(tmp[pos])
+ pos += 1
+ // field[4] m.Route.Paths[j2].LabelStack[j3].Exp
+ m.Route.Paths[j2].LabelStack[j3].Exp = uint8(tmp[pos])
+ pos += 1
+ }
+ }
+ return nil
+}
+
// IPSourceAndPortRangeCheckAddDel represents VPP binary API message 'ip_source_and_port_range_check_add_del'.
type IPSourceAndPortRangeCheckAddDel struct {
- IsAdd bool
- Prefix Prefix
- NumberOfRanges uint8
- LowPorts []uint16 `struc:"[32]uint16"`
- HighPorts []uint16 `struc:"[32]uint16"`
- VrfID uint32
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ Prefix fib_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
+ NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
+ LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty" struc:"[32]uint16"`
+ HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty" struc:"[32]uint16"`
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
}
func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" }
func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPSourceAndPortRangeCheckAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ size += 1
+ // field[3] m.Prefix.Address.Un
+ size += 16
+ // field[2] m.Prefix.Len
+ size += 1
+ // field[1] m.NumberOfRanges
+ size += 1
+ // field[1] m.LowPorts
+ size += 64
+ // field[1] m.HighPorts
+ size += 64
+ // field[1] m.VrfID
+ size += 4
+ return size
+}
+func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ buf[pos] = uint8(m.Prefix.Address.Af)
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Prefix.Len
+ buf[pos] = uint8(m.Prefix.Len)
+ pos += 1
+ // field[1] m.NumberOfRanges
+ buf[pos] = uint8(m.NumberOfRanges)
+ pos += 1
+ // field[1] m.LowPorts
+ for i := 0; i < 32; i++ {
+ var x uint16
+ if i < len(m.LowPorts) {
+ x = uint16(m.LowPorts[i])
+ }
+ o.PutUint16(buf[pos:pos+2], uint16(x))
+ pos += 2
+ }
+ // field[1] m.HighPorts
+ for i := 0; i < 32; i++ {
+ var x uint16
+ if i < len(m.HighPorts) {
+ x = uint16(m.HighPorts[i])
+ }
+ o.PutUint16(buf[pos:pos+2], uint16(x))
+ pos += 2
+ }
+ // field[1] m.VrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.VrfID))
+ pos += 4
+ return buf, nil
+}
+func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Address
+ // field[3] m.Prefix.Address.Af
+ m.Prefix.Address.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[3] m.Prefix.Address.Un
+ copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Prefix.Len
+ m.Prefix.Len = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.NumberOfRanges
+ m.NumberOfRanges = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.LowPorts
+ m.LowPorts = make([]uint16, 32)
+ for i := 0; i < len(m.LowPorts); i++ {
+ m.LowPorts[i] = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ }
+ // field[1] m.HighPorts
+ m.HighPorts = make([]uint16, 32)
+ for i := 0; i < len(m.HighPorts); i++ {
+ m.HighPorts[i] = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ }
+ // field[1] m.VrfID
+ m.VrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPSourceAndPortRangeCheckAddDelReply represents VPP binary API message 'ip_source_and_port_range_check_add_del_reply'.
type IPSourceAndPortRangeCheckAddDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
return api.ReplyMessage
}
+func (m *IPSourceAndPortRangeCheckAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPSourceAndPortRangeCheckInterfaceAddDel represents VPP binary API message 'ip_source_and_port_range_check_interface_add_del'.
type IPSourceAndPortRangeCheckInterfaceAddDel struct {
- IsAdd bool
- SwIfIndex InterfaceIndex
- TCPInVrfID uint32
- TCPOutVrfID uint32
- UDPInVrfID uint32
- UDPOutVrfID uint32
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
+ TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
+ UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
+ UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
}
func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
return api.RequestMessage
}
+func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.TCPInVrfID
+ size += 4
+ // field[1] m.TCPOutVrfID
+ size += 4
+ // field[1] m.UDPInVrfID
+ size += 4
+ // field[1] m.UDPOutVrfID
+ size += 4
+ return size
+}
+func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.TCPInVrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.TCPInVrfID))
+ pos += 4
+ // field[1] m.TCPOutVrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.TCPOutVrfID))
+ pos += 4
+ // field[1] m.UDPInVrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.UDPInVrfID))
+ pos += 4
+ // field[1] m.UDPOutVrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.UDPOutVrfID))
+ pos += 4
+ return buf, nil
+}
+func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.TCPInVrfID
+ m.TCPInVrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.TCPOutVrfID
+ m.TCPOutVrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.UDPInVrfID
+ m.UDPInVrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.UDPOutVrfID
+ m.UDPOutVrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPSourceAndPortRangeCheckInterfaceAddDelReply represents VPP binary API message 'ip_source_and_port_range_check_interface_add_del_reply'.
type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
return api.ReplyMessage
}
-// IPSourceCheckInterfaceAddDel represents VPP binary API message 'ip_source_check_interface_add_del'.
-type IPSourceCheckInterfaceAddDel struct {
- 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 "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 (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
-func (*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 bool
- Table IPTable
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
}
func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} }
func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" }
func (*IPTableAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPTableAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ if m.IsAdd {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPTableAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// IPTableAddDelReply represents VPP binary API message 'ip_table_add_del_reply'.
type IPTableAddDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} }
func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" }
func (*IPTableAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPTableAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPTableAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPTableDetails represents VPP binary API message 'ip_table_details'.
type IPTableDetails struct {
- Table IPTable
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
}
func (m *IPTableDetails) Reset() { *m = IPTableDetails{} }
func (*IPTableDetails) GetCrcString() string { return "c79fca0f" }
func (*IPTableDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPTableDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPTableDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// IPTableDump represents VPP binary API message 'ip_table_dump'.
type IPTableDump struct{}
func (*IPTableDump) GetCrcString() string { return "51077d14" }
func (*IPTableDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPTableDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
+}
+func (m *IPTableDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
+}
+
// IPTableFlush represents VPP binary API message 'ip_table_flush'.
type IPTableFlush struct {
- Table IPTable
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
}
func (m *IPTableFlush) Reset() { *m = IPTableFlush{} }
func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" }
func (*IPTableFlush) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPTableFlush) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPTableFlush) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// IPTableFlushReply represents VPP binary API message 'ip_table_flush_reply'.
type IPTableFlushReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} }
func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" }
func (*IPTableFlushReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPTableFlushReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPTableFlushReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPTableReplaceBegin represents VPP binary API message 'ip_table_replace_begin'.
type IPTableReplaceBegin struct {
- Table IPTable
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
}
func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} }
func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" }
func (*IPTableReplaceBegin) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPTableReplaceBegin) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPTableReplaceBegin) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// IPTableReplaceBeginReply represents VPP binary API message 'ip_table_replace_begin_reply'.
type IPTableReplaceBeginReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} }
func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPTableReplaceBeginReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPTableReplaceBeginReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPTableReplaceEnd represents VPP binary API message 'ip_table_replace_end'.
type IPTableReplaceEnd struct {
- Table IPTable
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
}
func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} }
func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" }
func (*IPTableReplaceEnd) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPTableReplaceEnd) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ size += 4
+ // field[2] m.Table.IsIP6
+ size += 1
+ // field[2] m.Table.Name
+ size += 64
+ return size
+}
+func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.Table.TableID))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ if m.Table.IsIP6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[2] m.Table.Name
+ copy(buf[pos:pos+64], m.Table.Name)
+ pos += 64
+ return buf, nil
+}
+func (m *IPTableReplaceEnd) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Table
+ // field[2] m.Table.TableID
+ m.Table.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[2] m.Table.IsIP6
+ m.Table.IsIP6 = tmp[pos] != 0
+ pos += 1
+ // field[2] m.Table.Name
+ {
+ nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
+ m.Table.Name = codec.DecodeString(tmp[pos : pos+nul])
+ pos += 64
+ }
+ return nil
+}
+
// IPTableReplaceEndReply represents VPP binary API message 'ip_table_replace_end_reply'.
type IPTableReplaceEndReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} }
func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" }
func (*IPTableReplaceEndReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPTableReplaceEndReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *IPTableReplaceEndReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPUnnumberedDetails represents VPP binary API message 'ip_unnumbered_details'.
type IPUnnumberedDetails struct {
- SwIfIndex InterfaceIndex
- IPSwIfIndex InterfaceIndex
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
}
func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" }
func (*IPUnnumberedDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *IPUnnumberedDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IPSwIfIndex
+ size += 4
+ return size
+}
+func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IPSwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.IPSwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *IPUnnumberedDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IPSwIfIndex
+ m.IPSwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// IPUnnumberedDump represents VPP binary API message 'ip_unnumbered_dump'.
type IPUnnumberedDump struct {
- SwIfIndex InterfaceIndex
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4.294967295e+09" json:"sw_if_index,omitempty"`
}
func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" }
func (*IPUnnumberedDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *IPUnnumberedDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *IPUnnumberedDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// 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"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ Prefix fib_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
+ IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
+ IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty" struc:"[256]byte"`
}
func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" }
func (*MfibSignalDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *MfibSignalDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.TableID
+ size += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Af
+ size += 1
+ // field[2] m.Prefix.GrpAddressLength
+ size += 2
+ // field[2] m.Prefix.GrpAddress
+ size += 16
+ // field[2] m.Prefix.SrcAddress
+ size += 16
+ // field[1] m.IPPacketLen
+ size += 2
+ // field[1] m.IPPacketData
+ size += 256
+ return size
+}
+func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.TableID
+ o.PutUint32(buf[pos:pos+4], uint32(m.TableID))
+ pos += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Af
+ buf[pos] = uint8(m.Prefix.Af)
+ pos += 1
+ // field[2] m.Prefix.GrpAddressLength
+ o.PutUint16(buf[pos:pos+2], uint16(m.Prefix.GrpAddressLength))
+ pos += 2
+ // field[2] m.Prefix.GrpAddress
+ copy(buf[pos:pos+16], m.Prefix.GrpAddress.XXX_UnionData[:])
+ pos += 16
+ // field[2] m.Prefix.SrcAddress
+ copy(buf[pos:pos+16], m.Prefix.SrcAddress.XXX_UnionData[:])
+ pos += 16
+ // field[1] m.IPPacketLen
+ o.PutUint16(buf[pos:pos+2], uint16(m.IPPacketLen))
+ pos += 2
+ // field[1] m.IPPacketData
+ for i := 0; i < 256; i++ {
+ var x uint8
+ if i < len(m.IPPacketData) {
+ x = uint8(m.IPPacketData[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *MfibSignalDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.TableID
+ m.TableID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Prefix
+ // field[2] m.Prefix.Af
+ m.Prefix.Af = fib_types.AddressFamily(tmp[pos])
+ pos += 1
+ // field[2] m.Prefix.GrpAddressLength
+ m.Prefix.GrpAddressLength = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.Prefix.GrpAddress
+ copy(m.Prefix.GrpAddress.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[2] m.Prefix.SrcAddress
+ copy(m.Prefix.SrcAddress.XXX_UnionData[:], tmp[pos:pos+16])
+ pos += 16
+ // field[1] m.IPPacketLen
+ m.IPPacketLen = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[1] m.IPPacketData
+ m.IPPacketData = make([]uint8, 256)
+ for i := 0; i < len(m.IPPacketData); i++ {
+ m.IPPacketData[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
+}
+
// MfibSignalDump represents VPP binary API message 'mfib_signal_dump'.
type MfibSignalDump struct{}
func (*MfibSignalDump) GetCrcString() string { return "51077d14" }
func (*MfibSignalDump) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *MfibSignalDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
+}
+func (m *MfibSignalDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
+}
+
// SetIPFlowHash represents VPP binary API message 'set_ip_flow_hash'.
type SetIPFlowHash struct {
- VrfID uint32
- IsIPv6 bool
- Src bool
- Dst bool
- Sport bool
- Dport bool
- Proto bool
- Reverse bool
- Symmetric bool
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
+ Src bool `binapi:"bool,name=src" json:"src,omitempty"`
+ Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"`
+ Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"`
+ Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"`
+ Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"`
+ Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"`
+ Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
}
func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} }
func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" }
func (*SetIPFlowHash) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SetIPFlowHash) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.VrfID
+ size += 4
+ // field[1] m.IsIPv6
+ size += 1
+ // field[1] m.Src
+ size += 1
+ // field[1] m.Dst
+ size += 1
+ // field[1] m.Sport
+ size += 1
+ // field[1] m.Dport
+ size += 1
+ // field[1] m.Proto
+ size += 1
+ // field[1] m.Reverse
+ size += 1
+ // field[1] m.Symmetric
+ size += 1
+ return size
+}
+func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.VrfID
+ o.PutUint32(buf[pos:pos+4], uint32(m.VrfID))
+ pos += 4
+ // field[1] m.IsIPv6
+ if m.IsIPv6 {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Src
+ if m.Src {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Dst
+ if m.Dst {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Sport
+ if m.Sport {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Dport
+ if m.Dport {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Proto
+ if m.Proto {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Reverse
+ if m.Reverse {
+ buf[pos] = 1
+ }
+ pos += 1
+ // field[1] m.Symmetric
+ if m.Symmetric {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *SetIPFlowHash) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.VrfID
+ m.VrfID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IsIPv6
+ m.IsIPv6 = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Src
+ m.Src = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Dst
+ m.Dst = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Sport
+ m.Sport = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Dport
+ m.Dport = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Proto
+ m.Proto = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Reverse
+ m.Reverse = tmp[pos] != 0
+ pos += 1
+ // field[1] m.Symmetric
+ m.Symmetric = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// SetIPFlowHashReply represents VPP binary API message 'set_ip_flow_hash_reply'.
type SetIPFlowHashReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} }
func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" }
func (*SetIPFlowHashReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SetIPFlowHashReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SetIPFlowHashReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceIP6EnableDisable represents VPP binary API message 'sw_interface_ip6_enable_disable'.
type SwInterfaceIP6EnableDisable struct {
- SwIfIndex InterfaceIndex
- Enable bool
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
}
func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} }
func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" }
func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceIP6EnableDisable) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Enable
+ size += 1
+ return size
+}
+func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Enable
+ if m.Enable {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
+}
+func (m *SwInterfaceIP6EnableDisable) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Enable
+ m.Enable = tmp[pos] != 0
+ pos += 1
+ return nil
+}
+
// SwInterfaceIP6EnableDisableReply represents VPP binary API message 'sw_interface_ip6_enable_disable_reply'.
type SwInterfaceIP6EnableDisableReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+func (m *SwInterfaceIP6EnableDisableReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
// SwInterfaceIP6SetLinkLocalAddress represents VPP binary API message 'sw_interface_ip6_set_link_local_address'.
type SwInterfaceIP6SetLinkLocalAddress struct {
- SwIfIndex InterfaceIndex
- IP IP6Address
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IP fib_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
}
func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" }
func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { return api.RequestMessage }
+func (m *SwInterfaceIP6SetLinkLocalAddress) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.IP
+ size += 16
+ return size
+}
+func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.IP
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(m.IP) {
+ x = uint8(m.IP[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.IP
+ for i := 0; i < len(m.IP); i++ {
+ m.IP[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
+}
+
// SwInterfaceIP6SetLinkLocalAddressReply represents VPP binary API message 'sw_interface_ip6_set_link_local_address_reply'.
type SwInterfaceIP6SetLinkLocalAddressReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
return api.ReplyMessage
}
-func init() {
+func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
+func init() { file_ip_binapi_init() }
+func file_ip_binapi_init() {
api.RegisterMessage((*IoamDisable)(nil), "ip.IoamDisable")
api.RegisterMessage((*IoamDisableReply)(nil), "ip.IoamDisableReply")
api.RegisterMessage((*IoamEnable)(nil), "ip.IoamEnable")
api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip.IPRouteAddDelReply")
api.RegisterMessage((*IPRouteDetails)(nil), "ip.IPRouteDetails")
api.RegisterMessage((*IPRouteDump)(nil), "ip.IPRouteDump")
+ api.RegisterMessage((*IPRouteLookup)(nil), "ip.IPRouteLookup")
+ api.RegisterMessage((*IPRouteLookupReply)(nil), "ip.IPRouteLookupReply")
api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip.IPSourceAndPortRangeCheckAddDel")
api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip.IPSourceAndPortRangeCheckAddDelReply")
api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip.IPSourceAndPortRangeCheckInterfaceAddDel")
api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip.IPSourceAndPortRangeCheckInterfaceAddDelReply")
- api.RegisterMessage((*IPSourceCheckInterfaceAddDel)(nil), "ip.IPSourceCheckInterfaceAddDel")
- api.RegisterMessage((*IPSourceCheckInterfaceAddDelReply)(nil), "ip.IPSourceCheckInterfaceAddDelReply")
api.RegisterMessage((*IPTableAddDel)(nil), "ip.IPTableAddDel")
api.RegisterMessage((*IPTableAddDelReply)(nil), "ip.IPTableAddDelReply")
api.RegisterMessage((*IPTableDetails)(nil), "ip.IPTableDetails")
(*IPRouteAddDelReply)(nil),
(*IPRouteDetails)(nil),
(*IPRouteDump)(nil),
+ (*IPRouteLookup)(nil),
+ (*IPRouteLookupReply)(nil),
(*IPSourceAndPortRangeCheckAddDel)(nil),
(*IPSourceAndPortRangeCheckAddDelReply)(nil),
(*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
(*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
- (*IPSourceCheckInterfaceAddDel)(nil),
- (*IPSourceCheckInterfaceAddDelReply)(nil),
(*IPTableAddDel)(nil),
(*IPTableAddDelReply)(nil),
(*IPTableDetails)(nil),
}
}
-// RPCService represents RPC service API for ip module.
-type RPCService interface {
- 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)
- 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)
- IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error)
- IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error)
- IPContainerProxyAddDel(ctx context.Context, in *IPContainerProxyAddDel) (*IPContainerProxyAddDelReply, error)
- IPMrouteAddDel(ctx context.Context, in *IPMrouteAddDel) (*IPMrouteAddDelReply, 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)
- 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)
- 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)
-}
-
-type serviceClient struct {
- ch api.Channel
-}
-
-func NewServiceClient(ch api.Channel) RPCService {
- return &serviceClient{ch}
-}
-
-func (c *serviceClient) DumpIPAddress(ctx context.Context, in *IPAddressDump) (RPCService_DumpIPAddressClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPAddressClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPAddressClient interface {
- Recv() (*IPAddressDetails, error)
-}
-
-type serviceClient_DumpIPAddressClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPAddressClient) Recv() (*IPAddressDetails, error) {
- m := new(IPAddressDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpIPContainerProxy(ctx context.Context, in *IPContainerProxyDump) (RPCService_DumpIPContainerProxyClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPContainerProxyClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPContainerProxyClient interface {
- Recv() (*IPContainerProxyDetails, error)
-}
-
-type serviceClient_DumpIPContainerProxyClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPContainerProxyClient) Recv() (*IPContainerProxyDetails, error) {
- m := new(IPContainerProxyDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpIP(ctx context.Context, in *IPDump) (RPCService_DumpIPClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPClient interface {
- Recv() (*IPDetails, error)
-}
-
-type serviceClient_DumpIPClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPClient) Recv() (*IPDetails, error) {
- m := new(IPDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpIPMroute(ctx context.Context, in *IPMrouteDump) (RPCService_DumpIPMrouteClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPMrouteClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPMrouteClient interface {
- Recv() (*IPMrouteDetails, error)
-}
-
-type serviceClient_DumpIPMrouteClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPMrouteClient) Recv() (*IPMrouteDetails, error) {
- m := new(IPMrouteDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpIPMtable(ctx context.Context, in *IPMtableDump) (RPCService_DumpIPMtableClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPMtableClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPMtableClient interface {
- Recv() (*IPMtableDetails, error)
-}
-
-type serviceClient_DumpIPMtableClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPMtableClient) Recv() (*IPMtableDetails, error) {
- m := new(IPMtableDetails)
- 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}
- return x, nil
-}
-
-type RPCService_DumpIPPuntRedirectClient interface {
- Recv() (*IPPuntRedirectDetails, error)
-}
-
-type serviceClient_DumpIPPuntRedirectClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPPuntRedirectClient) Recv() (*IPPuntRedirectDetails, error) {
- m := new(IPPuntRedirectDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpIPRoute(ctx context.Context, in *IPRouteDump) (RPCService_DumpIPRouteClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPRouteClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPRouteClient interface {
- Recv() (*IPRouteDetails, error)
-}
-
-type serviceClient_DumpIPRouteClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPRouteClient) Recv() (*IPRouteDetails, error) {
- m := new(IPRouteDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpIPTable(ctx context.Context, in *IPTableDump) (RPCService_DumpIPTableClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPTableClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPTableClient interface {
- Recv() (*IPTableDetails, error)
-}
-
-type serviceClient_DumpIPTableClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPTableClient) Recv() (*IPTableDetails, error) {
- m := new(IPTableDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpIPUnnumbered(ctx context.Context, in *IPUnnumberedDump) (RPCService_DumpIPUnnumberedClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpIPUnnumberedClient{stream}
- return x, nil
-}
-
-type RPCService_DumpIPUnnumberedClient interface {
- Recv() (*IPUnnumberedDetails, error)
-}
-
-type serviceClient_DumpIPUnnumberedClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpIPUnnumberedClient) Recv() (*IPUnnumberedDetails, error) {
- m := new(IPUnnumberedDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpMfibSignal(ctx context.Context, in *MfibSignalDump) (RPCService_DumpMfibSignalClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpMfibSignalClient{stream}
- return x, nil
-}
-
-type RPCService_DumpMfibSignalClient interface {
- Recv() (*MfibSignalDetails, error)
-}
-
-type serviceClient_DumpMfibSignalClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpMfibSignalClient) Recv() (*MfibSignalDetails, error) {
- m := new(MfibSignalDetails)
- 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)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error) {
- out := new(IoamEnableReply)
- 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)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPMrouteAddDel(ctx context.Context, in *IPMrouteAddDel) (*IPMrouteAddDelReply, error) {
- out := new(IPMrouteAddDelReply)
- 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)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPPuntRedirect(ctx context.Context, in *IPPuntRedirect) (*IPPuntRedirectReply, error) {
- out := new(IPPuntRedirectReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPReassemblyEnableDisable(ctx context.Context, in *IPReassemblyEnableDisable) (*IPReassemblyEnableDisableReply, error) {
- out := new(IPReassemblyEnableDisableReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPReassemblyGet(ctx context.Context, in *IPReassemblyGet) (*IPReassemblyGetReply, error) {
- out := new(IPReassemblyGetReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPReassemblySet(ctx context.Context, in *IPReassemblySet) (*IPReassemblySetReply, error) {
- out := new(IPReassemblySetReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPRouteAddDel(ctx context.Context, in *IPRouteAddDel) (*IPRouteAddDelReply, error) {
- out := new(IPRouteAddDelReply)
- 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)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error) {
- out := new(IPSourceAndPortRangeCheckInterfaceAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPSourceCheckInterfaceAddDel(ctx context.Context, in *IPSourceCheckInterfaceAddDel) (*IPSourceCheckInterfaceAddDelReply, error) {
- out := new(IPSourceCheckInterfaceAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*IPTableAddDelReply, error) {
- out := new(IPTableAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-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
- }
- return out, nil
-}
-
-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
- }
- return out, nil
-}
-
-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
- }
- return out, nil
-}
-
-func (c *serviceClient) SetIPFlowHash(ctx context.Context, in *SetIPFlowHash) (*SetIPFlowHashReply, error) {
- out := new(SetIPFlowHashReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceIP6EnableDisable(ctx context.Context, in *SwInterfaceIP6EnableDisable) (*SwInterfaceIP6EnableDisableReply, error) {
- out := new(SwInterfaceIP6EnableDisableReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SwInterfaceIP6SetLinkLocalAddress(ctx context.Context, in *SwInterfaceIP6SetLinkLocalAddress) (*SwInterfaceIP6SetLinkLocalAddressReply, error) {
- out := new(SwInterfaceIP6SetLinkLocalAddressReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
-
// Reference imports to suppress errors if they are not otherwise used.
var _ = api.RegisterMessage
+var _ = codec.DecodeString
var _ = bytes.NewBuffer
var _ = context.Background
var _ = io.Copy
var _ = strconv.Itoa
+var _ = strings.Contains
var _ = struc.Pack
+var _ = binary.BigEndian
+var _ = math.Float32bits
+var _ = net.ParseIP
+var _ = fmt.Errorf