1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/plugins/oddbuf.api.json
7 // Package oddbuf contains generated bindings for API file oddbuf.api.
15 api "git.fd.io/govpp.git/api"
16 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 codec "git.fd.io/govpp.git/codec"
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
29 VersionCrc = 0x3a1a2c50
32 // OddbufEnableDisable defines message 'oddbuf_enable_disable'.
33 // InProgress: the message form may change in the future versions
34 type OddbufEnableDisable struct {
35 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
36 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
39 func (m *OddbufEnableDisable) Reset() { *m = OddbufEnableDisable{} }
40 func (*OddbufEnableDisable) GetMessageName() string { return "oddbuf_enable_disable" }
41 func (*OddbufEnableDisable) GetCrcString() string { return "3865946c" }
42 func (*OddbufEnableDisable) GetMessageType() api.MessageType {
43 return api.RequestMessage
46 func (m *OddbufEnableDisable) Size() (size int) {
50 size += 1 // m.EnableDisable
51 size += 4 // m.SwIfIndex
54 func (m *OddbufEnableDisable) Marshal(b []byte) ([]byte, error) {
56 b = make([]byte, m.Size())
58 buf := codec.NewBuffer(b)
59 buf.EncodeBool(m.EnableDisable)
60 buf.EncodeUint32(uint32(m.SwIfIndex))
61 return buf.Bytes(), nil
63 func (m *OddbufEnableDisable) Unmarshal(b []byte) error {
64 buf := codec.NewBuffer(b)
65 m.EnableDisable = buf.DecodeBool()
66 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
70 // OddbufEnableDisableReply defines message 'oddbuf_enable_disable_reply'.
71 // InProgress: the message form may change in the future versions
72 type OddbufEnableDisableReply struct {
73 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
76 func (m *OddbufEnableDisableReply) Reset() { *m = OddbufEnableDisableReply{} }
77 func (*OddbufEnableDisableReply) GetMessageName() string { return "oddbuf_enable_disable_reply" }
78 func (*OddbufEnableDisableReply) GetCrcString() string { return "e8d4e804" }
79 func (*OddbufEnableDisableReply) GetMessageType() api.MessageType {
80 return api.ReplyMessage
83 func (m *OddbufEnableDisableReply) Size() (size int) {
90 func (m *OddbufEnableDisableReply) Marshal(b []byte) ([]byte, error) {
92 b = make([]byte, m.Size())
94 buf := codec.NewBuffer(b)
95 buf.EncodeInt32(m.Retval)
96 return buf.Bytes(), nil
98 func (m *OddbufEnableDisableReply) Unmarshal(b []byte) error {
99 buf := codec.NewBuffer(b)
100 m.Retval = buf.DecodeInt32()
104 func init() { file_oddbuf_binapi_init() }
105 func file_oddbuf_binapi_init() {
106 api.RegisterMessage((*OddbufEnableDisable)(nil), "oddbuf_enable_disable_3865946c")
107 api.RegisterMessage((*OddbufEnableDisableReply)(nil), "oddbuf_enable_disable_reply_e8d4e804")
110 // Messages returns list of all messages in this module.
111 func AllMessages() []api.Message {
112 return []api.Message{
113 (*OddbufEnableDisable)(nil),
114 (*OddbufEnableDisableReply)(nil),