// 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.
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"`
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
}
// 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"`
}
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
}