1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package oddbuf contains generated bindings for API file oddbuf.api.
14 api "git.fd.io/govpp.git/api"
15 interface_types "git.fd.io/govpp.git/binapi/interface_types"
16 codec "git.fd.io/govpp.git/codec"
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
28 VersionCrc = 0x95757869
31 // OddbufEnableDisable defines message 'oddbuf_enable_disable'.
32 type OddbufEnableDisable struct {
33 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
34 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
37 func (m *OddbufEnableDisable) Reset() { *m = OddbufEnableDisable{} }
38 func (*OddbufEnableDisable) GetMessageName() string { return "oddbuf_enable_disable" }
39 func (*OddbufEnableDisable) GetCrcString() string { return "3865946c" }
40 func (*OddbufEnableDisable) GetMessageType() api.MessageType {
41 return api.RequestMessage
44 func (m *OddbufEnableDisable) Size() (size int) {
48 size += 1 // m.EnableDisable
49 size += 4 // m.SwIfIndex
52 func (m *OddbufEnableDisable) Marshal(b []byte) ([]byte, error) {
54 b = make([]byte, m.Size())
56 buf := codec.NewBuffer(b)
57 buf.EncodeBool(m.EnableDisable)
58 buf.EncodeUint32(uint32(m.SwIfIndex))
59 return buf.Bytes(), nil
61 func (m *OddbufEnableDisable) Unmarshal(b []byte) error {
62 buf := codec.NewBuffer(b)
63 m.EnableDisable = buf.DecodeBool()
64 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
68 // OddbufEnableDisableReply defines message 'oddbuf_enable_disable_reply'.
69 type OddbufEnableDisableReply struct {
70 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
73 func (m *OddbufEnableDisableReply) Reset() { *m = OddbufEnableDisableReply{} }
74 func (*OddbufEnableDisableReply) GetMessageName() string { return "oddbuf_enable_disable_reply" }
75 func (*OddbufEnableDisableReply) GetCrcString() string { return "e8d4e804" }
76 func (*OddbufEnableDisableReply) GetMessageType() api.MessageType {
77 return api.ReplyMessage
80 func (m *OddbufEnableDisableReply) Size() (size int) {
87 func (m *OddbufEnableDisableReply) Marshal(b []byte) ([]byte, error) {
89 b = make([]byte, m.Size())
91 buf := codec.NewBuffer(b)
92 buf.EncodeInt32(m.Retval)
93 return buf.Bytes(), nil
95 func (m *OddbufEnableDisableReply) Unmarshal(b []byte) error {
96 buf := codec.NewBuffer(b)
97 m.Retval = buf.DecodeInt32()
101 func init() { file_oddbuf_binapi_init() }
102 func file_oddbuf_binapi_init() {
103 api.RegisterMessage((*OddbufEnableDisable)(nil), "oddbuf_enable_disable_3865946c")
104 api.RegisterMessage((*OddbufEnableDisableReply)(nil), "oddbuf_enable_disable_reply_e8d4e804")
107 // Messages returns list of all messages in this module.
108 func AllMessages() []api.Message {
109 return []api.Message{
110 (*OddbufEnableDisable)(nil),
111 (*OddbufEnableDisableReply)(nil),