Regenerate binapi from Dockerfile
[govpp.git] / binapi / l2e / l2e.ba.go
index ebfb464..12a429b 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.5.0-dev
+//  VPP:              21.06-release
 // source: /usr/share/vpp/api/plugins/l2e.api.json
 
 // Package l2e contains generated bindings for API file l2e.api.
@@ -26,10 +26,11 @@ const _ = api.GoVppAPIPackageIsVersion2
 const (
        APIFile    = "l2e"
        APIVersion = "1.0.0"
-       VersionCrc = 0x7c918b8
+       VersionCrc = 0x6e8abdfb
 )
 
 // L2Emulation defines message 'l2_emulation'.
+// InProgress: the message form may change in the future versions
 type L2Emulation 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"`
@@ -42,22 +43,19 @@ func (*L2Emulation) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *L2Emulation) Size() int {
+func (m *L2Emulation) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.SwIfIndex
        size += 1 // m.Enable
        return size
 }
 func (m *L2Emulation) Marshal(b []byte) ([]byte, error) {
-       var buf *codec.Buffer
        if b == nil {
-               buf = codec.NewBuffer(make([]byte, m.Size()))
-       } else {
-               buf = codec.NewBuffer(b)
+               b = make([]byte, m.Size())
        }
+       buf := codec.NewBuffer(b)
        buf.EncodeUint32(uint32(m.SwIfIndex))
        buf.EncodeBool(m.Enable)
        return buf.Bytes(), nil
@@ -70,6 +68,7 @@ func (m *L2Emulation) Unmarshal(b []byte) error {
 }
 
 // L2EmulationReply defines message 'l2_emulation_reply'.
+// InProgress: the message form may change in the future versions
 type L2EmulationReply struct {
        Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
 }
@@ -81,27 +80,24 @@ func (*L2EmulationReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *L2EmulationReply) Size() int {
+func (m *L2EmulationReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *L2EmulationReply) 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 *L2EmulationReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }