// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.5.0-dev
+// VPP: 21.06-release
// source: /usr/share/vpp/api/core/ip.api.json
// Package ip contains generated bindings for API file ip.api.
//
// Contents:
-// 1 enum
-// 4 structs
-// 60 messages
+// 2 enums
+// 6 structs
+// 81 messages
//
package ip
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
_ "git.fd.io/govpp.git/binapi/ethernet_types"
fib_types "git.fd.io/govpp.git/binapi/fib_types"
ip_types "git.fd.io/govpp.git/binapi/ip_types"
mfib_types "git.fd.io/govpp.git/binapi/mfib_types"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
const (
APIFile = "ip"
- APIVersion = "3.0.1"
- VersionCrc = 0x765d74b1
+ APIVersion = "3.1.0"
+ VersionCrc = 0x972432b4
)
// IPReassType defines enum 'ip_reass_type'.
return "IPReassType(" + strconv.Itoa(int(x)) + ")"
}
+// IPFlowHashConfig defines enum 'ip_flow_hash_config'.
+type IPFlowHashConfig uint32
+
+const (
+ IP_API_FLOW_HASH_SRC_IP IPFlowHashConfig = 1
+ IP_API_FLOW_HASH_DST_IP IPFlowHashConfig = 2
+ IP_API_FLOW_HASH_SRC_PORT IPFlowHashConfig = 4
+ IP_API_FLOW_HASH_DST_PORT IPFlowHashConfig = 8
+ IP_API_FLOW_HASH_PROTO IPFlowHashConfig = 16
+ IP_API_FLOW_HASH_REVERSE IPFlowHashConfig = 32
+ IP_API_FLOW_HASH_SYMETRIC IPFlowHashConfig = 64
+ IP_API_FLOW_HASH_FLOW_LABEL IPFlowHashConfig = 128
+)
+
+var (
+ IPFlowHashConfig_name = map[uint32]string{
+ 1: "IP_API_FLOW_HASH_SRC_IP",
+ 2: "IP_API_FLOW_HASH_DST_IP",
+ 4: "IP_API_FLOW_HASH_SRC_PORT",
+ 8: "IP_API_FLOW_HASH_DST_PORT",
+ 16: "IP_API_FLOW_HASH_PROTO",
+ 32: "IP_API_FLOW_HASH_REVERSE",
+ 64: "IP_API_FLOW_HASH_SYMETRIC",
+ 128: "IP_API_FLOW_HASH_FLOW_LABEL",
+ }
+ IPFlowHashConfig_value = map[string]uint32{
+ "IP_API_FLOW_HASH_SRC_IP": 1,
+ "IP_API_FLOW_HASH_DST_IP": 2,
+ "IP_API_FLOW_HASH_SRC_PORT": 4,
+ "IP_API_FLOW_HASH_DST_PORT": 8,
+ "IP_API_FLOW_HASH_PROTO": 16,
+ "IP_API_FLOW_HASH_REVERSE": 32,
+ "IP_API_FLOW_HASH_SYMETRIC": 64,
+ "IP_API_FLOW_HASH_FLOW_LABEL": 128,
+ }
+)
+
+func (x IPFlowHashConfig) String() string {
+ s, ok := IPFlowHashConfig_name[uint32(x)]
+ if ok {
+ return s
+ }
+ str := func(n uint32) string {
+ s, ok := IPFlowHashConfig_name[uint32(n)]
+ if ok {
+ return s
+ }
+ return "IPFlowHashConfig(" + strconv.Itoa(int(n)) + ")"
+ }
+ for i := uint32(0); i <= 32; i++ {
+ val := uint32(x)
+ if val&(1<<i) != 0 {
+ if s != "" {
+ s += "|"
+ }
+ s += str(1 << i)
+ }
+ }
+ if s == "" {
+ return str(uint32(x))
+ }
+ return s
+}
+
// IPMroute defines type 'ip_mroute'.
type IPMroute struct {
- 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 ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
- NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
- Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ EntryFlags mfib_types.MfibEntryFlags `binapi:"mfib_entry_flags,name=entry_flags" json:"entry_flags,omitempty"`
+ RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
+ Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
+ NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
+ Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
+}
+
+// IPPathMtu defines type 'ip_path_mtu'.
+type IPPathMtu struct {
+ ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
+ Context uint32 `binapi:"u32,name=context" json:"context,omitempty"`
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
+ PathMtu uint16 `binapi:"u16,name=path_mtu" json:"path_mtu,omitempty"`
}
// IPRoute defines type 'ip_route'.
Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
}
+// IPRouteV2 defines type 'ip_route_v2'.
+type IPRouteV2 struct {
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
+ Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
+ NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
+ Src uint8 `binapi:"u8,name=src" json:"src,omitempty"`
+ Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
+}
+
// IPTable defines type 'ip_table'.
type IPTable struct {
TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
return api.RequestMessage
}
-func (m *IoamDisable) Size() int {
+func (m *IoamDisable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 2 // m.ID
return size
}
func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint16(uint16(m.ID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint16(m.ID)
return buf.Bytes(), nil
}
func (m *IoamDisable) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *IoamDisableReply) Size() int {
+func (m *IoamDisableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IoamDisableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *IoamEnable) Size() int {
+func (m *IoamEnable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 2 // m.ID
size += 1 // m.Seqno
size += 1 // m.Analyse
return size
}
func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint16(uint16(m.ID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint16(m.ID)
buf.EncodeBool(m.Seqno)
buf.EncodeBool(m.Analyse)
buf.EncodeBool(m.PotEnable)
buf.EncodeBool(m.TraceEnable)
- buf.EncodeUint32(uint32(m.NodeID))
+ buf.EncodeUint32(m.NodeID)
return buf.Bytes(), nil
}
func (m *IoamEnable) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *IoamEnableReply) Size() int {
+func (m *IoamEnableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IoamEnableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
-func (*IPAddressDetails) GetCrcString() string { return "b1199745" }
+func (*IPAddressDetails) GetCrcString() string { return "ee29b797" }
func (*IPAddressDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *IPAddressDetails) Size() int {
+func (m *IPAddressDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.Prefix.Address.Af
size += 1 * 16 // m.Prefix.Address.Un
return size
}
func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeUint8(uint8(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Prefix.Len))
+ buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Prefix.Len)
return buf.Bytes(), nil
}
func (m *IPAddressDetails) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *IPAddressDump) Size() int {
+func (m *IPAddressDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
return size
}
func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsIPv6)
return buf.Bytes(), nil
func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
-func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" }
+func (*IPContainerProxyAddDel) GetCrcString() string { return "7df1dff1" }
func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *IPContainerProxyAddDel) Size() int {
+func (m *IPContainerProxyAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Pfx.Address.Af
size += 1 * 16 // m.Pfx.Address.Un
size += 1 // m.Pfx.Len
return size
}
func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Pfx.Len))
+ buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Pfx.Len)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsAdd)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPContainerProxyAddDelReply) Size() int {
+func (m *IPContainerProxyAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
-func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" }
+func (*IPContainerProxyDetails) GetCrcString() string { return "a8085523" }
func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *IPContainerProxyDetails) Size() int {
+func (m *IPContainerProxyDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.Prefix.Address.Af
size += 1 * 16 // m.Prefix.Address.Un
return size
}
func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeUint8(uint8(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Prefix.Len))
+ buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Prefix.Len)
return buf.Bytes(), nil
}
func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *IPContainerProxyDump) Size() int {
+func (m *IPContainerProxyDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *IPDetails) Size() int {
+func (m *IPDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
return size
}
func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsIPv6)
return buf.Bytes(), nil
return api.RequestMessage
}
-func (m *IPDump) Size() int {
+func (m *IPDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsIPv6
return size
}
func (m *IPDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsIPv6)
return buf.Bytes(), nil
}
func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
-func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" }
+func (*IPMrouteAddDel) GetCrcString() string { return "0dd7e790" }
func (*IPMrouteAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *IPMrouteAddDel) Size() int {
+func (m *IPMrouteAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 1 // m.IsMultipath
size += 4 // m.Route.TableID
size += 4 // s2.Path.Nh.ClassifyTableIndex
size += 1 // s2.Path.NLabels
for j4 := 0; j4 < 16; j4++ {
- var s4 fib_types.FibMplsLabel
- _ = s4
- if j4 < len(s2.Path.LabelStack) {
- s4 = s2.Path.LabelStack[j4]
- }
- size += 1 // s4.IsUniform
- size += 4 // s4.Label
- size += 1 // s4.TTL
- size += 1 // s4.Exp
+ size += 1 // s2.Path.LabelStack[j4].IsUniform
+ size += 4 // s2.Path.LabelStack[j4].Label
+ size += 1 // s2.Path.LabelStack[j4].TTL
+ size += 1 // s2.Path.LabelStack[j4].Exp
}
}
return size
}
func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeBool(m.IsMultipath)
- buf.EncodeUint32(uint32(m.Route.TableID))
+ buf.EncodeUint32(m.Route.TableID)
buf.EncodeUint32(uint32(m.Route.EntryFlags))
- buf.EncodeUint32(uint32(m.Route.RpfID))
+ buf.EncodeUint32(m.Route.RpfID)
buf.EncodeUint8(uint8(m.Route.Prefix.Af))
- buf.EncodeUint16(uint16(m.Route.Prefix.GrpAddressLength))
- buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 0)
- buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 0)
+ buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
+ buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
+ buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(len(m.Route.Paths)))
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 mfib_types.MfibPath
+ var v1 mfib_types.MfibPath // Paths
if j1 < len(m.Route.Paths) {
v1 = m.Route.Paths[j1]
}
buf.EncodeUint32(uint32(v1.ItfFlags))
- buf.EncodeUint32(uint32(v1.Path.SwIfIndex))
- buf.EncodeUint32(uint32(v1.Path.TableID))
- buf.EncodeUint32(uint32(v1.Path.RpfID))
- buf.EncodeUint8(uint8(v1.Path.Weight))
- buf.EncodeUint8(uint8(v1.Path.Preference))
+ buf.EncodeUint32(v1.Path.SwIfIndex)
+ buf.EncodeUint32(v1.Path.TableID)
+ buf.EncodeUint32(v1.Path.RpfID)
+ buf.EncodeUint8(v1.Path.Weight)
+ buf.EncodeUint8(v1.Path.Preference)
buf.EncodeUint32(uint32(v1.Path.Type))
buf.EncodeUint32(uint32(v1.Path.Flags))
buf.EncodeUint32(uint32(v1.Path.Proto))
- buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 0)
- buf.EncodeUint32(uint32(v1.Path.Nh.ViaLabel))
- buf.EncodeUint32(uint32(v1.Path.Nh.ObjID))
- buf.EncodeUint32(uint32(v1.Path.Nh.ClassifyTableIndex))
- buf.EncodeUint8(uint8(v1.Path.NLabels))
+ buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Path.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Path.Nh.ObjID)
+ buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.Path.NLabels)
for j3 := 0; j3 < 16; j3++ {
- var v3 fib_types.FibMplsLabel
- if j3 < len(v1.Path.LabelStack) {
- v3 = v1.Path.LabelStack[j3]
- }
- buf.EncodeUint8(uint8(v3.IsUniform))
- buf.EncodeUint32(uint32(v3.Label))
- buf.EncodeUint8(uint8(v3.TTL))
- buf.EncodeUint8(uint8(v3.Exp))
+ buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
+ buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
+ buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
+ buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
}
}
return buf.Bytes(), nil
m.IsAdd = buf.DecodeBool()
m.IsMultipath = buf.DecodeBool()
m.Route.TableID = buf.DecodeUint32()
- m.Route.EntryFlags = buf.DecodeUint32()
+ m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
m.Route.RpfID = buf.DecodeUint32()
m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]mfib_types.MfibPath, int(m.Route.NPaths))
+ m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
return api.ReplyMessage
}
-func (m *IPMrouteAddDelReply) Size() int {
+func (m *IPMrouteAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.StatsIndex
return size
}
func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.StatsIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.StatsIndex)
return buf.Bytes(), nil
}
func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.StatsIndex = buf.DecodeUint32()
return nil
}
func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
-func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" }
+func (*IPMrouteDetails) GetCrcString() string { return "c5cb23fc" }
func (*IPMrouteDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *IPMrouteDetails) Size() int {
+func (m *IPMrouteDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Route.TableID
size += 4 // m.Route.EntryFlags
size += 4 // m.Route.RpfID
size += 4 // s2.Path.Nh.ClassifyTableIndex
size += 1 // s2.Path.NLabels
for j4 := 0; j4 < 16; j4++ {
- var s4 fib_types.FibMplsLabel
- _ = s4
- if j4 < len(s2.Path.LabelStack) {
- s4 = s2.Path.LabelStack[j4]
- }
- size += 1 // s4.IsUniform
- size += 4 // s4.Label
- size += 1 // s4.TTL
- size += 1 // s4.Exp
+ size += 1 // s2.Path.LabelStack[j4].IsUniform
+ size += 4 // s2.Path.LabelStack[j4].Label
+ size += 1 // s2.Path.LabelStack[j4].TTL
+ size += 1 // s2.Path.LabelStack[j4].Exp
}
}
return size
}
func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Route.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Route.TableID)
buf.EncodeUint32(uint32(m.Route.EntryFlags))
- buf.EncodeUint32(uint32(m.Route.RpfID))
+ buf.EncodeUint32(m.Route.RpfID)
buf.EncodeUint8(uint8(m.Route.Prefix.Af))
- buf.EncodeUint16(uint16(m.Route.Prefix.GrpAddressLength))
- buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 0)
- buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 0)
+ buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
+ buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
+ buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(len(m.Route.Paths)))
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 mfib_types.MfibPath
+ var v1 mfib_types.MfibPath // Paths
if j1 < len(m.Route.Paths) {
v1 = m.Route.Paths[j1]
}
buf.EncodeUint32(uint32(v1.ItfFlags))
- buf.EncodeUint32(uint32(v1.Path.SwIfIndex))
- buf.EncodeUint32(uint32(v1.Path.TableID))
- buf.EncodeUint32(uint32(v1.Path.RpfID))
- buf.EncodeUint8(uint8(v1.Path.Weight))
- buf.EncodeUint8(uint8(v1.Path.Preference))
+ buf.EncodeUint32(v1.Path.SwIfIndex)
+ buf.EncodeUint32(v1.Path.TableID)
+ buf.EncodeUint32(v1.Path.RpfID)
+ buf.EncodeUint8(v1.Path.Weight)
+ buf.EncodeUint8(v1.Path.Preference)
buf.EncodeUint32(uint32(v1.Path.Type))
buf.EncodeUint32(uint32(v1.Path.Flags))
buf.EncodeUint32(uint32(v1.Path.Proto))
- buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 0)
- buf.EncodeUint32(uint32(v1.Path.Nh.ViaLabel))
- buf.EncodeUint32(uint32(v1.Path.Nh.ObjID))
- buf.EncodeUint32(uint32(v1.Path.Nh.ClassifyTableIndex))
- buf.EncodeUint8(uint8(v1.Path.NLabels))
+ buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Path.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Path.Nh.ObjID)
+ buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.Path.NLabels)
for j3 := 0; j3 < 16; j3++ {
- var v3 fib_types.FibMplsLabel
- if j3 < len(v1.Path.LabelStack) {
- v3 = v1.Path.LabelStack[j3]
- }
- buf.EncodeUint8(uint8(v3.IsUniform))
- buf.EncodeUint32(uint32(v3.Label))
- buf.EncodeUint8(uint8(v3.TTL))
- buf.EncodeUint8(uint8(v3.Exp))
+ buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
+ buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
+ buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
+ buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
}
}
return buf.Bytes(), nil
func (m *IPMrouteDetails) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.Route.TableID = buf.DecodeUint32()
- m.Route.EntryFlags = buf.DecodeUint32()
+ m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
m.Route.RpfID = buf.DecodeUint32()
m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]mfib_types.MfibPath, int(m.Route.NPaths))
+ m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
return api.RequestMessage
}
-func (m *IPMrouteDump) Size() int {
+func (m *IPMrouteDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
size += 64 // m.Table.Name
return size
}
func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
return api.RequestMessage
}
-func (m *IPMtableDetails) Size() int {
+func (m *IPMtableDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
size += 64 // m.Table.Name
return size
}
func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
return api.RequestMessage
}
-func (m *IPMtableDump) Size() int {
+func (m *IPMtableDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *IPMtableDump) Unmarshal(b []byte) error {
return nil
}
+// IPPathMtuDetails defines message 'ip_path_mtu_details'.
+type IPPathMtuDetails struct {
+ Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
+}
+
+func (m *IPPathMtuDetails) Reset() { *m = IPPathMtuDetails{} }
+func (*IPPathMtuDetails) GetMessageName() string { return "ip_path_mtu_details" }
+func (*IPPathMtuDetails) GetCrcString() string { return "ac9539a7" }
+func (*IPPathMtuDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPPathMtuDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Pmtu.ClientIndex
+ size += 4 // m.Pmtu.Context
+ size += 4 // m.Pmtu.TableID
+ size += 1 // m.Pmtu.Nh.Af
+ size += 1 * 16 // m.Pmtu.Nh.Un
+ size += 2 // m.Pmtu.PathMtu
+ return size
+}
+func (m *IPPathMtuDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Pmtu.ClientIndex)
+ buf.EncodeUint32(m.Pmtu.Context)
+ buf.EncodeUint32(m.Pmtu.TableID)
+ buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
+ buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.Pmtu.PathMtu)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Pmtu.ClientIndex = buf.DecodeUint32()
+ m.Pmtu.Context = buf.DecodeUint32()
+ m.Pmtu.TableID = buf.DecodeUint32()
+ m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Pmtu.PathMtu = buf.DecodeUint16()
+ return nil
+}
+
+// IPPathMtuGet defines message 'ip_path_mtu_get'.
+type IPPathMtuGet struct {
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *IPPathMtuGet) Reset() { *m = IPPathMtuGet{} }
+func (*IPPathMtuGet) GetMessageName() string { return "ip_path_mtu_get" }
+func (*IPPathMtuGet) GetCrcString() string { return "f75ba505" }
+func (*IPPathMtuGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPPathMtuGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Cursor
+ return size
+}
+func (m *IPPathMtuGet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuGet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
+// IPPathMtuGetReply defines message 'ip_path_mtu_get_reply'.
+type IPPathMtuGetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *IPPathMtuGetReply) Reset() { *m = IPPathMtuGetReply{} }
+func (*IPPathMtuGetReply) GetMessageName() string { return "ip_path_mtu_get_reply" }
+func (*IPPathMtuGetReply) GetCrcString() string { return "53b48f5d" }
+func (*IPPathMtuGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPPathMtuGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Cursor
+ return size
+}
+func (m *IPPathMtuGetReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
+// IPPathMtuReplaceBegin defines message 'ip_path_mtu_replace_begin'.
+type IPPathMtuReplaceBegin struct{}
+
+func (m *IPPathMtuReplaceBegin) Reset() { *m = IPPathMtuReplaceBegin{} }
+func (*IPPathMtuReplaceBegin) GetMessageName() string { return "ip_path_mtu_replace_begin" }
+func (*IPPathMtuReplaceBegin) GetCrcString() string { return "51077d14" }
+func (*IPPathMtuReplaceBegin) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPPathMtuReplaceBegin) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *IPPathMtuReplaceBegin) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuReplaceBegin) Unmarshal(b []byte) error {
+ return nil
+}
+
+// IPPathMtuReplaceBeginReply defines message 'ip_path_mtu_replace_begin_reply'.
+type IPPathMtuReplaceBeginReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *IPPathMtuReplaceBeginReply) Reset() { *m = IPPathMtuReplaceBeginReply{} }
+func (*IPPathMtuReplaceBeginReply) GetMessageName() string { return "ip_path_mtu_replace_begin_reply" }
+func (*IPPathMtuReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
+func (*IPPathMtuReplaceBeginReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPPathMtuReplaceBeginReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IPPathMtuReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuReplaceBeginReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// IPPathMtuReplaceEnd defines message 'ip_path_mtu_replace_end'.
+type IPPathMtuReplaceEnd struct{}
+
+func (m *IPPathMtuReplaceEnd) Reset() { *m = IPPathMtuReplaceEnd{} }
+func (*IPPathMtuReplaceEnd) GetMessageName() string { return "ip_path_mtu_replace_end" }
+func (*IPPathMtuReplaceEnd) GetCrcString() string { return "51077d14" }
+func (*IPPathMtuReplaceEnd) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPPathMtuReplaceEnd) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *IPPathMtuReplaceEnd) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuReplaceEnd) Unmarshal(b []byte) error {
+ return nil
+}
+
+// IPPathMtuReplaceEndReply defines message 'ip_path_mtu_replace_end_reply'.
+type IPPathMtuReplaceEndReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *IPPathMtuReplaceEndReply) Reset() { *m = IPPathMtuReplaceEndReply{} }
+func (*IPPathMtuReplaceEndReply) GetMessageName() string { return "ip_path_mtu_replace_end_reply" }
+func (*IPPathMtuReplaceEndReply) GetCrcString() string { return "e8d4e804" }
+func (*IPPathMtuReplaceEndReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPPathMtuReplaceEndReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IPPathMtuReplaceEndReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuReplaceEndReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// IPPathMtuUpdate defines message 'ip_path_mtu_update'.
+type IPPathMtuUpdate struct {
+ Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
+}
+
+func (m *IPPathMtuUpdate) Reset() { *m = IPPathMtuUpdate{} }
+func (*IPPathMtuUpdate) GetMessageName() string { return "ip_path_mtu_update" }
+func (*IPPathMtuUpdate) GetCrcString() string { return "10bbe5cb" }
+func (*IPPathMtuUpdate) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPPathMtuUpdate) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Pmtu.ClientIndex
+ size += 4 // m.Pmtu.Context
+ size += 4 // m.Pmtu.TableID
+ size += 1 // m.Pmtu.Nh.Af
+ size += 1 * 16 // m.Pmtu.Nh.Un
+ size += 2 // m.Pmtu.PathMtu
+ return size
+}
+func (m *IPPathMtuUpdate) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Pmtu.ClientIndex)
+ buf.EncodeUint32(m.Pmtu.Context)
+ buf.EncodeUint32(m.Pmtu.TableID)
+ buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
+ buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.Pmtu.PathMtu)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuUpdate) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Pmtu.ClientIndex = buf.DecodeUint32()
+ m.Pmtu.Context = buf.DecodeUint32()
+ m.Pmtu.TableID = buf.DecodeUint32()
+ m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Pmtu.PathMtu = buf.DecodeUint16()
+ return nil
+}
+
+// IPPathMtuUpdateReply defines message 'ip_path_mtu_update_reply'.
+type IPPathMtuUpdateReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *IPPathMtuUpdateReply) Reset() { *m = IPPathMtuUpdateReply{} }
+func (*IPPathMtuUpdateReply) GetMessageName() string { return "ip_path_mtu_update_reply" }
+func (*IPPathMtuUpdateReply) GetCrcString() string { return "e8d4e804" }
+func (*IPPathMtuUpdateReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPPathMtuUpdateReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IPPathMtuUpdateReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *IPPathMtuUpdateReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// IPPuntPolice defines message 'ip_punt_police'.
type IPPuntPolice struct {
PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
return api.RequestMessage
}
-func (m *IPPuntPolice) Size() int {
+func (m *IPPuntPolice) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.PolicerIndex
size += 1 // m.IsAdd
size += 1 // m.IsIP6
return size
}
func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.PolicerIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.PolicerIndex)
buf.EncodeBool(m.IsAdd)
buf.EncodeBool(m.IsIP6)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPPuntPoliceReply) Size() int {
+func (m *IPPuntPoliceReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
-func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" }
+func (*IPPuntRedirect) GetCrcString() string { return "6580f635" }
func (*IPPuntRedirect) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *IPPuntRedirect) Size() int {
+func (m *IPPuntRedirect) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Punt.RxSwIfIndex
size += 4 // m.Punt.TxSwIfIndex
size += 1 // m.Punt.Nh.Af
return size
}
func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
buf.EncodeUint8(uint8(m.Punt.Nh.Af))
- buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
buf.EncodeBool(m.IsAdd)
return buf.Bytes(), nil
}
func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
-func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" }
+func (*IPPuntRedirectDetails) GetCrcString() string { return "2cef63e7" }
func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *IPPuntRedirectDetails) Size() int {
+func (m *IPPuntRedirectDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Punt.RxSwIfIndex
size += 4 // m.Punt.TxSwIfIndex
size += 1 // m.Punt.Nh.Af
return size
}
func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
buf.EncodeUint8(uint8(m.Punt.Nh.Af))
- buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
return buf.Bytes(), nil
}
func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *IPPuntRedirectDump) Size() int {
+func (m *IPPuntRedirectDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
return size
}
func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsIPv6)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPPuntRedirectReply) Size() int {
+func (m *IPPuntRedirectReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
-func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" }
+func (*IPReassemblyEnableDisable) GetCrcString() string { return "eb77968d" }
func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *IPReassemblyEnableDisable) Size() int {
+func (m *IPReassemblyEnableDisable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.EnableIP4
size += 1 // m.EnableIP6
return size
}
func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.EnableIP4)
buf.EncodeBool(m.EnableIP6)
return api.ReplyMessage
}
-func (m *IPReassemblyEnableDisableReply) Size() int {
+func (m *IPReassemblyEnableDisableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *IPReassemblyGet) Size() int {
+func (m *IPReassemblyGet) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsIP6
size += 4 // m.Type
return size
}
func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsIP6)
buf.EncodeUint32(uint32(m.Type))
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPReassemblyGetReply) Size() int {
+func (m *IPReassemblyGetReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.TimeoutMs
size += 4 // m.MaxReassemblies
return size
}
func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.TimeoutMs))
- buf.EncodeUint32(uint32(m.MaxReassemblies))
- buf.EncodeUint32(uint32(m.MaxReassemblyLength))
- buf.EncodeUint32(uint32(m.ExpireWalkIntervalMs))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.TimeoutMs)
+ buf.EncodeUint32(m.MaxReassemblies)
+ buf.EncodeUint32(m.MaxReassemblyLength)
+ buf.EncodeUint32(m.ExpireWalkIntervalMs)
buf.EncodeBool(m.IsIP6)
return buf.Bytes(), nil
}
func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.TimeoutMs = buf.DecodeUint32()
m.MaxReassemblies = buf.DecodeUint32()
m.MaxReassemblyLength = buf.DecodeUint32()
return api.RequestMessage
}
-func (m *IPReassemblySet) Size() int {
+func (m *IPReassemblySet) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.TimeoutMs
size += 4 // m.MaxReassemblies
size += 4 // m.MaxReassemblyLength
return size
}
func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.TimeoutMs))
- buf.EncodeUint32(uint32(m.MaxReassemblies))
- buf.EncodeUint32(uint32(m.MaxReassemblyLength))
- buf.EncodeUint32(uint32(m.ExpireWalkIntervalMs))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.TimeoutMs)
+ buf.EncodeUint32(m.MaxReassemblies)
+ buf.EncodeUint32(m.MaxReassemblyLength)
+ buf.EncodeUint32(m.ExpireWalkIntervalMs)
buf.EncodeBool(m.IsIP6)
buf.EncodeUint32(uint32(m.Type))
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPReassemblySetReply) Size() int {
+func (m *IPReassemblySetReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
-func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" }
+func (*IPRouteAddDel) GetCrcString() string { return "b8ecfe0d" }
func (*IPRouteAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *IPRouteAddDel) Size() int {
+func (m *IPRouteAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 1 // m.IsMultipath
size += 4 // m.Route.TableID
size += 4 // s2.Nh.ClassifyTableIndex
size += 1 // s2.NLabels
for j3 := 0; j3 < 16; j3++ {
- var s3 fib_types.FibMplsLabel
- _ = s3
- if j3 < len(s2.LabelStack) {
- s3 = s2.LabelStack[j3]
- }
- size += 1 // s3.IsUniform
- size += 4 // s3.Label
- size += 1 // s3.TTL
- size += 1 // s3.Exp
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
}
}
return size
}
func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeBool(m.IsMultipath)
- buf.EncodeUint32(uint32(m.Route.TableID))
- buf.EncodeUint32(uint32(m.Route.StatsIndex))
+ buf.EncodeUint32(m.Route.TableID)
+ buf.EncodeUint32(m.Route.StatsIndex)
buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
- buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Route.Prefix.Len))
+ buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Route.Prefix.Len)
buf.EncodeUint8(uint8(len(m.Route.Paths)))
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 fib_types.FibPath
+ var v1 fib_types.FibPath // Paths
if j1 < len(m.Route.Paths) {
v1 = m.Route.Paths[j1]
}
- buf.EncodeUint32(uint32(v1.SwIfIndex))
- buf.EncodeUint32(uint32(v1.TableID))
- buf.EncodeUint32(uint32(v1.RpfID))
- buf.EncodeUint8(uint8(v1.Weight))
- buf.EncodeUint8(uint8(v1.Preference))
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
buf.EncodeUint32(uint32(v1.Type))
buf.EncodeUint32(uint32(v1.Flags))
buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
- buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
- buf.EncodeUint32(uint32(v1.Nh.ObjID))
- buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
- buf.EncodeUint8(uint8(v1.NLabels))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
for j2 := 0; j2 < 16; j2++ {
- var v2 fib_types.FibMplsLabel
- if j2 < len(v1.LabelStack) {
- v2 = v1.LabelStack[j2]
- }
- buf.EncodeUint8(uint8(v2.IsUniform))
- buf.EncodeUint32(uint32(v2.Label))
- buf.EncodeUint8(uint8(v2.TTL))
- buf.EncodeUint8(uint8(v2.Exp))
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
}
}
return buf.Bytes(), nil
copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.Route.Prefix.Len = buf.DecodeUint8()
m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
+ m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
m.Route.Paths[j1].TableID = buf.DecodeUint32()
return api.ReplyMessage
}
-func (m *IPRouteAddDelReply) Size() int {
+func (m *IPRouteAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.StatsIndex
return size
}
func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.StatsIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.StatsIndex)
return buf.Bytes(), nil
}
func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.StatsIndex = buf.DecodeUint32()
return nil
}
-// IPRouteDetails defines message 'ip_route_details'.
-type IPRouteDetails struct {
- Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
+// IPRouteAddDelV2 defines message 'ip_route_add_del_v2'.
+// InProgress: the message form may change in the future versions
+type IPRouteAddDelV2 struct {
+ 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 IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
}
-func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
-func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
-func (*IPRouteDetails) GetCrcString() string { return "d1ffaae1" }
-func (*IPRouteDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *IPRouteAddDelV2) Reset() { *m = IPRouteAddDelV2{} }
+func (*IPRouteAddDelV2) GetMessageName() string { return "ip_route_add_del_v2" }
+func (*IPRouteAddDelV2) GetCrcString() string { return "521ef330" }
+func (*IPRouteAddDelV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
}
-func (m *IPRouteDetails) Size() int {
+func (m *IPRouteAddDelV2) Size() (size int) {
if m == nil {
return 0
}
- var size int
+ size += 1 // m.IsAdd
+ size += 1 // m.IsMultipath
size += 4 // m.Route.TableID
size += 4 // m.Route.StatsIndex
size += 1 // m.Route.Prefix.Address.Af
size += 1 * 16 // m.Route.Prefix.Address.Un
size += 1 // m.Route.Prefix.Len
size += 1 // m.Route.NPaths
+ size += 1 // m.Route.Src
for j2 := 0; j2 < len(m.Route.Paths); j2++ {
var s2 fib_types.FibPath
_ = s2
size += 4 // s2.Nh.ClassifyTableIndex
size += 1 // s2.NLabels
for j3 := 0; j3 < 16; j3++ {
- var s3 fib_types.FibMplsLabel
- _ = s3
- if j3 < len(s2.LabelStack) {
- s3 = s2.LabelStack[j3]
- }
- size += 1 // s3.IsUniform
- size += 4 // s3.Label
- size += 1 // s3.TTL
- size += 1 // s3.Exp
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
}
}
return size
}
-func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
+func (m *IPRouteAddDelV2) Marshal(b []byte) ([]byte, error) {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Route.TableID))
- buf.EncodeUint32(uint32(m.Route.StatsIndex))
- buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
- buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Route.Prefix.Len))
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.IsAdd)
+ buf.EncodeBool(m.IsMultipath)
+ buf.EncodeUint32(m.Route.TableID)
+ buf.EncodeUint32(m.Route.StatsIndex)
+ buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
+ buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Route.Prefix.Len)
buf.EncodeUint8(uint8(len(m.Route.Paths)))
+ buf.EncodeUint8(m.Route.Src)
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 fib_types.FibPath
+ var v1 fib_types.FibPath // Paths
if j1 < len(m.Route.Paths) {
v1 = m.Route.Paths[j1]
}
- buf.EncodeUint32(uint32(v1.SwIfIndex))
- buf.EncodeUint32(uint32(v1.TableID))
- buf.EncodeUint32(uint32(v1.RpfID))
- buf.EncodeUint8(uint8(v1.Weight))
- buf.EncodeUint8(uint8(v1.Preference))
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
buf.EncodeUint32(uint32(v1.Type))
buf.EncodeUint32(uint32(v1.Flags))
buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
- buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
- buf.EncodeUint32(uint32(v1.Nh.ObjID))
- buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
- buf.EncodeUint8(uint8(v1.NLabels))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
for j2 := 0; j2 < 16; j2++ {
- var v2 fib_types.FibMplsLabel
- if j2 < len(v1.LabelStack) {
- v2 = v1.LabelStack[j2]
- }
- buf.EncodeUint8(uint8(v2.IsUniform))
- buf.EncodeUint32(uint32(v2.Label))
- buf.EncodeUint8(uint8(v2.TTL))
- buf.EncodeUint8(uint8(v2.Exp))
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
+ }
+ }
+ return buf.Bytes(), nil
+}
+func (m *IPRouteAddDelV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsAdd = buf.DecodeBool()
+ m.IsMultipath = buf.DecodeBool()
+ m.Route.TableID = buf.DecodeUint32()
+ m.Route.StatsIndex = buf.DecodeUint32()
+ m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Route.Prefix.Len = buf.DecodeUint8()
+ m.Route.NPaths = buf.DecodeUint8()
+ m.Route.Src = buf.DecodeUint8()
+ m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
+ for j1 := 0; j1 < len(m.Route.Paths); j1++ {
+ m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
+ m.Route.Paths[j1].TableID = buf.DecodeUint32()
+ m.Route.Paths[j1].RpfID = buf.DecodeUint32()
+ m.Route.Paths[j1].Weight = buf.DecodeUint8()
+ m.Route.Paths[j1].Preference = buf.DecodeUint8()
+ m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
+ m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
+ m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
+ copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
+ m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
+ m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
+ m.Route.Paths[j1].NLabels = buf.DecodeUint8()
+ for j2 := 0; j2 < 16; j2++ {
+ m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
+ m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
+ m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
+ m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
+ }
+ }
+ return nil
+}
+
+// IPRouteAddDelV2Reply defines message 'ip_route_add_del_v2_reply'.
+// InProgress: the message form may change in the future versions
+type IPRouteAddDelV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
+}
+
+func (m *IPRouteAddDelV2Reply) Reset() { *m = IPRouteAddDelV2Reply{} }
+func (*IPRouteAddDelV2Reply) GetMessageName() string { return "ip_route_add_del_v2_reply" }
+func (*IPRouteAddDelV2Reply) GetCrcString() string { return "1992deab" }
+func (*IPRouteAddDelV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPRouteAddDelV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.StatsIndex
+ return size
+}
+func (m *IPRouteAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.StatsIndex)
+ return buf.Bytes(), nil
+}
+func (m *IPRouteAddDelV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.StatsIndex = buf.DecodeUint32()
+ return nil
+}
+
+// IPRouteDetails defines message 'ip_route_details'.
+type IPRouteDetails struct {
+ Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
+}
+
+func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
+func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
+func (*IPRouteDetails) GetCrcString() string { return "bda8f315" }
+func (*IPRouteDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPRouteDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Route.TableID
+ size += 4 // m.Route.StatsIndex
+ size += 1 // m.Route.Prefix.Address.Af
+ size += 1 * 16 // m.Route.Prefix.Address.Un
+ size += 1 // m.Route.Prefix.Len
+ size += 1 // m.Route.NPaths
+ 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]
+ }
+ size += 4 // s2.SwIfIndex
+ size += 4 // s2.TableID
+ size += 4 // s2.RpfID
+ size += 1 // s2.Weight
+ size += 1 // s2.Preference
+ size += 4 // s2.Type
+ size += 4 // s2.Flags
+ size += 4 // s2.Proto
+ size += 1 * 16 // s2.Nh.Address
+ size += 4 // s2.Nh.ViaLabel
+ size += 4 // s2.Nh.ObjID
+ size += 4 // s2.Nh.ClassifyTableIndex
+ size += 1 // s2.NLabels
+ for j3 := 0; j3 < 16; j3++ {
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
+ }
+ }
+ return size
+}
+func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Route.TableID)
+ buf.EncodeUint32(m.Route.StatsIndex)
+ buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
+ buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Route.Prefix.Len)
+ buf.EncodeUint8(uint8(len(m.Route.Paths)))
+ for j1 := 0; j1 < len(m.Route.Paths); j1++ {
+ var v1 fib_types.FibPath // Paths
+ if j1 < len(m.Route.Paths) {
+ v1 = m.Route.Paths[j1]
+ }
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
+ buf.EncodeUint32(uint32(v1.Type))
+ buf.EncodeUint32(uint32(v1.Flags))
+ buf.EncodeUint32(uint32(v1.Proto))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
+ for j2 := 0; j2 < 16; j2++ {
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
}
}
return buf.Bytes(), nil
copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.Route.Prefix.Len = buf.DecodeUint8()
m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
+ m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
m.Route.Paths[j1].TableID = buf.DecodeUint32()
return api.RequestMessage
}
-func (m *IPRouteDump) Size() int {
+func (m *IPRouteDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
size += 64 // m.Table.Name
return size
}
func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} }
func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
-func (*IPRouteLookup) GetCrcString() string { return "e2986185" }
+func (*IPRouteLookup) GetCrcString() string { return "710d6471" }
func (*IPRouteLookup) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *IPRouteLookup) Size() int {
+func (m *IPRouteLookup) Size() (size int) {
if m == nil {
return 0
}
- var size int
- size += 4 // m.TableID
- size += 1 // m.Exact
- size += 1 // m.Prefix.Address.Af
- size += 1 * 16 // m.Prefix.Address.Un
- size += 1 // m.Prefix.Len
+ size += 4 // m.TableID
+ size += 1 // m.Exact
+ size += 1 // m.Prefix.Address.Af
+ size += 1 * 16 // m.Prefix.Address.Un
+ size += 1 // m.Prefix.Len
+ return size
+}
+func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.TableID)
+ buf.EncodeUint8(m.Exact)
+ buf.EncodeUint8(uint8(m.Prefix.Address.Af))
+ buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Prefix.Len)
+ return buf.Bytes(), nil
+}
+func (m *IPRouteLookup) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.TableID = buf.DecodeUint32()
+ m.Exact = buf.DecodeUint8()
+ m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Prefix.Len = buf.DecodeUint8()
+ return nil
+}
+
+// IPRouteLookupReply defines 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 "5d8febcb" }
+func (*IPRouteLookupReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPRouteLookupReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Route.TableID
+ size += 4 // m.Route.StatsIndex
+ size += 1 // m.Route.Prefix.Address.Af
+ size += 1 * 16 // m.Route.Prefix.Address.Un
+ size += 1 // m.Route.Prefix.Len
+ size += 1 // m.Route.NPaths
+ 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]
+ }
+ size += 4 // s2.SwIfIndex
+ size += 4 // s2.TableID
+ size += 4 // s2.RpfID
+ size += 1 // s2.Weight
+ size += 1 // s2.Preference
+ size += 4 // s2.Type
+ size += 4 // s2.Flags
+ size += 4 // s2.Proto
+ size += 1 * 16 // s2.Nh.Address
+ size += 4 // s2.Nh.ViaLabel
+ size += 4 // s2.Nh.ObjID
+ size += 4 // s2.Nh.ClassifyTableIndex
+ size += 1 // s2.NLabels
+ for j3 := 0; j3 < 16; j3++ {
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
+ }
+ }
+ return size
+}
+func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.Route.TableID)
+ buf.EncodeUint32(m.Route.StatsIndex)
+ buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
+ buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Route.Prefix.Len)
+ buf.EncodeUint8(uint8(len(m.Route.Paths)))
+ for j1 := 0; j1 < len(m.Route.Paths); j1++ {
+ var v1 fib_types.FibPath // Paths
+ if j1 < len(m.Route.Paths) {
+ v1 = m.Route.Paths[j1]
+ }
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
+ buf.EncodeUint32(uint32(v1.Type))
+ buf.EncodeUint32(uint32(v1.Flags))
+ buf.EncodeUint32(uint32(v1.Proto))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
+ for j2 := 0; j2 < 16; j2++ {
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
+ }
+ }
+ return buf.Bytes(), nil
+}
+func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Route.TableID = buf.DecodeUint32()
+ m.Route.StatsIndex = buf.DecodeUint32()
+ m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Route.Prefix.Len = buf.DecodeUint8()
+ m.Route.NPaths = buf.DecodeUint8()
+ m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
+ for j1 := 0; j1 < len(m.Route.Paths); j1++ {
+ m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
+ m.Route.Paths[j1].TableID = buf.DecodeUint32()
+ m.Route.Paths[j1].RpfID = buf.DecodeUint32()
+ m.Route.Paths[j1].Weight = buf.DecodeUint8()
+ m.Route.Paths[j1].Preference = buf.DecodeUint8()
+ m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
+ m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
+ m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
+ copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
+ m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
+ m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
+ m.Route.Paths[j1].NLabels = buf.DecodeUint8()
+ for j2 := 0; j2 < 16; j2++ {
+ m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
+ m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
+ m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
+ m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
+ }
+ }
+ return nil
+}
+
+// IPRouteLookupV2 defines message 'ip_route_lookup_v2'.
+// InProgress: the message form may change in the future versions
+type IPRouteLookupV2 struct {
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
+ Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
+}
+
+func (m *IPRouteLookupV2) Reset() { *m = IPRouteLookupV2{} }
+func (*IPRouteLookupV2) GetMessageName() string { return "ip_route_lookup_v2" }
+func (*IPRouteLookupV2) GetCrcString() string { return "710d6471" }
+func (*IPRouteLookupV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPRouteLookupV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.TableID
+ size += 1 // m.Exact
+ size += 1 // m.Prefix.Address.Af
+ size += 1 * 16 // m.Prefix.Address.Un
+ size += 1 // m.Prefix.Len
+ return size
+}
+func (m *IPRouteLookupV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.TableID)
+ buf.EncodeUint8(m.Exact)
+ buf.EncodeUint8(uint8(m.Prefix.Address.Af))
+ buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Prefix.Len)
+ return buf.Bytes(), nil
+}
+func (m *IPRouteLookupV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.TableID = buf.DecodeUint32()
+ m.Exact = buf.DecodeUint8()
+ m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Prefix.Len = buf.DecodeUint8()
+ return nil
+}
+
+// IPRouteLookupV2Reply defines message 'ip_route_lookup_v2_reply'.
+// InProgress: the message form may change in the future versions
+type IPRouteLookupV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
+}
+
+func (m *IPRouteLookupV2Reply) Reset() { *m = IPRouteLookupV2Reply{} }
+func (*IPRouteLookupV2Reply) GetMessageName() string { return "ip_route_lookup_v2_reply" }
+func (*IPRouteLookupV2Reply) GetCrcString() string { return "84cc9e03" }
+func (*IPRouteLookupV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPRouteLookupV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Route.TableID
+ size += 4 // m.Route.StatsIndex
+ size += 1 // m.Route.Prefix.Address.Af
+ size += 1 * 16 // m.Route.Prefix.Address.Un
+ size += 1 // m.Route.Prefix.Len
+ size += 1 // m.Route.NPaths
+ size += 1 // m.Route.Src
+ 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]
+ }
+ size += 4 // s2.SwIfIndex
+ size += 4 // s2.TableID
+ size += 4 // s2.RpfID
+ size += 1 // s2.Weight
+ size += 1 // s2.Preference
+ size += 4 // s2.Type
+ size += 4 // s2.Flags
+ size += 4 // s2.Proto
+ size += 1 * 16 // s2.Nh.Address
+ size += 4 // s2.Nh.ViaLabel
+ size += 4 // s2.Nh.ObjID
+ size += 4 // s2.Nh.ClassifyTableIndex
+ size += 1 // s2.NLabels
+ for j3 := 0; j3 < 16; j3++ {
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
+ }
+ }
return size
}
-func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
+func (m *IPRouteLookupV2Reply) Marshal(b []byte) ([]byte, error) {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.Route.TableID)
+ buf.EncodeUint32(m.Route.StatsIndex)
+ buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
+ buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Route.Prefix.Len)
+ buf.EncodeUint8(uint8(len(m.Route.Paths)))
+ buf.EncodeUint8(m.Route.Src)
+ for j1 := 0; j1 < len(m.Route.Paths); j1++ {
+ var v1 fib_types.FibPath // Paths
+ if j1 < len(m.Route.Paths) {
+ v1 = m.Route.Paths[j1]
+ }
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
+ buf.EncodeUint32(uint32(v1.Type))
+ buf.EncodeUint32(uint32(v1.Flags))
+ buf.EncodeUint32(uint32(v1.Proto))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
+ for j2 := 0; j2 < 16; j2++ {
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
+ }
}
- buf.EncodeUint32(uint32(m.TableID))
- buf.EncodeUint8(uint8(m.Exact))
- buf.EncodeUint8(uint8(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Prefix.Len))
return buf.Bytes(), nil
}
-func (m *IPRouteLookup) Unmarshal(b []byte) error {
+func (m *IPRouteLookupV2Reply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.TableID = buf.DecodeUint32()
- m.Exact = buf.DecodeUint8()
- m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
+ m.Retval = buf.DecodeInt32()
+ m.Route.TableID = buf.DecodeUint32()
+ m.Route.StatsIndex = buf.DecodeUint32()
+ m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Route.Prefix.Len = buf.DecodeUint8()
+ m.Route.NPaths = buf.DecodeUint8()
+ m.Route.Src = buf.DecodeUint8()
+ m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
+ for j1 := 0; j1 < len(m.Route.Paths); j1++ {
+ m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
+ m.Route.Paths[j1].TableID = buf.DecodeUint32()
+ m.Route.Paths[j1].RpfID = buf.DecodeUint32()
+ m.Route.Paths[j1].Weight = buf.DecodeUint8()
+ m.Route.Paths[j1].Preference = buf.DecodeUint8()
+ m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
+ m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
+ m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
+ copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
+ m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
+ m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
+ m.Route.Paths[j1].NLabels = buf.DecodeUint8()
+ for j2 := 0; j2 < 16; j2++ {
+ m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
+ m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
+ m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
+ m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
+ }
+ }
return nil
}
-// IPRouteLookupReply defines 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"`
+// IPRouteV2Details defines message 'ip_route_v2_details'.
+// InProgress: the message form may change in the future versions
+type IPRouteV2Details struct {
+ Route IPRouteV2 `binapi:"ip_route_v2,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 {
+func (m *IPRouteV2Details) Reset() { *m = IPRouteV2Details{} }
+func (*IPRouteV2Details) GetMessageName() string { return "ip_route_v2_details" }
+func (*IPRouteV2Details) GetCrcString() string { return "b09aa6c0" }
+func (*IPRouteV2Details) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *IPRouteLookupReply) Size() int {
+func (m *IPRouteV2Details) Size() (size int) {
if m == nil {
return 0
}
- var size int
- size += 4 // m.Retval
size += 4 // m.Route.TableID
size += 4 // m.Route.StatsIndex
size += 1 // m.Route.Prefix.Address.Af
size += 1 * 16 // m.Route.Prefix.Address.Un
size += 1 // m.Route.Prefix.Len
size += 1 // m.Route.NPaths
+ size += 1 // m.Route.Src
for j2 := 0; j2 < len(m.Route.Paths); j2++ {
var s2 fib_types.FibPath
_ = s2
size += 4 // s2.Nh.ClassifyTableIndex
size += 1 // s2.NLabels
for j3 := 0; j3 < 16; j3++ {
- var s3 fib_types.FibMplsLabel
- _ = s3
- if j3 < len(s2.LabelStack) {
- s3 = s2.LabelStack[j3]
- }
- size += 1 // s3.IsUniform
- size += 4 // s3.Label
- size += 1 // s3.TTL
- size += 1 // s3.Exp
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
}
}
return size
}
-func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
+func (m *IPRouteV2Details) Marshal(b []byte) ([]byte, error) {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.Route.TableID))
- buf.EncodeUint32(uint32(m.Route.StatsIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Route.TableID)
+ buf.EncodeUint32(m.Route.StatsIndex)
buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
- buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Route.Prefix.Len))
+ buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Route.Prefix.Len)
buf.EncodeUint8(uint8(len(m.Route.Paths)))
+ buf.EncodeUint8(m.Route.Src)
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 fib_types.FibPath
+ var v1 fib_types.FibPath // Paths
if j1 < len(m.Route.Paths) {
v1 = m.Route.Paths[j1]
}
- buf.EncodeUint32(uint32(v1.SwIfIndex))
- buf.EncodeUint32(uint32(v1.TableID))
- buf.EncodeUint32(uint32(v1.RpfID))
- buf.EncodeUint8(uint8(v1.Weight))
- buf.EncodeUint8(uint8(v1.Preference))
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
buf.EncodeUint32(uint32(v1.Type))
buf.EncodeUint32(uint32(v1.Flags))
buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
- buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
- buf.EncodeUint32(uint32(v1.Nh.ObjID))
- buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
- buf.EncodeUint8(uint8(v1.NLabels))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
for j2 := 0; j2 < 16; j2++ {
- var v2 fib_types.FibMplsLabel
- if j2 < len(v1.LabelStack) {
- v2 = v1.LabelStack[j2]
- }
- buf.EncodeUint8(uint8(v2.IsUniform))
- buf.EncodeUint32(uint32(v2.Label))
- buf.EncodeUint8(uint8(v2.TTL))
- buf.EncodeUint8(uint8(v2.Exp))
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
}
}
return buf.Bytes(), nil
}
-func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
+func (m *IPRouteV2Details) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
m.Route.TableID = buf.DecodeUint32()
m.Route.StatsIndex = buf.DecodeUint32()
m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.Route.Prefix.Len = buf.DecodeUint8()
m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
+ m.Route.Src = buf.DecodeUint8()
+ m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
for j1 := 0; j1 < len(m.Route.Paths); j1++ {
m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
m.Route.Paths[j1].TableID = buf.DecodeUint32()
return nil
}
+// IPRouteV2Dump defines message 'ip_route_v2_dump'.
+// InProgress: the message form may change in the future versions
+type IPRouteV2Dump struct {
+ Src uint8 `binapi:"u8,name=src" json:"src,omitempty"`
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
+}
+
+func (m *IPRouteV2Dump) Reset() { *m = IPRouteV2Dump{} }
+func (*IPRouteV2Dump) GetMessageName() string { return "ip_route_v2_dump" }
+func (*IPRouteV2Dump) GetCrcString() string { return "d16f72e6" }
+func (*IPRouteV2Dump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPRouteV2Dump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.Src
+ size += 4 // m.Table.TableID
+ size += 1 // m.Table.IsIP6
+ size += 64 // m.Table.Name
+ return size
+}
+func (m *IPRouteV2Dump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint8(m.Src)
+ buf.EncodeUint32(m.Table.TableID)
+ buf.EncodeBool(m.Table.IsIP6)
+ buf.EncodeString(m.Table.Name, 64)
+ return buf.Bytes(), nil
+}
+func (m *IPRouteV2Dump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Src = buf.DecodeUint8()
+ m.Table.TableID = buf.DecodeUint32()
+ m.Table.IsIP6 = buf.DecodeBool()
+ m.Table.Name = buf.DecodeString(64)
+ return nil
+}
+
// IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
type IPSourceAndPortRangeCheckAddDel struct {
IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
return "ip_source_and_port_range_check_add_del"
}
-func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" }
+func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "92a067e3" }
func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *IPSourceAndPortRangeCheckAddDel) Size() int {
+func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 1 // m.Prefix.Address.Af
size += 1 * 16 // m.Prefix.Address.Un
return size
}
func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint8(uint8(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Prefix.Len))
- buf.EncodeUint8(uint8(m.NumberOfRanges))
+ buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Prefix.Len)
+ buf.EncodeUint8(m.NumberOfRanges)
for i := 0; i < 32; i++ {
var x uint16
if i < len(m.LowPorts) {
x = uint16(m.LowPorts[i])
}
- buf.EncodeUint16(uint16(x))
+ buf.EncodeUint16(x)
}
for i := 0; i < 32; i++ {
var x uint16
if i < len(m.HighPorts) {
x = uint16(m.HighPorts[i])
}
- buf.EncodeUint16(uint16(x))
+ buf.EncodeUint16(x)
}
- buf.EncodeUint32(uint32(m.VrfID))
+ buf.EncodeUint32(m.VrfID)
return buf.Bytes(), nil
}
func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *IPSourceAndPortRangeCheckAddDelReply) Size() int {
+func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() int {
+func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.SwIfIndex
size += 4 // m.TCPInVrfID
return size
}
func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.TCPInVrfID))
- buf.EncodeUint32(uint32(m.TCPOutVrfID))
- buf.EncodeUint32(uint32(m.UDPInVrfID))
- buf.EncodeUint32(uint32(m.UDPOutVrfID))
+ buf.EncodeUint32(m.TCPInVrfID)
+ buf.EncodeUint32(m.TCPOutVrfID)
+ buf.EncodeUint32(m.UDPInVrfID)
+ buf.EncodeUint32(m.UDPOutVrfID)
return buf.Bytes(), nil
}
func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() int {
+func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *IPTableAddDel) Size() int {
+func (m *IPTableAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
return size
}
func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPTableAddDelReply) Size() int {
+func (m *IPTableAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.ReplyMessage
}
-func (m *IPTableDetails) Size() int {
+func (m *IPTableDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
size += 64 // m.Table.Name
return size
}
func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
return api.RequestMessage
}
-func (m *IPTableDump) Size() int {
+func (m *IPTableDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *IPTableDump) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *IPTableFlush) Size() int {
+func (m *IPTableFlush) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
size += 64 // m.Table.Name
return size
}
func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPTableFlushReply) Size() int {
+func (m *IPTableFlushReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPTableFlushReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *IPTableReplaceBegin) Size() int {
+func (m *IPTableReplaceBegin) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
size += 64 // m.Table.Name
return size
}
func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPTableReplaceBeginReply) Size() int {
+func (m *IPTableReplaceBeginReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *IPTableReplaceEnd) Size() int {
+func (m *IPTableReplaceEnd) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Table.TableID
size += 1 // m.Table.IsIP6
size += 64 // m.Table.Name
return size
}
func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Table.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
buf.EncodeBool(m.Table.IsIP6)
buf.EncodeString(m.Table.Name, 64)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *IPTableReplaceEndReply) Size() int {
+func (m *IPTableReplaceEndReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
-func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" }
+func (*IPUnnumberedDetails) GetCrcString() string { return "cc59bd42" }
func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *IPUnnumberedDetails) Size() int {
+func (m *IPUnnumberedDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.IPSwIfIndex
return size
}
func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeUint32(uint32(m.IPSwIfIndex))
return buf.Bytes(), nil
// IPUnnumberedDump defines message 'ip_unnumbered_dump'.
type IPUnnumberedDump struct {
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
}
func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
return api.RequestMessage
}
-func (m *IPUnnumberedDump) Size() int {
+func (m *IPUnnumberedDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
return size
}
func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
-func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" }
+func (*MfibSignalDetails) GetCrcString() string { return "6f4a4cfb" }
func (*MfibSignalDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *MfibSignalDetails) Size() int {
+func (m *MfibSignalDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.TableID
size += 1 // m.Prefix.Af
return size
}
func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.TableID))
+ buf.EncodeUint32(m.TableID)
buf.EncodeUint8(uint8(m.Prefix.Af))
- buf.EncodeUint16(uint16(m.Prefix.GrpAddressLength))
- buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 0)
- buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 0)
- buf.EncodeUint16(uint16(m.IPPacketLen))
- buf.EncodeBytes(m.IPPacketData[:], 256)
+ buf.EncodeUint16(m.Prefix.GrpAddressLength)
+ buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16)
+ buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.IPPacketLen)
+ buf.EncodeBytes(m.IPPacketData, 256)
return buf.Bytes(), nil
}
func (m *MfibSignalDetails) Unmarshal(b []byte) error {
copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
m.IPPacketLen = buf.DecodeUint16()
- copy(m.IPPacketData[:], buf.DecodeBytes(256))
+ m.IPPacketData = make([]byte, 256)
+ copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData)))
return nil
}
return api.RequestMessage
}
-func (m *MfibSignalDump) Size() int {
+func (m *MfibSignalDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *MfibSignalDump) Unmarshal(b []byte) error {
}
// SetIPFlowHash defines message 'set_ip_flow_hash'.
+// Deprecated: the message will be removed in the future versions
type SetIPFlowHash struct {
VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
return api.RequestMessage
}
-func (m *SetIPFlowHash) Size() int {
+func (m *SetIPFlowHash) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.VrfID
size += 1 // m.IsIPv6
size += 1 // m.Src
return size
}
func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.VrfID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.VrfID)
buf.EncodeBool(m.IsIPv6)
buf.EncodeBool(m.Src)
buf.EncodeBool(m.Dst)
}
// SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
+// Deprecated: the message will be removed in the future versions
type SetIPFlowHashReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
return api.ReplyMessage
}
-func (m *SetIPFlowHashReply) Size() int {
+func (m *SetIPFlowHashReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// SetIPFlowHashRouterID defines message 'set_ip_flow_hash_router_id'.
+type SetIPFlowHashRouterID struct {
+ RouterID uint32 `binapi:"u32,name=router_id" json:"router_id,omitempty"`
+}
+
+func (m *SetIPFlowHashRouterID) Reset() { *m = SetIPFlowHashRouterID{} }
+func (*SetIPFlowHashRouterID) GetMessageName() string { return "set_ip_flow_hash_router_id" }
+func (*SetIPFlowHashRouterID) GetCrcString() string { return "03e4f48e" }
+func (*SetIPFlowHashRouterID) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SetIPFlowHashRouterID) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.RouterID
+ return size
+}
+func (m *SetIPFlowHashRouterID) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.RouterID)
+ return buf.Bytes(), nil
+}
+func (m *SetIPFlowHashRouterID) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.RouterID = buf.DecodeUint32()
+ return nil
+}
+
+// SetIPFlowHashRouterIDReply defines message 'set_ip_flow_hash_router_id_reply'.
+type SetIPFlowHashRouterIDReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *SetIPFlowHashRouterIDReply) Reset() { *m = SetIPFlowHashRouterIDReply{} }
+func (*SetIPFlowHashRouterIDReply) GetMessageName() string { return "set_ip_flow_hash_router_id_reply" }
+func (*SetIPFlowHashRouterIDReply) GetCrcString() string { return "e8d4e804" }
+func (*SetIPFlowHashRouterIDReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SetIPFlowHashRouterIDReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *SetIPFlowHashRouterIDReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *SetIPFlowHashRouterIDReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// SetIPFlowHashV2 defines message 'set_ip_flow_hash_v2'.
+type SetIPFlowHashV2 struct {
+ TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+ Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
+ FlowHashConfig IPFlowHashConfig `binapi:"ip_flow_hash_config,name=flow_hash_config" json:"flow_hash_config,omitempty"`
+}
+
+func (m *SetIPFlowHashV2) Reset() { *m = SetIPFlowHashV2{} }
+func (*SetIPFlowHashV2) GetMessageName() string { return "set_ip_flow_hash_v2" }
+func (*SetIPFlowHashV2) GetCrcString() string { return "6d132100" }
+func (*SetIPFlowHashV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SetIPFlowHashV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.TableID
+ size += 1 // m.Af
+ size += 4 // m.FlowHashConfig
+ return size
+}
+func (m *SetIPFlowHashV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.TableID)
+ buf.EncodeUint8(uint8(m.Af))
+ buf.EncodeUint32(uint32(m.FlowHashConfig))
+ return buf.Bytes(), nil
+}
+func (m *SetIPFlowHashV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.TableID = buf.DecodeUint32()
+ m.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ m.FlowHashConfig = IPFlowHashConfig(buf.DecodeUint32())
+ return nil
+}
+
+// SetIPFlowHashV2Reply defines message 'set_ip_flow_hash_v2_reply'.
+type SetIPFlowHashV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *SetIPFlowHashV2Reply) Reset() { *m = SetIPFlowHashV2Reply{} }
+func (*SetIPFlowHashV2Reply) GetMessageName() string { return "set_ip_flow_hash_v2_reply" }
+func (*SetIPFlowHashV2Reply) GetCrcString() string { return "e8d4e804" }
+func (*SetIPFlowHashV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SetIPFlowHashV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *SetIPFlowHashV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *SetIPFlowHashV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *SwInterfaceIP6EnableDisable) Size() int {
+func (m *SwInterfaceIP6EnableDisable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.Enable
return size
}
func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.Enable)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *SwInterfaceIP6EnableDisableReply) Size() int {
+func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// SwInterfaceIP6GetLinkLocalAddress defines message 'sw_interface_ip6_get_link_local_address'.
+type SwInterfaceIP6GetLinkLocalAddress struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *SwInterfaceIP6GetLinkLocalAddress) Reset() { *m = SwInterfaceIP6GetLinkLocalAddress{} }
+func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageName() string {
+ return "sw_interface_ip6_get_link_local_address"
+}
+func (*SwInterfaceIP6GetLinkLocalAddress) GetCrcString() string { return "f9e6675e" }
+func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceIP6GetLinkLocalAddress) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *SwInterfaceIP6GetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceIP6GetLinkLocalAddress) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// SwInterfaceIP6GetLinkLocalAddressReply defines message 'sw_interface_ip6_get_link_local_address_reply'.
+type SwInterfaceIP6GetLinkLocalAddressReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
+}
+
+func (m *SwInterfaceIP6GetLinkLocalAddressReply) Reset() {
+ *m = SwInterfaceIP6GetLinkLocalAddressReply{}
+}
+func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageName() string {
+ return "sw_interface_ip6_get_link_local_address_reply"
+}
+func (*SwInterfaceIP6GetLinkLocalAddressReply) GetCrcString() string { return "d16b7130" }
+func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SwInterfaceIP6GetLinkLocalAddressReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 1 * 16 // m.IP
+ return size
+}
+func (m *SwInterfaceIP6GetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeBytes(m.IP[:], 16)
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceIP6GetLinkLocalAddressReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ copy(m.IP[:], buf.DecodeBytes(16))
return nil
}
func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
return "sw_interface_ip6_set_link_local_address"
}
-func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" }
+func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "1c10f15f" }
func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *SwInterfaceIP6SetLinkLocalAddress) Size() int {
+func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 * 16 // m.IP
return size
}
func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBytes(m.IP[:], 16)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() int {
+func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
- api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_b1199745")
+ api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_ee29b797")
api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
- api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40")
+ api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_7df1dff1")
api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
- api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8")
+ api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_a8085523")
api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
- api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_f6627d17")
+ api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_0dd7e790")
api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
- api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c1cb4b44")
+ api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c5cb23fc")
api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
+ api.RegisterMessage((*IPPathMtuDetails)(nil), "ip_path_mtu_details_ac9539a7")
+ api.RegisterMessage((*IPPathMtuGet)(nil), "ip_path_mtu_get_f75ba505")
+ api.RegisterMessage((*IPPathMtuGetReply)(nil), "ip_path_mtu_get_reply_53b48f5d")
+ api.RegisterMessage((*IPPathMtuReplaceBegin)(nil), "ip_path_mtu_replace_begin_51077d14")
+ api.RegisterMessage((*IPPathMtuReplaceBeginReply)(nil), "ip_path_mtu_replace_begin_reply_e8d4e804")
+ api.RegisterMessage((*IPPathMtuReplaceEnd)(nil), "ip_path_mtu_replace_end_51077d14")
+ api.RegisterMessage((*IPPathMtuReplaceEndReply)(nil), "ip_path_mtu_replace_end_reply_e8d4e804")
+ api.RegisterMessage((*IPPathMtuUpdate)(nil), "ip_path_mtu_update_10bbe5cb")
+ api.RegisterMessage((*IPPathMtuUpdateReply)(nil), "ip_path_mtu_update_reply_e8d4e804")
api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
- api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_a9a5592c")
- api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_3924f5d3")
+ api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_6580f635")
+ api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7")
api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
- api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_885c85a6")
+ api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d")
api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
- api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_c1ff832d")
+ api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_b8ecfe0d")
api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
- api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1")
+ api.RegisterMessage((*IPRouteAddDelV2)(nil), "ip_route_add_del_v2_521ef330")
+ api.RegisterMessage((*IPRouteAddDelV2Reply)(nil), "ip_route_add_del_v2_reply_1992deab")
+ api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_bda8f315")
api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
- api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_e2986185")
- api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_ae99de8e")
- api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_8bfc76f2")
+ api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_710d6471")
+ api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_5d8febcb")
+ api.RegisterMessage((*IPRouteLookupV2)(nil), "ip_route_lookup_v2_710d6471")
+ api.RegisterMessage((*IPRouteLookupV2Reply)(nil), "ip_route_lookup_v2_reply_84cc9e03")
+ api.RegisterMessage((*IPRouteV2Details)(nil), "ip_route_v2_details_b09aa6c0")
+ api.RegisterMessage((*IPRouteV2Dump)(nil), "ip_route_v2_dump_d16f72e6")
+ api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_92a067e3")
api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
- api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_aa12a483")
+ api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_cc59bd42")
api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
- api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a")
+ api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_6f4a4cfb")
api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
+ api.RegisterMessage((*SetIPFlowHashRouterID)(nil), "set_ip_flow_hash_router_id_03e4f48e")
+ api.RegisterMessage((*SetIPFlowHashRouterIDReply)(nil), "set_ip_flow_hash_router_id_reply_e8d4e804")
+ api.RegisterMessage((*SetIPFlowHashV2)(nil), "set_ip_flow_hash_v2_6d132100")
+ api.RegisterMessage((*SetIPFlowHashV2Reply)(nil), "set_ip_flow_hash_v2_reply_e8d4e804")
api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_2931d9fa")
+ api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddress)(nil), "sw_interface_ip6_get_link_local_address_f9e6675e")
+ api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddressReply)(nil), "sw_interface_ip6_get_link_local_address_reply_d16b7130")
+ api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_1c10f15f")
api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
}
(*IPMrouteDump)(nil),
(*IPMtableDetails)(nil),
(*IPMtableDump)(nil),
+ (*IPPathMtuDetails)(nil),
+ (*IPPathMtuGet)(nil),
+ (*IPPathMtuGetReply)(nil),
+ (*IPPathMtuReplaceBegin)(nil),
+ (*IPPathMtuReplaceBeginReply)(nil),
+ (*IPPathMtuReplaceEnd)(nil),
+ (*IPPathMtuReplaceEndReply)(nil),
+ (*IPPathMtuUpdate)(nil),
+ (*IPPathMtuUpdateReply)(nil),
(*IPPuntPolice)(nil),
(*IPPuntPoliceReply)(nil),
(*IPPuntRedirect)(nil),
(*IPReassemblySetReply)(nil),
(*IPRouteAddDel)(nil),
(*IPRouteAddDelReply)(nil),
+ (*IPRouteAddDelV2)(nil),
+ (*IPRouteAddDelV2Reply)(nil),
(*IPRouteDetails)(nil),
(*IPRouteDump)(nil),
(*IPRouteLookup)(nil),
(*IPRouteLookupReply)(nil),
+ (*IPRouteLookupV2)(nil),
+ (*IPRouteLookupV2Reply)(nil),
+ (*IPRouteV2Details)(nil),
+ (*IPRouteV2Dump)(nil),
(*IPSourceAndPortRangeCheckAddDel)(nil),
(*IPSourceAndPortRangeCheckAddDelReply)(nil),
(*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
(*MfibSignalDump)(nil),
(*SetIPFlowHash)(nil),
(*SetIPFlowHashReply)(nil),
+ (*SetIPFlowHashRouterID)(nil),
+ (*SetIPFlowHashRouterIDReply)(nil),
+ (*SetIPFlowHashV2)(nil),
+ (*SetIPFlowHashV2Reply)(nil),
(*SwInterfaceIP6EnableDisable)(nil),
(*SwInterfaceIP6EnableDisableReply)(nil),
+ (*SwInterfaceIP6GetLinkLocalAddress)(nil),
+ (*SwInterfaceIP6GetLinkLocalAddressReply)(nil),
(*SwInterfaceIP6SetLinkLocalAddress)(nil),
(*SwInterfaceIP6SetLinkLocalAddressReply)(nil),
}