X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fl2e%2Fl2e.ba.go;h=19fd9c00497c7ffaa2749bcf75c138cb0a8afd88;hb=c09ee3241377aae2530a73d48c4e20641d76d0ee;hp=ebfb464d15d5782ea47c7e9f75cc3d2e3f667dde;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/l2e/l2e.ba.go b/binapi/l2e/l2e.ba.go index ebfb464..19fd9c0 100644 --- a/binapi/l2e/l2e.ba.go +++ b/binapi/l2e/l2e.ba.go @@ -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 +// 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 }