// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.6.0-dev
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/lb.api.json
// Package lb contains generated bindings for API file lb.api.
package lb
import (
- api "git.fd.io/govpp.git/api"
- interface_types "git.fd.io/govpp.git/binapi/interface_types"
- ip_types "git.fd.io/govpp.git/binapi/ip_types"
- lb_types "git.fd.io/govpp.git/binapi/lb_types"
- codec "git.fd.io/govpp.git/codec"
+ api "go.fd.io/govpp/api"
+ interface_types "go.fd.io/govpp/binapi/interface_types"
+ ip_types "go.fd.io/govpp/binapi/ip_types"
+ lb_types "go.fd.io/govpp/binapi/lb_types"
+ codec "go.fd.io/govpp/codec"
)
// This is a compile-time assertion to ensure that this generated file
const (
APIFile = "lb"
APIVersion = "1.0.0"
- VersionCrc = 0x5e4e85b1
+ VersionCrc = 0x50c0a6c9
)
// LbAddDelAs defines message 'lb_add_del_as'.
type LbAddDelAs struct {
Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol,default=%!s(float64=255)" json:"protocol,omitempty"`
+ Protocol uint8 `binapi:"u8,name=protocol,default=255" json:"protocol,omitempty"`
Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
AsAddress ip_types.Address `binapi:"address,name=as_address" json:"as_address,omitempty"`
IsDel bool `binapi:"bool,name=is_del" json:"is_del,omitempty"`
func (m *LbAddDelAs) Reset() { *m = LbAddDelAs{} }
func (*LbAddDelAs) GetMessageName() string { return "lb_add_del_as" }
-func (*LbAddDelAs) GetCrcString() string { return "78628987" }
+func (*LbAddDelAs) GetCrcString() string { return "35d72500" }
func (*LbAddDelAs) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *LbAddDelAs) Size() int {
+func (m *LbAddDelAs) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Pfx.Address.Af
size += 1 * 16 // m.Pfx.Address.Un
size += 1 // m.Pfx.Len
return size
}
func (m *LbAddDelAs) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Pfx.Len))
- buf.EncodeUint8(uint8(m.Protocol))
- buf.EncodeUint16(uint16(m.Port))
+ buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Pfx.Len)
+ buf.EncodeUint8(m.Protocol)
+ buf.EncodeUint16(m.Port)
buf.EncodeUint8(uint8(m.AsAddress.Af))
- buf.EncodeBytes(m.AsAddress.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(m.AsAddress.Un.XXX_UnionData[:], 16)
buf.EncodeBool(m.IsDel)
buf.EncodeBool(m.IsFlush)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *LbAddDelAsReply) Size() int {
+func (m *LbAddDelAsReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *LbAddDelAsReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *LbAddDelAsReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *LbAddDelIntfNat4) Size() int {
+func (m *LbAddDelIntfNat4) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.SwIfIndex
return size
}
func (m *LbAddDelIntfNat4) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *LbAddDelIntfNat4Reply) Size() int {
+func (m *LbAddDelIntfNat4Reply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *LbAddDelIntfNat4Reply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *LbAddDelIntfNat4Reply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *LbAddDelIntfNat6) Size() int {
+func (m *LbAddDelIntfNat6) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.SwIfIndex
return size
}
func (m *LbAddDelIntfNat6) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *LbAddDelIntfNat6Reply) Size() int {
+func (m *LbAddDelIntfNat6Reply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *LbAddDelIntfNat6Reply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *LbAddDelIntfNat6Reply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
// LbAddDelVip defines message 'lb_add_del_vip'.
type LbAddDelVip struct {
Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol,default=%!s(float64=255)" json:"protocol,omitempty"`
+ Protocol uint8 `binapi:"u8,name=protocol,default=255" json:"protocol,omitempty"`
Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
Encap lb_types.LbEncapType `binapi:"lb_encap_type,name=encap" json:"encap,omitempty"`
Dscp uint8 `binapi:"u8,name=dscp" json:"dscp,omitempty"`
Type lb_types.LbSrvType `binapi:"lb_srv_type,name=type" json:"type,omitempty"`
TargetPort uint16 `binapi:"u16,name=target_port" json:"target_port,omitempty"`
NodePort uint16 `binapi:"u16,name=node_port" json:"node_port,omitempty"`
- NewFlowsTableLength uint32 `binapi:"u32,name=new_flows_table_length,default=%!s(float64=1024)" json:"new_flows_table_length,omitempty"`
+ NewFlowsTableLength uint32 `binapi:"u32,name=new_flows_table_length,default=1024" json:"new_flows_table_length,omitempty"`
IsDel bool `binapi:"bool,name=is_del" json:"is_del,omitempty"`
}
func (m *LbAddDelVip) Reset() { *m = LbAddDelVip{} }
func (*LbAddDelVip) GetMessageName() string { return "lb_add_del_vip" }
-func (*LbAddDelVip) GetCrcString() string { return "d15b7ddc" }
+func (*LbAddDelVip) GetCrcString() string { return "6fa569c7" }
func (*LbAddDelVip) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *LbAddDelVip) Size() int {
+func (m *LbAddDelVip) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Pfx.Address.Af
size += 1 * 16 // m.Pfx.Address.Un
size += 1 // m.Pfx.Len
return size
}
func (m *LbAddDelVip) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Pfx.Len))
- buf.EncodeUint8(uint8(m.Protocol))
- buf.EncodeUint16(uint16(m.Port))
+ buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Pfx.Len)
+ buf.EncodeUint8(m.Protocol)
+ buf.EncodeUint16(m.Port)
buf.EncodeUint32(uint32(m.Encap))
- buf.EncodeUint8(uint8(m.Dscp))
+ buf.EncodeUint8(m.Dscp)
buf.EncodeUint32(uint32(m.Type))
- buf.EncodeUint16(uint16(m.TargetPort))
- buf.EncodeUint16(uint16(m.NodePort))
- buf.EncodeUint32(uint32(m.NewFlowsTableLength))
+ buf.EncodeUint16(m.TargetPort)
+ buf.EncodeUint16(m.NodePort)
+ buf.EncodeUint32(m.NewFlowsTableLength)
buf.EncodeBool(m.IsDel)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *LbAddDelVipReply) Size() int {
+func (m *LbAddDelVipReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *LbAddDelVipReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *LbAddDelVipReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *LbAsDetails) Reset() { *m = LbAsDetails{} }
func (*LbAsDetails) GetMessageName() string { return "lb_as_details" }
-func (*LbAsDetails) GetCrcString() string { return "9c39f60e" }
+func (*LbAsDetails) GetCrcString() string { return "8d24c29e" }
func (*LbAsDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *LbAsDetails) Size() int {
+func (m *LbAsDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Vip.Pfx.Address.Af
size += 1 * 16 // m.Vip.Pfx.Address.Un
size += 1 // m.Vip.Pfx.Len
return size
}
func (m *LbAsDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Vip.Pfx.Address.Af))
- buf.EncodeBytes(m.Vip.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Vip.Pfx.Len))
+ buf.EncodeBytes(m.Vip.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Vip.Pfx.Len)
buf.EncodeUint8(uint8(m.Vip.Protocol))
- buf.EncodeUint16(uint16(m.Vip.Port))
+ buf.EncodeUint16(m.Vip.Port)
buf.EncodeUint8(uint8(m.AppSrv.Af))
- buf.EncodeBytes(m.AppSrv.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.InUseSince))
+ buf.EncodeBytes(m.AppSrv.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Flags)
+ buf.EncodeUint32(m.InUseSince)
return buf.Bytes(), nil
}
func (m *LbAsDetails) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *LbAsDump) Size() int {
+func (m *LbAsDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Pfx.Address.Af
size += 1 * 16 // m.Pfx.Address.Un
size += 1 // m.Pfx.Len
return size
}
func (m *LbAsDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Pfx.Len))
- buf.EncodeUint8(uint8(m.Protocol))
- buf.EncodeUint16(uint16(m.Port))
+ buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Pfx.Len)
+ buf.EncodeUint8(m.Protocol)
+ buf.EncodeUint16(m.Port)
return buf.Bytes(), nil
}
func (m *LbAsDump) Unmarshal(b []byte) error {
type LbConf struct {
IP4SrcAddress ip_types.IP4Address `binapi:"ip4_address,name=ip4_src_address" json:"ip4_src_address,omitempty"`
IP6SrcAddress ip_types.IP6Address `binapi:"ip6_address,name=ip6_src_address" json:"ip6_src_address,omitempty"`
- StickyBucketsPerCore uint32 `binapi:"u32,name=sticky_buckets_per_core,default=%!s(float64=4.294967295e+09)" json:"sticky_buckets_per_core,omitempty"`
- FlowTimeout uint32 `binapi:"u32,name=flow_timeout,default=%!s(float64=4.294967295e+09)" json:"flow_timeout,omitempty"`
+ StickyBucketsPerCore uint32 `binapi:"u32,name=sticky_buckets_per_core,default=4294967295" json:"sticky_buckets_per_core,omitempty"`
+ FlowTimeout uint32 `binapi:"u32,name=flow_timeout,default=4294967295" json:"flow_timeout,omitempty"`
}
func (m *LbConf) Reset() { *m = LbConf{} }
func (*LbConf) GetMessageName() string { return "lb_conf" }
-func (*LbConf) GetCrcString() string { return "22ddb739" }
+func (*LbConf) GetCrcString() string { return "56cd3261" }
func (*LbConf) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *LbConf) Size() int {
+func (m *LbConf) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 * 4 // m.IP4SrcAddress
size += 1 * 16 // m.IP6SrcAddress
size += 4 // m.StickyBucketsPerCore
return size
}
func (m *LbConf) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBytes(m.IP4SrcAddress[:], 4)
buf.EncodeBytes(m.IP6SrcAddress[:], 16)
- buf.EncodeUint32(uint32(m.StickyBucketsPerCore))
- buf.EncodeUint32(uint32(m.FlowTimeout))
+ buf.EncodeUint32(m.StickyBucketsPerCore)
+ buf.EncodeUint32(m.FlowTimeout)
return buf.Bytes(), nil
}
func (m *LbConf) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *LbConfReply) Size() int {
+func (m *LbConfReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *LbConfReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *LbConfReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *LbFlushVip) Size() int {
+func (m *LbFlushVip) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Pfx.Address.Af
size += 1 * 16 // m.Pfx.Address.Un
size += 1 // m.Pfx.Len
return size
}
func (m *LbFlushVip) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Pfx.Len))
- buf.EncodeUint8(uint8(m.Protocol))
- buf.EncodeUint16(uint16(m.Port))
+ buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Pfx.Len)
+ buf.EncodeUint8(m.Protocol)
+ buf.EncodeUint16(m.Port)
return buf.Bytes(), nil
}
func (m *LbFlushVip) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *LbFlushVipReply) Size() int {
+func (m *LbFlushVipReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *LbFlushVipReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *LbFlushVipReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *LbVipDetails) Reset() { *m = LbVipDetails{} }
func (*LbVipDetails) GetMessageName() string { return "lb_vip_details" }
-func (*LbVipDetails) GetCrcString() string { return "08f39bed" }
+func (*LbVipDetails) GetCrcString() string { return "1329ec9b" }
func (*LbVipDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *LbVipDetails) Size() int {
+func (m *LbVipDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Vip.Pfx.Address.Af
size += 1 * 16 // m.Vip.Pfx.Address.Un
size += 1 // m.Vip.Pfx.Len
return size
}
func (m *LbVipDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Vip.Pfx.Address.Af))
- buf.EncodeBytes(m.Vip.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Vip.Pfx.Len))
+ buf.EncodeBytes(m.Vip.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Vip.Pfx.Len)
buf.EncodeUint8(uint8(m.Vip.Protocol))
- buf.EncodeUint16(uint16(m.Vip.Port))
+ buf.EncodeUint16(m.Vip.Port)
buf.EncodeUint32(uint32(m.Encap))
buf.EncodeUint8(uint8(m.Dscp))
buf.EncodeUint32(uint32(m.SrvType))
- buf.EncodeUint16(uint16(m.TargetPort))
- buf.EncodeUint16(uint16(m.FlowTableLength))
+ buf.EncodeUint16(m.TargetPort)
+ buf.EncodeUint16(m.FlowTableLength)
return buf.Bytes(), nil
}
func (m *LbVipDetails) Unmarshal(b []byte) error {
type LbVipDump struct {
Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
PfxMatcher ip_types.PrefixMatcher `binapi:"prefix_matcher,name=pfx_matcher" json:"pfx_matcher,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol,default=%!s(float64=255)" json:"protocol,omitempty"`
+ Protocol uint8 `binapi:"u8,name=protocol,default=255" json:"protocol,omitempty"`
Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
}
func (m *LbVipDump) Reset() { *m = LbVipDump{} }
func (*LbVipDump) GetMessageName() string { return "lb_vip_dump" }
-func (*LbVipDump) GetCrcString() string { return "c7bcb124" }
+func (*LbVipDump) GetCrcString() string { return "56110cb7" }
func (*LbVipDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *LbVipDump) Size() int {
+func (m *LbVipDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Pfx.Address.Af
size += 1 * 16 // m.Pfx.Address.Un
size += 1 // m.Pfx.Len
return size
}
func (m *LbVipDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Pfx.Len))
- buf.EncodeUint8(uint8(m.PfxMatcher.Le))
- buf.EncodeUint8(uint8(m.PfxMatcher.Ge))
- buf.EncodeUint8(uint8(m.Protocol))
- buf.EncodeUint16(uint16(m.Port))
+ buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Pfx.Len)
+ buf.EncodeUint8(m.PfxMatcher.Le)
+ buf.EncodeUint8(m.PfxMatcher.Ge)
+ buf.EncodeUint8(m.Protocol)
+ buf.EncodeUint16(m.Port)
return buf.Bytes(), nil
}
func (m *LbVipDump) Unmarshal(b []byte) error {
func init() { file_lb_binapi_init() }
func file_lb_binapi_init() {
- api.RegisterMessage((*LbAddDelAs)(nil), "lb_add_del_as_78628987")
+ api.RegisterMessage((*LbAddDelAs)(nil), "lb_add_del_as_35d72500")
api.RegisterMessage((*LbAddDelAsReply)(nil), "lb_add_del_as_reply_e8d4e804")
api.RegisterMessage((*LbAddDelIntfNat4)(nil), "lb_add_del_intf_nat4_47d6e753")
api.RegisterMessage((*LbAddDelIntfNat4Reply)(nil), "lb_add_del_intf_nat4_reply_e8d4e804")
api.RegisterMessage((*LbAddDelIntfNat6)(nil), "lb_add_del_intf_nat6_47d6e753")
api.RegisterMessage((*LbAddDelIntfNat6Reply)(nil), "lb_add_del_intf_nat6_reply_e8d4e804")
- api.RegisterMessage((*LbAddDelVip)(nil), "lb_add_del_vip_d15b7ddc")
+ api.RegisterMessage((*LbAddDelVip)(nil), "lb_add_del_vip_6fa569c7")
api.RegisterMessage((*LbAddDelVipReply)(nil), "lb_add_del_vip_reply_e8d4e804")
- api.RegisterMessage((*LbAsDetails)(nil), "lb_as_details_9c39f60e")
+ api.RegisterMessage((*LbAsDetails)(nil), "lb_as_details_8d24c29e")
api.RegisterMessage((*LbAsDump)(nil), "lb_as_dump_1063f819")
- api.RegisterMessage((*LbConf)(nil), "lb_conf_22ddb739")
+ api.RegisterMessage((*LbConf)(nil), "lb_conf_56cd3261")
api.RegisterMessage((*LbConfReply)(nil), "lb_conf_reply_e8d4e804")
api.RegisterMessage((*LbFlushVip)(nil), "lb_flush_vip_1063f819")
api.RegisterMessage((*LbFlushVipReply)(nil), "lb_flush_vip_reply_e8d4e804")
- api.RegisterMessage((*LbVipDetails)(nil), "lb_vip_details_08f39bed")
- api.RegisterMessage((*LbVipDump)(nil), "lb_vip_dump_c7bcb124")
+ api.RegisterMessage((*LbVipDetails)(nil), "lb_vip_details_1329ec9b")
+ api.RegisterMessage((*LbVipDump)(nil), "lb_vip_dump_56110cb7")
}
// Messages returns list of all messages in this module.