regenerate binapi
[govpp.git] / binapi / gre / gre.ba.go
index e87e88f..08a225d 100644 (file)
@@ -1,7 +1,7 @@
 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
 // versions:
-//  binapi-generator: v0.4.0-dev
-//  VPP:              20.05-release
+//  binapi-generator: v0.3.5-56-gc0da1f2-dirty
+//  VPP:              21.06-release
 // source: /usr/share/vpp/api/core/gre.api.json
 
 // Package gre contains generated bindings for API file gre.api.
 package gre
 
 import (
+       "strconv"
+
        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"
        tunnel_types "git.fd.io/govpp.git/binapi/tunnel_types"
        codec "git.fd.io/govpp.git/codec"
-       "strconv"
 )
 
 // This is a compile-time assertion to ensure that this generated file
@@ -30,8 +31,8 @@ const _ = api.GoVppAPIPackageIsVersion2
 
 const (
        APIFile    = "gre"
-       APIVersion = "2.1.0"
-       VersionCrc = 0xb9021569
+       APIVersion = "2.1.1"
+       VersionCrc = 0x98b44dd1
 )
 
 // GreTunnelType defines enum 'gre_tunnel_type'.
@@ -85,16 +86,15 @@ type GreTunnelAddDel struct {
 
 func (m *GreTunnelAddDel) Reset()               { *m = GreTunnelAddDel{} }
 func (*GreTunnelAddDel) GetMessageName() string { return "gre_tunnel_add_del" }
-func (*GreTunnelAddDel) GetCrcString() string   { return "6efc9c22" }
+func (*GreTunnelAddDel) GetCrcString() string   { return "a27d7f17" }
 func (*GreTunnelAddDel) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *GreTunnelAddDel) Size() int {
+func (m *GreTunnelAddDel) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 1      // m.IsAdd
        size += 1      // m.Tunnel.Type
        size += 1      // m.Tunnel.Mode
@@ -110,24 +110,22 @@ func (m *GreTunnelAddDel) Size() int {
        return size
 }
 func (m *GreTunnelAddDel) Marshal(b []byte) ([]byte, error) {
-       var buf *codec.Buffer
        if b == nil {
-               buf = codec.NewBuffer(make([]byte, m.Size()))
-       } else {
-               buf = codec.NewBuffer(b)
+               b = make([]byte, m.Size())
        }
+       buf := codec.NewBuffer(b)
        buf.EncodeBool(m.IsAdd)
        buf.EncodeUint8(uint8(m.Tunnel.Type))
        buf.EncodeUint8(uint8(m.Tunnel.Mode))
        buf.EncodeUint8(uint8(m.Tunnel.Flags))
-       buf.EncodeUint16(uint16(m.Tunnel.SessionID))
-       buf.EncodeUint32(uint32(m.Tunnel.Instance))
-       buf.EncodeUint32(uint32(m.Tunnel.OuterTableID))
+       buf.EncodeUint16(m.Tunnel.SessionID)
+       buf.EncodeUint32(m.Tunnel.Instance)
+       buf.EncodeUint32(m.Tunnel.OuterTableID)
        buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
        buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
-       buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 0)
+       buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
        buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
-       buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 0)
+       buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
        return buf.Bytes(), nil
 }
 func (m *GreTunnelAddDel) Unmarshal(b []byte) error {
@@ -160,29 +158,26 @@ func (*GreTunnelAddDelReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *GreTunnelAddDelReply) Size() int {
+func (m *GreTunnelAddDelReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        size += 4 // m.SwIfIndex
        return size
 }
 func (m *GreTunnelAddDelReply) 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)
        buf.EncodeUint32(uint32(m.SwIfIndex))
        return buf.Bytes(), nil
 }
 func (m *GreTunnelAddDelReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
        return nil
 }
@@ -194,16 +189,15 @@ type GreTunnelDetails struct {
 
 func (m *GreTunnelDetails) Reset()               { *m = GreTunnelDetails{} }
 func (*GreTunnelDetails) GetMessageName() string { return "gre_tunnel_details" }
-func (*GreTunnelDetails) GetCrcString() string   { return "003bfbf1" }
+func (*GreTunnelDetails) GetCrcString() string   { return "24435433" }
 func (*GreTunnelDetails) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *GreTunnelDetails) Size() int {
+func (m *GreTunnelDetails) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 1      // m.Tunnel.Type
        size += 1      // m.Tunnel.Mode
        size += 1      // m.Tunnel.Flags
@@ -218,23 +212,21 @@ func (m *GreTunnelDetails) Size() int {
        return size
 }
 func (m *GreTunnelDetails) 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.Tunnel.Type))
        buf.EncodeUint8(uint8(m.Tunnel.Mode))
        buf.EncodeUint8(uint8(m.Tunnel.Flags))
-       buf.EncodeUint16(uint16(m.Tunnel.SessionID))
-       buf.EncodeUint32(uint32(m.Tunnel.Instance))
-       buf.EncodeUint32(uint32(m.Tunnel.OuterTableID))
+       buf.EncodeUint16(m.Tunnel.SessionID)
+       buf.EncodeUint32(m.Tunnel.Instance)
+       buf.EncodeUint32(m.Tunnel.OuterTableID)
        buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
        buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
-       buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 0)
+       buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
        buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
-       buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 0)
+       buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
        return buf.Bytes(), nil
 }
 func (m *GreTunnelDetails) Unmarshal(b []byte) error {
@@ -265,21 +257,18 @@ func (*GreTunnelDump) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *GreTunnelDump) Size() int {
+func (m *GreTunnelDump) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.SwIfIndex
        return size
 }
 func (m *GreTunnelDump) Marshal(b []byte) ([]byte, error) {
-       var buf *codec.Buffer
        if b == nil {
-               buf = codec.NewBuffer(make([]byte, m.Size()))
-       } else {
-               buf = codec.NewBuffer(b)
+               b = make([]byte, m.Size())
        }
+       buf := codec.NewBuffer(b)
        buf.EncodeUint32(uint32(m.SwIfIndex))
        return buf.Bytes(), nil
 }
@@ -291,9 +280,9 @@ func (m *GreTunnelDump) Unmarshal(b []byte) error {
 
 func init() { file_gre_binapi_init() }
 func file_gre_binapi_init() {
-       api.RegisterMessage((*GreTunnelAddDel)(nil), "gre_tunnel_add_del_6efc9c22")
+       api.RegisterMessage((*GreTunnelAddDel)(nil), "gre_tunnel_add_del_a27d7f17")
        api.RegisterMessage((*GreTunnelAddDelReply)(nil), "gre_tunnel_add_del_reply_5383d31f")
-       api.RegisterMessage((*GreTunnelDetails)(nil), "gre_tunnel_details_003bfbf1")
+       api.RegisterMessage((*GreTunnelDetails)(nil), "gre_tunnel_details_24435433")
        api.RegisterMessage((*GreTunnelDump)(nil), "gre_tunnel_dump_f9e6675e")
 }