diff options
Diffstat (limited to 'binapi/ip/ip.ba.go')
-rw-r--r-- | binapi/ip/ip.ba.go | 3269 |
1 files changed, 3269 insertions, 0 deletions
diff --git a/binapi/ip/ip.ba.go b/binapi/ip/ip.ba.go new file mode 100644 index 0000000..7702c92 --- /dev/null +++ b/binapi/ip/ip.ba.go @@ -0,0 +1,3269 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.4.0-dev +// VPP: 20.05-release +// source: /usr/share/vpp/api/core/ip.api.json + +// Package ip contains generated bindings for API file ip.api. +// +// Contents: +// 1 enum +// 4 structs +// 60 messages +// +package ip + +import ( + 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" + interface_types "git.fd.io/govpp.git/binapi/interface_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 +// is compatible with the GoVPP api package it is being compiled against. +// A compilation error at this line likely means your copy of the +// GoVPP api package needs to be updated. +const _ = api.GoVppAPIPackageIsVersion2 + +const ( + APIFile = "ip" + APIVersion = "3.0.1" + VersionCrc = 0x765d74b1 +) + +// IPReassType defines enum 'ip_reass_type'. +type IPReassType uint32 + +const ( + IP_REASS_TYPE_FULL IPReassType = 0 + IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1 +) + +var ( + IPReassType_name = map[uint32]string{ + 0: "IP_REASS_TYPE_FULL", + 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL", + } + IPReassType_value = map[string]uint32{ + "IP_REASS_TYPE_FULL": 0, + "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1, + } +) + +func (x IPReassType) String() string { + s, ok := IPReassType_name[uint32(x)] + if ok { + return s + } + return "IPReassType(" + strconv.Itoa(int(x)) + ")" +} + +// 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"` +} + +// IPRoute defines type 'ip_route'. +type IPRoute 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:"-"` + 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"` + IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` +} + +// PuntRedirect defines type 'punt_redirect'. +type PuntRedirect struct { + RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` + TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"` + Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` +} + +// IoamDisable defines message 'ioam_disable'. +type IoamDisable struct { + ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` +} + +func (m *IoamDisable) Reset() { *m = IoamDisable{} } +func (*IoamDisable) GetMessageName() string { return "ioam_disable" } +func (*IoamDisable) GetCrcString() string { return "6b16a45e" } +func (*IoamDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IoamDisable) 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) + } + buf.EncodeUint16(uint16(m.ID)) + return buf.Bytes(), nil +} +func (m *IoamDisable) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.ID = buf.DecodeUint16() + return nil +} + +// IoamDisableReply defines message 'ioam_disable_reply'. +type IoamDisableReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} } +func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" } +func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" } +func (*IoamDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IoamDisableReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IoamDisableReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IoamEnable defines message 'ioam_enable'. +type IoamEnable struct { + ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` + Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"` + Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"` + PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"` + TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"` + NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"` +} + +func (m *IoamEnable) Reset() { *m = IoamEnable{} } +func (*IoamEnable) GetMessageName() string { return "ioam_enable" } +func (*IoamEnable) GetCrcString() string { return "51ccd868" } +func (*IoamEnable) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IoamEnable) Size() int { + if m == nil { + return 0 + } + var size int + size += 2 // m.ID + size += 1 // m.Seqno + size += 1 // m.Analyse + size += 1 // m.PotEnable + size += 1 // m.TraceEnable + size += 4 // m.NodeID + 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) + } + buf.EncodeUint16(uint16(m.ID)) + buf.EncodeBool(m.Seqno) + buf.EncodeBool(m.Analyse) + buf.EncodeBool(m.PotEnable) + buf.EncodeBool(m.TraceEnable) + buf.EncodeUint32(uint32(m.NodeID)) + return buf.Bytes(), nil +} +func (m *IoamEnable) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.ID = buf.DecodeUint16() + m.Seqno = buf.DecodeBool() + m.Analyse = buf.DecodeBool() + m.PotEnable = buf.DecodeBool() + m.TraceEnable = buf.DecodeBool() + m.NodeID = buf.DecodeUint32() + return nil +} + +// IoamEnableReply defines message 'ioam_enable_reply'. +type IoamEnableReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} } +func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" } +func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" } +func (*IoamEnableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IoamEnableReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IoamEnableReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPAddressDetails defines message 'ip_address_details'. +type IPAddressDetails struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"` +} + +func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} } +func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" } +func (*IPAddressDetails) GetCrcString() string { return "b1199745" } +func (*IPAddressDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPAddressDetails) 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 + size += 1 // m.Prefix.Len + 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) + } + 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)) + return buf.Bytes(), nil +} +func (m *IPAddressDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + 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 +} + +// IPAddressDump defines message 'ip_address_dump'. +type IPAddressDump struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` +} + +func (m *IPAddressDump) Reset() { *m = IPAddressDump{} } +func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" } +func (*IPAddressDump) GetCrcString() string { return "2d033de4" } +func (*IPAddressDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPAddressDump) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.IsIPv6) + return buf.Bytes(), nil +} +func (m *IPAddressDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.IsIPv6 = buf.DecodeBool() + return nil +} + +// IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'. +type IPContainerProxyAddDel struct { + Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` +} + +func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} } +func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" } +func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" } +func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPContainerProxyAddDel) Size() int { + if m == nil { + return 0 + } + var size int + size += 1 // m.Pfx.Address.Af + size += 1 * 16 // m.Pfx.Address.Un + size += 1 // m.Pfx.Len + size += 4 // m.SwIfIndex + size += 1 // m.IsAdd + 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) + } + buf.EncodeUint8(uint8(m.Pfx.Address.Af)) + buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0) + buf.EncodeUint8(uint8(m.Pfx.Len)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.IsAdd) + return buf.Bytes(), nil +} +func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Pfx.Len = buf.DecodeUint8() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.IsAdd = buf.DecodeBool() + return nil +} + +// IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'. +type IPContainerProxyAddDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} } +func (*IPContainerProxyAddDelReply) GetMessageName() string { + return "ip_container_proxy_add_del_reply" +} +func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPContainerProxyAddDelReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPContainerProxyDetails defines message 'ip_container_proxy_details'. +type IPContainerProxyDetails struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` +} + +func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} } +func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" } +func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" } +func (*IPContainerProxyDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPContainerProxyDetails) 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 + size += 1 // m.Prefix.Len + 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) + } + 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)) + return buf.Bytes(), nil +} +func (m *IPContainerProxyDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + 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 +} + +// IPContainerProxyDump defines message 'ip_container_proxy_dump'. +type IPContainerProxyDump struct{} + +func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} } +func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" } +func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" } +func (*IPContainerProxyDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPContainerProxyDump) 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) + } + return buf.Bytes(), nil +} +func (m *IPContainerProxyDump) Unmarshal(b []byte) error { + return nil +} + +// IPDetails defines message 'ip_details'. +type IPDetails struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` +} + +func (m *IPDetails) Reset() { *m = IPDetails{} } +func (*IPDetails) GetMessageName() string { return "ip_details" } +func (*IPDetails) GetCrcString() string { return "eb152d07" } +func (*IPDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPDetails) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.IsIPv6) + return buf.Bytes(), nil +} +func (m *IPDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.IsIPv6 = buf.DecodeBool() + return nil +} + +// IPDump defines message 'ip_dump'. +type IPDump struct { + IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` +} + +func (m *IPDump) Reset() { *m = IPDump{} } +func (*IPDump) GetMessageName() string { return "ip_dump" } +func (*IPDump) GetCrcString() string { return "98d231ca" } +func (*IPDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPDump) 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) + } + buf.EncodeBool(m.IsIPv6) + return buf.Bytes(), nil +} +func (m *IPDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsIPv6 = buf.DecodeBool() + return nil +} + +// IPMrouteAddDel defines message 'ip_mroute_add_del'. +type IPMrouteAddDel 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 IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` +} + +func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} } +func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" } +func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" } +func (*IPMrouteAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPMrouteAddDel) 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.EntryFlags + size += 4 // m.Route.RpfID + size += 1 // m.Route.Prefix.Af + size += 2 // m.Route.Prefix.GrpAddressLength + size += 1 * 16 // m.Route.Prefix.GrpAddress + size += 1 * 16 // m.Route.Prefix.SrcAddress + size += 1 // m.Route.NPaths + for j2 := 0; j2 < len(m.Route.Paths); j2++ { + var s2 mfib_types.MfibPath + _ = s2 + if j2 < len(m.Route.Paths) { + s2 = m.Route.Paths[j2] + } + size += 4 // s2.ItfFlags + size += 4 // s2.Path.SwIfIndex + size += 4 // s2.Path.TableID + size += 4 // s2.Path.RpfID + size += 1 // s2.Path.Weight + size += 1 // s2.Path.Preference + size += 4 // s2.Path.Type + size += 4 // s2.Path.Flags + size += 4 // s2.Path.Proto + size += 1 * 16 // s2.Path.Nh.Address + size += 4 // s2.Path.Nh.ViaLabel + size += 4 // s2.Path.Nh.ObjID + 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 + } + } + 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) + } + buf.EncodeBool(m.IsAdd) + buf.EncodeBool(m.IsMultipath) + buf.EncodeUint32(uint32(m.Route.TableID)) + buf.EncodeUint32(uint32(m.Route.EntryFlags)) + buf.EncodeUint32(uint32(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.EncodeUint8(uint8(len(m.Route.Paths))) + for j1 := 0; j1 < len(m.Route.Paths); j1++ { + var v1 mfib_types.MfibPath + 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(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)) + 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)) + } + } + return buf.Bytes(), nil +} +func (m *IPMrouteAddDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.IsMultipath = buf.DecodeBool() + m.Route.TableID = buf.DecodeUint32() + m.Route.EntryFlags = 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)) + 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() + m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() + m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() + m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() + m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() + m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) + m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) + m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) + copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() + m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() + m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() + m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() + for j3 := 0; j3 < 16; j3++ { + m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() + m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() + m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() + m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() + } + } + return nil +} + +// IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'. +type IPMrouteAddDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` +} + +func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} } +func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" } +func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" } +func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPMrouteAddDelReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + buf.EncodeUint32(uint32(m.StatsIndex)) + return buf.Bytes(), nil +} +func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + m.StatsIndex = buf.DecodeUint32() + return nil +} + +// IPMrouteDetails defines message 'ip_mroute_details'. +type IPMrouteDetails struct { + Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` +} + +func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} } +func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" } +func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" } +func (*IPMrouteDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPMrouteDetails) 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 += 1 // m.Route.Prefix.Af + size += 2 // m.Route.Prefix.GrpAddressLength + size += 1 * 16 // m.Route.Prefix.GrpAddress + size += 1 * 16 // m.Route.Prefix.SrcAddress + size += 1 // m.Route.NPaths + for j2 := 0; j2 < len(m.Route.Paths); j2++ { + var s2 mfib_types.MfibPath + _ = s2 + if j2 < len(m.Route.Paths) { + s2 = m.Route.Paths[j2] + } + size += 4 // s2.ItfFlags + size += 4 // s2.Path.SwIfIndex + size += 4 // s2.Path.TableID + size += 4 // s2.Path.RpfID + size += 1 // s2.Path.Weight + size += 1 // s2.Path.Preference + size += 4 // s2.Path.Type + size += 4 // s2.Path.Flags + size += 4 // s2.Path.Proto + size += 1 * 16 // s2.Path.Nh.Address + size += 4 // s2.Path.Nh.ViaLabel + size += 4 // s2.Path.Nh.ObjID + 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 + } + } + 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) + } + buf.EncodeUint32(uint32(m.Route.TableID)) + buf.EncodeUint32(uint32(m.Route.EntryFlags)) + buf.EncodeUint32(uint32(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.EncodeUint8(uint8(len(m.Route.Paths))) + for j1 := 0; j1 < len(m.Route.Paths); j1++ { + var v1 mfib_types.MfibPath + 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(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)) + 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)) + } + } + 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.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)) + 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() + m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() + m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() + m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() + m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() + m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) + m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) + m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) + copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() + m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() + m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() + m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() + for j3 := 0; j3 < 16; j3++ { + m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() + m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() + m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() + m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() + } + } + return nil +} + +// IPMrouteDump defines message 'ip_mroute_dump'. +type IPMrouteDump struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} } +func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" } +func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" } +func (*IPMrouteDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPMrouteDump) 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) + } + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPMrouteDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPMtableDetails defines message 'ip_mtable_details'. +type IPMtableDetails struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} } +func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" } +func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" } +func (*IPMtableDetails) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPMtableDetails) 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) + } + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPMtableDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPMtableDump defines message 'ip_mtable_dump'. +type IPMtableDump struct{} + +func (m *IPMtableDump) Reset() { *m = IPMtableDump{} } +func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" } +func (*IPMtableDump) GetCrcString() string { return "51077d14" } +func (*IPMtableDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPMtableDump) 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) + } + return buf.Bytes(), nil +} +func (m *IPMtableDump) Unmarshal(b []byte) error { + return nil +} + +// IPPuntPolice defines message 'ip_punt_police'. +type IPPuntPolice struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` + IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` +} + +func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} } +func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" } +func (*IPPuntPolice) GetCrcString() string { return "db867cea" } +func (*IPPuntPolice) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPPuntPolice) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.PolicerIndex)) + buf.EncodeBool(m.IsAdd) + buf.EncodeBool(m.IsIP6) + return buf.Bytes(), nil +} +func (m *IPPuntPolice) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + m.IsAdd = buf.DecodeBool() + m.IsIP6 = buf.DecodeBool() + return nil +} + +// IPPuntPoliceReply defines message 'ip_punt_police_reply'. +type IPPuntPoliceReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} } +func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" } +func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" } +func (*IPPuntPoliceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPPuntPoliceReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPPuntPoliceReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPPuntRedirect defines message 'ip_punt_redirect'. +type IPPuntRedirect struct { + Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` +} + +func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} } +func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" } +func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" } +func (*IPPuntRedirect) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPPuntRedirect) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.Punt.RxSwIfIndex + size += 4 // m.Punt.TxSwIfIndex + size += 1 // m.Punt.Nh.Af + size += 1 * 16 // m.Punt.Nh.Un + size += 1 // m.IsAdd + 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) + } + 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.EncodeBool(m.IsAdd) + return buf.Bytes(), nil +} +func (m *IPPuntRedirect) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.IsAdd = buf.DecodeBool() + return nil +} + +// IPPuntRedirectDetails defines message 'ip_punt_redirect_details'. +type IPPuntRedirectDetails struct { + Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` +} + +func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} } +func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" } +func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" } +func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPPuntRedirectDetails) 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 + size += 1 * 16 // m.Punt.Nh.Un + 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) + } + 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) + return buf.Bytes(), nil +} +func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + return nil +} + +// IPPuntRedirectDump defines message 'ip_punt_redirect_dump'. +type IPPuntRedirectDump struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` +} + +func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} } +func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" } +func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" } +func (*IPPuntRedirectDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPPuntRedirectDump) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.IsIPv6) + return buf.Bytes(), nil +} +func (m *IPPuntRedirectDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.IsIPv6 = buf.DecodeBool() + return nil +} + +// IPPuntRedirectReply defines message 'ip_punt_redirect_reply'. +type IPPuntRedirectReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} } +func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" } +func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" } +func (*IPPuntRedirectReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPPuntRedirectReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPPuntRedirectReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'. +type IPReassemblyEnableDisable struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"` + EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"` + Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` +} + +func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} } +func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" } +func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" } +func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPReassemblyEnableDisable) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.SwIfIndex + size += 1 // m.EnableIP4 + size += 1 // m.EnableIP6 + size += 4 // m.Type + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.EnableIP4) + buf.EncodeBool(m.EnableIP6) + buf.EncodeUint32(uint32(m.Type)) + return buf.Bytes(), nil +} +func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.EnableIP4 = buf.DecodeBool() + m.EnableIP6 = buf.DecodeBool() + m.Type = IPReassType(buf.DecodeUint32()) + return nil +} + +// IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'. +type IPReassemblyEnableDisableReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} } +func (*IPReassemblyEnableDisableReply) GetMessageName() string { + return "ip_reassembly_enable_disable_reply" +} +func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" } +func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPReassemblyEnableDisableReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPReassemblyGet defines message 'ip_reassembly_get'. +type IPReassemblyGet struct { + IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` + Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` +} + +func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} } +func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" } +func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" } +func (*IPReassemblyGet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPReassemblyGet) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeBool(m.IsIP6) + buf.EncodeUint32(uint32(m.Type)) + return buf.Bytes(), nil +} +func (m *IPReassemblyGet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsIP6 = buf.DecodeBool() + m.Type = IPReassType(buf.DecodeUint32()) + return nil +} + +// IPReassemblyGetReply defines message 'ip_reassembly_get_reply'. +type IPReassemblyGetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` + MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` + MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` + ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` + IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` +} + +func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} } +func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" } +func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" } +func (*IPReassemblyGetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPReassemblyGetReply) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.Retval + size += 4 // m.TimeoutMs + size += 4 // m.MaxReassemblies + size += 4 // m.MaxReassemblyLength + size += 4 // m.ExpireWalkIntervalMs + size += 1 // m.IsIP6 + 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) + } + 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.EncodeBool(m.IsIP6) + return buf.Bytes(), nil +} +func (m *IPReassemblyGetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + m.TimeoutMs = buf.DecodeUint32() + m.MaxReassemblies = buf.DecodeUint32() + m.MaxReassemblyLength = buf.DecodeUint32() + m.ExpireWalkIntervalMs = buf.DecodeUint32() + m.IsIP6 = buf.DecodeBool() + return nil +} + +// IPReassemblySet defines message 'ip_reassembly_set'. +type IPReassemblySet struct { + TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` + MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` + MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` + ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` + IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` + Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` +} + +func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} } +func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" } +func (*IPReassemblySet) GetCrcString() string { return "16467d25" } +func (*IPReassemblySet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPReassemblySet) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.TimeoutMs + size += 4 // m.MaxReassemblies + size += 4 // m.MaxReassemblyLength + size += 4 // m.ExpireWalkIntervalMs + size += 1 // m.IsIP6 + size += 4 // m.Type + 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) + } + buf.EncodeUint32(uint32(m.TimeoutMs)) + buf.EncodeUint32(uint32(m.MaxReassemblies)) + buf.EncodeUint32(uint32(m.MaxReassemblyLength)) + buf.EncodeUint32(uint32(m.ExpireWalkIntervalMs)) + buf.EncodeBool(m.IsIP6) + buf.EncodeUint32(uint32(m.Type)) + return buf.Bytes(), nil +} +func (m *IPReassemblySet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.TimeoutMs = buf.DecodeUint32() + m.MaxReassemblies = buf.DecodeUint32() + m.MaxReassemblyLength = buf.DecodeUint32() + m.ExpireWalkIntervalMs = buf.DecodeUint32() + m.IsIP6 = buf.DecodeBool() + m.Type = IPReassType(buf.DecodeUint32()) + return nil +} + +// IPReassemblySetReply defines message 'ip_reassembly_set_reply'. +type IPReassemblySetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} } +func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" } +func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" } +func (*IPReassemblySetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPReassemblySetReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPReassemblySetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPRouteAddDel defines message 'ip_route_add_del'. +type IPRouteAddDel 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 IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` +} + +func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} } +func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" } +func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" } +func (*IPRouteAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPRouteAddDel) 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 + 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++ { + 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 + } + } + 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) + } + buf.EncodeBool(m.IsAdd) + buf.EncodeBool(m.IsMultipath) + 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.EncodeUint8(uint8(len(m.Route.Paths))) + for j1 := 0; j1 < len(m.Route.Paths); j1++ { + var v1 fib_types.FibPath + 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(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)) + 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)) + } + } + return buf.Bytes(), nil +} +func (m *IPRouteAddDel) 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.Paths = make([]fib_types.FibPath, int(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 +} + +// IPRouteAddDelReply defines message 'ip_route_add_del_reply'. +type IPRouteAddDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` +} + +func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} } +func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" } +func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" } +func (*IPRouteAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPRouteAddDelReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + buf.EncodeUint32(uint32(m.StatsIndex)) + return buf.Bytes(), nil +} +func (m *IPRouteAddDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + 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 "d1ffaae1" } +func (*IPRouteDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPRouteDetails) Size() int { + if m == nil { + return 0 + } + var size int + 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++ { + 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 + } + } + return size +} +func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) { + var buf *codec.Buffer + if b == nil { + buf = codec.NewBuffer(make([]byte, m.Size())) + } else { + buf = codec.NewBuffer(b) + } + 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.EncodeUint8(uint8(len(m.Route.Paths))) + for j1 := 0; j1 < len(m.Route.Paths); j1++ { + var v1 fib_types.FibPath + 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(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)) + 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)) + } + } + return buf.Bytes(), nil +} +func (m *IPRouteDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + 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)) + 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 +} + +// IPRouteDump defines message 'ip_route_dump'. +type IPRouteDump struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPRouteDump) Reset() { *m = IPRouteDump{} } +func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" } +func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" } +func (*IPRouteDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPRouteDump) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPRouteDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPRouteLookup defines message 'ip_route_lookup'. +type IPRouteLookup struct { + TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` + Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"` + Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` +} + +func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} } +func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" } +func (*IPRouteLookup) GetCrcString() string { return "e2986185" } +func (*IPRouteLookup) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPRouteLookup) Size() int { + if m == nil { + return 0 + } + var size int + 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) { + var buf *codec.Buffer + if b == nil { + buf = codec.NewBuffer(make([]byte, m.Size())) + } else { + buf = codec.NewBuffer(b) + } + 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 { + 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 "ae99de8e" } +func (*IPRouteLookupReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPRouteLookupReply) 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 + 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++ { + 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 + } + } + return size +} +func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) { + var buf *codec.Buffer + if b == nil { + buf = codec.NewBuffer(make([]byte, m.Size())) + } else { + buf = codec.NewBuffer(b) + } + buf.EncodeUint32(uint32(m.Retval)) + 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.EncodeUint8(uint8(len(m.Route.Paths))) + for j1 := 0; j1 < len(m.Route.Paths); j1++ { + var v1 fib_types.FibPath + 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(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)) + 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)) + } + } + return buf.Bytes(), nil +} +func (m *IPRouteLookupReply) 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)) + 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 +} + +// 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"` + Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` + NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"` + LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"` + HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` +} + +func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} } +func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string { + return "ip_source_and_port_range_check_add_del" +} +func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" } +func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPSourceAndPortRangeCheckAddDel) Size() int { + if m == nil { + return 0 + } + var size int + size += 1 // m.IsAdd + size += 1 // m.Prefix.Address.Af + size += 1 * 16 // m.Prefix.Address.Un + size += 1 // m.Prefix.Len + size += 1 // m.NumberOfRanges + size += 2 * 32 // m.LowPorts + size += 2 * 32 // m.HighPorts + size += 4 // m.VrfID + 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) + } + 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)) + for i := 0; i < 32; i++ { + var x uint16 + if i < len(m.LowPorts) { + x = uint16(m.LowPorts[i]) + } + buf.EncodeUint16(uint16(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.EncodeUint32(uint32(m.VrfID)) + return buf.Bytes(), nil +} +func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + 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.NumberOfRanges = buf.DecodeUint8() + m.LowPorts = make([]uint16, 32) + for i := 0; i < len(m.LowPorts); i++ { + m.LowPorts[i] = buf.DecodeUint16() + } + m.HighPorts = make([]uint16, 32) + for i := 0; i < len(m.HighPorts); i++ { + m.HighPorts[i] = buf.DecodeUint16() + } + m.VrfID = buf.DecodeUint32() + return nil +} + +// IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'. +type IPSourceAndPortRangeCheckAddDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} } +func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string { + return "ip_source_and_port_range_check_add_del_reply" +} +func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPSourceAndPortRangeCheckAddDelReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'. +type IPSourceAndPortRangeCheckInterfaceAddDel struct { + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"` + TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"` + UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"` + UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"` +} + +func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() { + *m = IPSourceAndPortRangeCheckInterfaceAddDel{} +} +func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string { + return "ip_source_and_port_range_check_interface_add_del" +} +func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" } +func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() int { + if m == nil { + return 0 + } + var size int + size += 1 // m.IsAdd + size += 4 // m.SwIfIndex + size += 4 // m.TCPInVrfID + size += 4 // m.TCPOutVrfID + size += 4 // m.UDPInVrfID + size += 4 // m.UDPOutVrfID + 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) + } + 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)) + return buf.Bytes(), nil +} +func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.TCPInVrfID = buf.DecodeUint32() + m.TCPOutVrfID = buf.DecodeUint32() + m.UDPInVrfID = buf.DecodeUint32() + m.UDPOutVrfID = buf.DecodeUint32() + return nil +} + +// IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'. +type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() { + *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{} +} +func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string { + return "ip_source_and_port_range_check_interface_add_del_reply" +} +func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPTableAddDel defines message 'ip_table_add_del'. +type IPTableAddDel struct { + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} } +func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" } +func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" } +func (*IPTableAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPTableAddDel) Size() int { + if m == nil { + return 0 + } + var size int + size += 1 // m.IsAdd + size += 4 // m.Table.TableID + size += 1 // m.Table.IsIP6 + size += 64 // m.Table.Name + 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) + } + buf.EncodeBool(m.IsAdd) + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPTableAddDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPTableAddDelReply defines message 'ip_table_add_del_reply'. +type IPTableAddDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} } +func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" } +func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPTableAddDelReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPTableAddDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPTableDetails defines message 'ip_table_details'. +type IPTableDetails struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPTableDetails) Reset() { *m = IPTableDetails{} } +func (*IPTableDetails) GetMessageName() string { return "ip_table_details" } +func (*IPTableDetails) GetCrcString() string { return "c79fca0f" } +func (*IPTableDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPTableDetails) 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) + } + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPTableDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPTableDump defines message 'ip_table_dump'. +type IPTableDump struct{} + +func (m *IPTableDump) Reset() { *m = IPTableDump{} } +func (*IPTableDump) GetMessageName() string { return "ip_table_dump" } +func (*IPTableDump) GetCrcString() string { return "51077d14" } +func (*IPTableDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPTableDump) 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) + } + return buf.Bytes(), nil +} +func (m *IPTableDump) Unmarshal(b []byte) error { + return nil +} + +// IPTableFlush defines message 'ip_table_flush'. +type IPTableFlush struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPTableFlush) Reset() { *m = IPTableFlush{} } +func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" } +func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" } +func (*IPTableFlush) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPTableFlush) 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) + } + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPTableFlush) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPTableFlushReply defines message 'ip_table_flush_reply'. +type IPTableFlushReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} } +func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" } +func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableFlushReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPTableFlushReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPTableFlushReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPTableReplaceBegin defines message 'ip_table_replace_begin'. +type IPTableReplaceBegin struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} } +func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" } +func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" } +func (*IPTableReplaceBegin) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPTableReplaceBegin) 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) + } + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPTableReplaceBegin) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'. +type IPTableReplaceBeginReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} } +func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" } +func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPTableReplaceBeginReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPTableReplaceEnd defines message 'ip_table_replace_end'. +type IPTableReplaceEnd struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} } +func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" } +func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" } +func (*IPTableReplaceEnd) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPTableReplaceEnd) 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) + } + buf.EncodeUint32(uint32(m.Table.TableID)) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPTableReplaceEnd) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'. +type IPTableReplaceEndReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} } +func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" } +func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" } +func (*IPTableReplaceEndReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPTableReplaceEndReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// IPUnnumberedDetails defines message 'ip_unnumbered_details'. +type IPUnnumberedDetails struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"` +} + +func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} } +func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" } +func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" } +func (*IPUnnumberedDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPUnnumberedDetails) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint32(uint32(m.IPSwIfIndex)) + return buf.Bytes(), nil +} +func (m *IPUnnumberedDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return 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"` +} + +func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} } +func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" } +func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" } +func (*IPUnnumberedDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPUnnumberedDump) 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *IPUnnumberedDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// MfibSignalDetails defines message 'mfib_signal_details'. +type MfibSignalDetails struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` + Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"` + IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"` + IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"` +} + +func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} } +func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" } +func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" } +func (*MfibSignalDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *MfibSignalDetails) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.SwIfIndex + size += 4 // m.TableID + size += 1 // m.Prefix.Af + size += 2 // m.Prefix.GrpAddressLength + size += 1 * 16 // m.Prefix.GrpAddress + size += 1 * 16 // m.Prefix.SrcAddress + size += 2 // m.IPPacketLen + size += 1 * 256 // m.IPPacketData + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint32(uint32(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) + return buf.Bytes(), nil +} +func (m *MfibSignalDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.TableID = buf.DecodeUint32() + m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) + m.Prefix.GrpAddressLength = buf.DecodeUint16() + 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)) + return nil +} + +// MfibSignalDump defines message 'mfib_signal_dump'. +type MfibSignalDump struct{} + +func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} } +func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" } +func (*MfibSignalDump) GetCrcString() string { return "51077d14" } +func (*MfibSignalDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *MfibSignalDump) 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) + } + return buf.Bytes(), nil +} +func (m *MfibSignalDump) Unmarshal(b []byte) error { + return nil +} + +// SetIPFlowHash defines message 'set_ip_flow_hash'. +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"` + Src bool `binapi:"bool,name=src" json:"src,omitempty"` + Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"` + Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"` + Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"` + Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"` + Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"` + Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"` +} + +func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} } +func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" } +func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" } +func (*SetIPFlowHash) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SetIPFlowHash) Size() int { + if m == nil { + return 0 + } + var size int + size += 4 // m.VrfID + size += 1 // m.IsIPv6 + size += 1 // m.Src + size += 1 // m.Dst + size += 1 // m.Sport + size += 1 // m.Dport + size += 1 // m.Proto + size += 1 // m.Reverse + size += 1 // m.Symmetric + 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) + } + buf.EncodeUint32(uint32(m.VrfID)) + buf.EncodeBool(m.IsIPv6) + buf.EncodeBool(m.Src) + buf.EncodeBool(m.Dst) + buf.EncodeBool(m.Sport) + buf.EncodeBool(m.Dport) + buf.EncodeBool(m.Proto) + buf.EncodeBool(m.Reverse) + buf.EncodeBool(m.Symmetric) + return buf.Bytes(), nil +} +func (m *SetIPFlowHash) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.VrfID = buf.DecodeUint32() + m.IsIPv6 = buf.DecodeBool() + m.Src = buf.DecodeBool() + m.Dst = buf.DecodeBool() + m.Sport = buf.DecodeBool() + m.Dport = buf.DecodeBool() + m.Proto = buf.DecodeBool() + m.Reverse = buf.DecodeBool() + m.Symmetric = buf.DecodeBool() + return nil +} + +// SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'. +type SetIPFlowHashReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} } +func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" } +func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" } +func (*SetIPFlowHashReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SetIPFlowHashReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *SetIPFlowHashReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'. +type SwInterfaceIP6EnableDisable struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` +} + +func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} } +func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" } +func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" } +func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceIP6EnableDisable) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.Enable) + return buf.Bytes(), nil +} +func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Enable = buf.DecodeBool() + return nil +} + +// SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'. +type SwInterfaceIP6EnableDisableReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} } +func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string { + return "sw_interface_ip6_enable_disable_reply" +} +func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SwInterfaceIP6EnableDisableReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +// SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'. +type SwInterfaceIP6SetLinkLocalAddress struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` +} + +func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} } +func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { + return "sw_interface_ip6_set_link_local_address" +} +func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" } +func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceIP6SetLinkLocalAddress) Size() int { + if m == nil { + return 0 + } + var size int + 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) + } + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBytes(m.IP[:], 16) + return buf.Bytes(), nil +} +func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + copy(m.IP[:], buf.DecodeBytes(16)) + return nil +} + +// SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'. +type SwInterfaceIP6SetLinkLocalAddressReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() { + *m = SwInterfaceIP6SetLinkLocalAddressReply{} +} +func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { + return "sw_interface_ip6_set_link_local_address_reply" +} +func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SwInterfaceIP6SetLinkLocalAddressReply) 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) + } + buf.EncodeUint32(uint32(m.Retval)) + return buf.Bytes(), nil +} +func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = int32(buf.DecodeUint32()) + return nil +} + +func init() { file_ip_binapi_init() } +func file_ip_binapi_init() { + api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e") + 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((*IPAddressDump)(nil), "ip_address_dump_2d033de4") + api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40") + api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804") + api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8") + 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((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab") + api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c1cb4b44") + 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((*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((*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((*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((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab") + api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1") + 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((*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((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0") + api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804") + api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f") + api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14") + api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e") + api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804") + api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e") + 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((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e") + api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a") + 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((*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((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*IoamDisable)(nil), + (*IoamDisableReply)(nil), + (*IoamEnable)(nil), + (*IoamEnableReply)(nil), + (*IPAddressDetails)(nil), + (*IPAddressDump)(nil), + (*IPContainerProxyAddDel)(nil), + (*IPContainerProxyAddDelReply)(nil), + (*IPContainerProxyDetails)(nil), + (*IPContainerProxyDump)(nil), + (*IPDetails)(nil), + (*IPDump)(nil), + (*IPMrouteAddDel)(nil), + (*IPMrouteAddDelReply)(nil), + (*IPMrouteDetails)(nil), + (*IPMrouteDump)(nil), + (*IPMtableDetails)(nil), + (*IPMtableDump)(nil), + (*IPPuntPolice)(nil), + (*IPPuntPoliceReply)(nil), + (*IPPuntRedirect)(nil), + (*IPPuntRedirectDetails)(nil), + (*IPPuntRedirectDump)(nil), + (*IPPuntRedirectReply)(nil), + (*IPReassemblyEnableDisable)(nil), + (*IPReassemblyEnableDisableReply)(nil), + (*IPReassemblyGet)(nil), + (*IPReassemblyGetReply)(nil), + (*IPReassemblySet)(nil), + (*IPReassemblySetReply)(nil), + (*IPRouteAddDel)(nil), + (*IPRouteAddDelReply)(nil), + (*IPRouteDetails)(nil), + (*IPRouteDump)(nil), + (*IPRouteLookup)(nil), + (*IPRouteLookupReply)(nil), + (*IPSourceAndPortRangeCheckAddDel)(nil), + (*IPSourceAndPortRangeCheckAddDelReply)(nil), + (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), + (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), + (*IPTableAddDel)(nil), + (*IPTableAddDelReply)(nil), + (*IPTableDetails)(nil), + (*IPTableDump)(nil), + (*IPTableFlush)(nil), + (*IPTableFlushReply)(nil), + (*IPTableReplaceBegin)(nil), + (*IPTableReplaceBeginReply)(nil), + (*IPTableReplaceEnd)(nil), + (*IPTableReplaceEndReply)(nil), + (*IPUnnumberedDetails)(nil), + (*IPUnnumberedDump)(nil), + (*MfibSignalDetails)(nil), + (*MfibSignalDump)(nil), + (*SetIPFlowHash)(nil), + (*SetIPFlowHashReply)(nil), + (*SwInterfaceIP6EnableDisable)(nil), + (*SwInterfaceIP6EnableDisableReply)(nil), + (*SwInterfaceIP6SetLinkLocalAddress)(nil), + (*SwInterfaceIP6SetLinkLocalAddressReply)(nil), + } +} |