// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.5.0
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/map.api.json
// Package maps contains generated bindings for API file map.api.
//
// Contents:
-// 30 messages
+// 32 messages
//
package maps
const (
APIFile = "map"
- APIVersion = "4.1.1"
- VersionCrc = 0x82b79829
+ APIVersion = "4.2.1"
+ VersionCrc = 0xd1f7f56c
)
// MapAddDelRule defines message 'map_add_del_rule'.
return api.RequestMessage
}
-func (m *MapAddDelRule) Size() int {
+func (m *MapAddDelRule) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Index
size += 1 // m.IsAdd
size += 1 * 16 // m.IP6Dst
return size
}
func (m *MapAddDelRule) 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.Index))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Index)
buf.EncodeBool(m.IsAdd)
buf.EncodeBytes(m.IP6Dst[:], 16)
- buf.EncodeUint16(uint16(m.Psid))
+ buf.EncodeUint16(m.Psid)
return buf.Bytes(), nil
}
func (m *MapAddDelRule) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *MapAddDelRuleReply) Size() int {
+func (m *MapAddDelRuleReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapAddDelRuleReply) 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 *MapAddDelRuleReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
EaBitsLen uint8 `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
- Mtu uint16 `binapi:"u16,name=mtu,default=%!s(float64=1280)" json:"mtu,omitempty"`
+ Mtu uint16 `binapi:"u16,name=mtu,default=1280" json:"mtu,omitempty"`
Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
}
func (m *MapAddDomain) Reset() { *m = MapAddDomain{} }
func (*MapAddDomain) GetMessageName() string { return "map_add_domain" }
-func (*MapAddDomain) GetCrcString() string { return "7a5a18c9" }
+func (*MapAddDomain) GetCrcString() string { return "249f195c" }
func (*MapAddDomain) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *MapAddDomain) Size() int {
+func (m *MapAddDomain) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 * 16 // m.IP6Prefix.Address
size += 1 // m.IP6Prefix.Len
size += 1 * 4 // m.IP4Prefix.Address
return size
}
func (m *MapAddDomain) 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.IP6Prefix.Address[:], 16)
- buf.EncodeUint8(uint8(m.IP6Prefix.Len))
+ buf.EncodeUint8(m.IP6Prefix.Len)
buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
- buf.EncodeUint8(uint8(m.IP4Prefix.Len))
+ buf.EncodeUint8(m.IP4Prefix.Len)
buf.EncodeBytes(m.IP6Src.Address[:], 16)
- buf.EncodeUint8(uint8(m.IP6Src.Len))
- buf.EncodeUint8(uint8(m.EaBitsLen))
- buf.EncodeUint8(uint8(m.PsidOffset))
- buf.EncodeUint8(uint8(m.PsidLength))
- buf.EncodeUint16(uint16(m.Mtu))
+ buf.EncodeUint8(m.IP6Src.Len)
+ buf.EncodeUint8(m.EaBitsLen)
+ buf.EncodeUint8(m.PsidOffset)
+ buf.EncodeUint8(m.PsidLength)
+ buf.EncodeUint16(m.Mtu)
buf.EncodeString(m.Tag, 64)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *MapAddDomainReply) Size() int {
+func (m *MapAddDomainReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Index
size += 4 // m.Retval
return size
}
func (m *MapAddDomainReply) 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.Index))
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Index)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *MapAddDomainReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.Index = buf.DecodeUint32()
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *MapDelDomain) Size() int {
+func (m *MapDelDomain) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Index
return size
}
func (m *MapDelDomain) 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.Index))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Index)
return buf.Bytes(), nil
}
func (m *MapDelDomain) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *MapDelDomainReply) Size() int {
+func (m *MapDelDomainReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapDelDomainReply) 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 *MapDelDomainReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *MapDomainDetails) Reset() { *m = MapDomainDetails{} }
func (*MapDomainDetails) GetMessageName() string { return "map_domain_details" }
-func (*MapDomainDetails) GetCrcString() string { return "fc1859dd" }
+func (*MapDomainDetails) GetCrcString() string { return "796edb50" }
func (*MapDomainDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *MapDomainDetails) Size() int {
+func (m *MapDomainDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.DomainIndex
size += 1 * 16 // m.IP6Prefix.Address
size += 1 // m.IP6Prefix.Len
return size
}
func (m *MapDomainDetails) 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.DomainIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.DomainIndex)
buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
- buf.EncodeUint8(uint8(m.IP6Prefix.Len))
+ buf.EncodeUint8(m.IP6Prefix.Len)
buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
- buf.EncodeUint8(uint8(m.IP4Prefix.Len))
+ buf.EncodeUint8(m.IP4Prefix.Len)
buf.EncodeBytes(m.IP6Src.Address[:], 16)
- buf.EncodeUint8(uint8(m.IP6Src.Len))
- buf.EncodeUint8(uint8(m.EaBitsLen))
- buf.EncodeUint8(uint8(m.PsidOffset))
- buf.EncodeUint8(uint8(m.PsidLength))
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint16(uint16(m.Mtu))
+ buf.EncodeUint8(m.IP6Src.Len)
+ buf.EncodeUint8(m.EaBitsLen)
+ buf.EncodeUint8(m.PsidOffset)
+ buf.EncodeUint8(m.PsidLength)
+ buf.EncodeUint8(m.Flags)
+ buf.EncodeUint16(m.Mtu)
buf.EncodeString(m.Tag, 64)
return buf.Bytes(), nil
}
}
// MapDomainDump defines message 'map_domain_dump'.
+// Deprecated: the message will be removed in the future versions
type MapDomainDump struct{}
func (m *MapDomainDump) Reset() { *m = MapDomainDump{} }
return api.RequestMessage
}
-func (m *MapDomainDump) Size() int {
+func (m *MapDomainDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *MapDomainDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *MapDomainDump) Unmarshal(b []byte) error {
return nil
}
+// MapDomainsGet defines message 'map_domains_get'.
+type MapDomainsGet struct {
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *MapDomainsGet) Reset() { *m = MapDomainsGet{} }
+func (*MapDomainsGet) GetMessageName() string { return "map_domains_get" }
+func (*MapDomainsGet) GetCrcString() string { return "f75ba505" }
+func (*MapDomainsGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *MapDomainsGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Cursor
+ return size
+}
+func (m *MapDomainsGet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *MapDomainsGet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
+// MapDomainsGetReply defines message 'map_domains_get_reply'.
+type MapDomainsGetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *MapDomainsGetReply) Reset() { *m = MapDomainsGetReply{} }
+func (*MapDomainsGetReply) GetMessageName() string { return "map_domains_get_reply" }
+func (*MapDomainsGetReply) GetCrcString() string { return "53b48f5d" }
+func (*MapDomainsGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *MapDomainsGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Cursor
+ return size
+}
+func (m *MapDomainsGetReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *MapDomainsGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
// MapIfEnableDisable defines message 'map_if_enable_disable'.
type MapIfEnableDisable struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
return api.RequestMessage
}
-func (m *MapIfEnableDisable) Size() int {
+func (m *MapIfEnableDisable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsEnable
size += 1 // m.IsTranslation
return size
}
func (m *MapIfEnableDisable) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsEnable)
buf.EncodeBool(m.IsTranslation)
return api.ReplyMessage
}
-func (m *MapIfEnableDisableReply) Size() int {
+func (m *MapIfEnableDisableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapIfEnableDisableReply) 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 *MapIfEnableDisableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *MapParamAddDelPreResolve) Reset() { *m = MapParamAddDelPreResolve{} }
func (*MapParamAddDelPreResolve) GetMessageName() string { return "map_param_add_del_pre_resolve" }
-func (*MapParamAddDelPreResolve) GetCrcString() string { return "17008c66" }
+func (*MapParamAddDelPreResolve) GetCrcString() string { return "dae5af03" }
func (*MapParamAddDelPreResolve) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *MapParamAddDelPreResolve) Size() int {
+func (m *MapParamAddDelPreResolve) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 1 * 4 // m.IP4NhAddress
size += 1 * 16 // m.IP6NhAddress
return size
}
func (m *MapParamAddDelPreResolve) 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.EncodeBytes(m.IP4NhAddress[:], 4)
buf.EncodeBytes(m.IP6NhAddress[:], 16)
return api.ReplyMessage
}
-func (m *MapParamAddDelPreResolveReply) Size() int {
+func (m *MapParamAddDelPreResolveReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapParamAddDelPreResolveReply) 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 *MapParamAddDelPreResolveReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *MapParamGet) Size() int {
+func (m *MapParamGet) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *MapParamGet) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *MapParamGet) Unmarshal(b []byte) error {
func (m *MapParamGetReply) Reset() { *m = MapParamGetReply{} }
func (*MapParamGetReply) GetMessageName() string { return "map_param_get_reply" }
-func (*MapParamGetReply) GetCrcString() string { return "28092156" }
+func (*MapParamGetReply) GetCrcString() string { return "26272c90" }
func (*MapParamGetReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *MapParamGetReply) Size() int {
+func (m *MapParamGetReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 1 // m.FragInner
size += 1 // m.FragIgnoreDf
return size
}
func (m *MapParamGetReply) 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.EncodeUint8(uint8(m.FragInner))
- buf.EncodeUint8(uint8(m.FragIgnoreDf))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint8(m.FragInner)
+ buf.EncodeUint8(m.FragIgnoreDf)
buf.EncodeBytes(m.ICMPIP4ErrRelaySrc[:], 4)
buf.EncodeBool(m.ICMP6EnableUnreachable)
buf.EncodeBytes(m.IP4NhAddress[:], 4)
buf.EncodeBytes(m.IP6NhAddress[:], 16)
- buf.EncodeUint16(uint16(m.IP4LifetimeMs))
- buf.EncodeUint16(uint16(m.IP4PoolSize))
- buf.EncodeUint32(uint32(m.IP4Buffers))
- buf.EncodeFloat64(float64(m.IP4HtRatio))
+ buf.EncodeUint16(m.IP4LifetimeMs)
+ buf.EncodeUint16(m.IP4PoolSize)
+ buf.EncodeUint32(m.IP4Buffers)
+ buf.EncodeFloat64(m.IP4HtRatio)
buf.EncodeBool(m.SecCheckEnable)
buf.EncodeBool(m.SecCheckFragments)
buf.EncodeBool(m.TcCopy)
- buf.EncodeUint8(uint8(m.TcClass))
+ buf.EncodeUint8(m.TcClass)
return buf.Bytes(), nil
}
func (m *MapParamGetReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.FragInner = buf.DecodeUint8()
m.FragIgnoreDf = buf.DecodeUint8()
copy(m.ICMPIP4ErrRelaySrc[:], buf.DecodeBytes(4))
m.IP4LifetimeMs = buf.DecodeUint16()
m.IP4PoolSize = buf.DecodeUint16()
m.IP4Buffers = buf.DecodeUint32()
- m.IP4HtRatio = float64(buf.DecodeFloat64())
+ m.IP4HtRatio = buf.DecodeFloat64()
m.SecCheckEnable = buf.DecodeBool()
m.SecCheckFragments = buf.DecodeBool()
m.TcCopy = buf.DecodeBool()
return api.RequestMessage
}
-func (m *MapParamSetFragmentation) Size() int {
+func (m *MapParamSetFragmentation) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Inner
size += 1 // m.IgnoreDf
return size
}
func (m *MapParamSetFragmentation) 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.Inner)
buf.EncodeBool(m.IgnoreDf)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *MapParamSetFragmentationReply) Size() int {
+func (m *MapParamSetFragmentationReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapParamSetFragmentationReply) 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 *MapParamSetFragmentationReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *MapParamSetICMP) Size() int {
+func (m *MapParamSetICMP) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 * 4 // m.IP4ErrRelaySrc
return size
}
func (m *MapParamSetICMP) 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.IP4ErrRelaySrc[:], 4)
return buf.Bytes(), nil
}
return api.RequestMessage
}
-func (m *MapParamSetICMP6) Size() int {
+func (m *MapParamSetICMP6) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.EnableUnreachable
return size
}
func (m *MapParamSetICMP6) 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.EnableUnreachable)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *MapParamSetICMP6Reply) Size() int {
+func (m *MapParamSetICMP6Reply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapParamSetICMP6Reply) 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 *MapParamSetICMP6Reply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.ReplyMessage
}
-func (m *MapParamSetICMPReply) Size() int {
+func (m *MapParamSetICMPReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapParamSetICMPReply) 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 *MapParamSetICMPReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *MapParamSetSecurityCheck) Size() int {
+func (m *MapParamSetSecurityCheck) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Enable
size += 1 // m.Fragments
return size
}
func (m *MapParamSetSecurityCheck) 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.Enable)
buf.EncodeBool(m.Fragments)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *MapParamSetSecurityCheckReply) Size() int {
+func (m *MapParamSetSecurityCheckReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapParamSetSecurityCheckReply) 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 *MapParamSetSecurityCheckReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *MapParamSetTCP) Size() int {
+func (m *MapParamSetTCP) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 2 // m.TCPMss
return size
}
func (m *MapParamSetTCP) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint16(uint16(m.TCPMss))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint16(m.TCPMss)
return buf.Bytes(), nil
}
func (m *MapParamSetTCP) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *MapParamSetTCPReply) Size() int {
+func (m *MapParamSetTCPReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapParamSetTCPReply) 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 *MapParamSetTCPReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *MapParamSetTrafficClass) Size() int {
+func (m *MapParamSetTrafficClass) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Copy
size += 1 // m.TcClass
return size
}
func (m *MapParamSetTrafficClass) 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.Copy)
- buf.EncodeUint8(uint8(m.TcClass))
+ buf.EncodeUint8(m.TcClass)
return buf.Bytes(), nil
}
func (m *MapParamSetTrafficClass) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *MapParamSetTrafficClassReply) Size() int {
+func (m *MapParamSetTrafficClassReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MapParamSetTrafficClassReply) 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 *MapParamSetTrafficClassReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.ReplyMessage
}
-func (m *MapRuleDetails) Size() int {
+func (m *MapRuleDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 * 16 // m.IP6Dst
size += 2 // m.Psid
return size
}
func (m *MapRuleDetails) 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.IP6Dst[:], 16)
- buf.EncodeUint16(uint16(m.Psid))
+ buf.EncodeUint16(m.Psid)
return buf.Bytes(), nil
}
func (m *MapRuleDetails) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *MapRuleDump) Size() int {
+func (m *MapRuleDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.DomainIndex
return size
}
func (m *MapRuleDump) 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.DomainIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.DomainIndex)
return buf.Bytes(), nil
}
func (m *MapRuleDump) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *MapSummaryStats) Size() int {
+func (m *MapSummaryStats) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *MapSummaryStats) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *MapSummaryStats) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *MapSummaryStatsReply) Size() int {
+func (m *MapSummaryStatsReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 8 // m.TotalBindings
size += 8 * 2 // m.TotalPkts
return size
}
func (m *MapSummaryStatsReply) 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.EncodeUint64(uint64(m.TotalBindings))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint64(m.TotalBindings)
for i := 0; i < 2; i++ {
var x uint64
if i < len(m.TotalPkts) {
x = uint64(m.TotalPkts[i])
}
- buf.EncodeUint64(uint64(x))
+ buf.EncodeUint64(x)
}
for i := 0; i < 2; i++ {
var x uint64
if i < len(m.TotalBytes) {
x = uint64(m.TotalBytes[i])
}
- buf.EncodeUint64(uint64(x))
+ buf.EncodeUint64(x)
}
- buf.EncodeUint64(uint64(m.TotalIP4Fragments))
+ buf.EncodeUint64(m.TotalIP4Fragments)
for i := 0; i < 2; i++ {
var x uint64
if i < len(m.TotalSecurityCheck) {
x = uint64(m.TotalSecurityCheck[i])
}
- buf.EncodeUint64(uint64(x))
+ buf.EncodeUint64(x)
}
return buf.Bytes(), nil
}
func (m *MapSummaryStatsReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.TotalBindings = buf.DecodeUint64()
m.TotalPkts = make([]uint64, 2)
for i := 0; i < len(m.TotalPkts); i++ {
func file_maps_binapi_init() {
api.RegisterMessage((*MapAddDelRule)(nil), "map_add_del_rule_c65b32f7")
api.RegisterMessage((*MapAddDelRuleReply)(nil), "map_add_del_rule_reply_e8d4e804")
- api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_7a5a18c9")
+ api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_249f195c")
api.RegisterMessage((*MapAddDomainReply)(nil), "map_add_domain_reply_3e6d4e2c")
api.RegisterMessage((*MapDelDomain)(nil), "map_del_domain_8ac76db6")
api.RegisterMessage((*MapDelDomainReply)(nil), "map_del_domain_reply_e8d4e804")
- api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_fc1859dd")
+ api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_796edb50")
api.RegisterMessage((*MapDomainDump)(nil), "map_domain_dump_51077d14")
+ api.RegisterMessage((*MapDomainsGet)(nil), "map_domains_get_f75ba505")
+ api.RegisterMessage((*MapDomainsGetReply)(nil), "map_domains_get_reply_53b48f5d")
api.RegisterMessage((*MapIfEnableDisable)(nil), "map_if_enable_disable_59bb32f4")
api.RegisterMessage((*MapIfEnableDisableReply)(nil), "map_if_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_17008c66")
+ api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_dae5af03")
api.RegisterMessage((*MapParamAddDelPreResolveReply)(nil), "map_param_add_del_pre_resolve_reply_e8d4e804")
api.RegisterMessage((*MapParamGet)(nil), "map_param_get_51077d14")
- api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_28092156")
+ api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_26272c90")
api.RegisterMessage((*MapParamSetFragmentation)(nil), "map_param_set_fragmentation_9ff54d90")
api.RegisterMessage((*MapParamSetFragmentationReply)(nil), "map_param_set_fragmentation_reply_e8d4e804")
api.RegisterMessage((*MapParamSetICMP)(nil), "map_param_set_icmp_58210cbf")
(*MapDelDomainReply)(nil),
(*MapDomainDetails)(nil),
(*MapDomainDump)(nil),
+ (*MapDomainsGet)(nil),
+ (*MapDomainsGetReply)(nil),
(*MapIfEnableDisable)(nil),
(*MapIfEnableDisableReply)(nil),
(*MapParamAddDelPreResolve)(nil),