// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.4.0
+// VPP: 21.06-release
// source: /usr/share/vpp/api/plugins/mdata.api.json
// Package mdata contains generated bindings for API file mdata.api.
const (
APIFile = "mdata"
APIVersion = "0.1.0"
- VersionCrc = 0x3a1911dd
+ VersionCrc = 0x5bd69477
)
// MdataEnableDisable defines message 'mdata_enable_disable'.
+// InProgress: the message form may change in the future versions
type MdataEnableDisable struct {
EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
}
return api.RequestMessage
}
-func (m *MdataEnableDisable) Size() int {
+func (m *MdataEnableDisable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.EnableDisable
return size
}
func (m *MdataEnableDisable) 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.EnableDisable)
return buf.Bytes(), nil
}
}
// MdataEnableDisableReply defines message 'mdata_enable_disable_reply'.
+// InProgress: the message form may change in the future versions
type MdataEnableDisableReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
return api.ReplyMessage
}
-func (m *MdataEnableDisableReply) Size() int {
+func (m *MdataEnableDisableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *MdataEnableDisableReply) 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 *MdataEnableDisableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}