1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/avf.api.json
7 // Package avf contains generated bindings for API file avf.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 = 0xbaaa7124
32 // AvfCreate defines message 'avf_create'.
33 type AvfCreate struct {
34 PciAddr uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"`
35 EnableElog int32 `binapi:"i32,name=enable_elog" json:"enable_elog,omitempty"`
36 RxqNum uint16 `binapi:"u16,name=rxq_num" json:"rxq_num,omitempty"`
37 RxqSize uint16 `binapi:"u16,name=rxq_size" json:"rxq_size,omitempty"`
38 TxqSize uint16 `binapi:"u16,name=txq_size" json:"txq_size,omitempty"`
41 func (m *AvfCreate) Reset() { *m = AvfCreate{} }
42 func (*AvfCreate) GetMessageName() string { return "avf_create" }
43 func (*AvfCreate) GetCrcString() string { return "daab8ae2" }
44 func (*AvfCreate) GetMessageType() api.MessageType {
45 return api.RequestMessage
48 func (m *AvfCreate) Size() int {
53 size += 4 // m.PciAddr
54 size += 4 // m.EnableElog
56 size += 2 // m.RxqSize
57 size += 2 // m.TxqSize
60 func (m *AvfCreate) Marshal(b []byte) ([]byte, error) {
63 buf = codec.NewBuffer(make([]byte, m.Size()))
65 buf = codec.NewBuffer(b)
67 buf.EncodeUint32(uint32(m.PciAddr))
68 buf.EncodeUint32(uint32(m.EnableElog))
69 buf.EncodeUint16(uint16(m.RxqNum))
70 buf.EncodeUint16(uint16(m.RxqSize))
71 buf.EncodeUint16(uint16(m.TxqSize))
72 return buf.Bytes(), nil
74 func (m *AvfCreate) Unmarshal(b []byte) error {
75 buf := codec.NewBuffer(b)
76 m.PciAddr = buf.DecodeUint32()
77 m.EnableElog = int32(buf.DecodeUint32())
78 m.RxqNum = buf.DecodeUint16()
79 m.RxqSize = buf.DecodeUint16()
80 m.TxqSize = buf.DecodeUint16()
84 // AvfCreateReply defines message 'avf_create_reply'.
85 type AvfCreateReply struct {
86 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
87 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
90 func (m *AvfCreateReply) Reset() { *m = AvfCreateReply{} }
91 func (*AvfCreateReply) GetMessageName() string { return "avf_create_reply" }
92 func (*AvfCreateReply) GetCrcString() string { return "5383d31f" }
93 func (*AvfCreateReply) GetMessageType() api.MessageType {
94 return api.ReplyMessage
97 func (m *AvfCreateReply) Size() int {
102 size += 4 // m.Retval
103 size += 4 // m.SwIfIndex
106 func (m *AvfCreateReply) Marshal(b []byte) ([]byte, error) {
107 var buf *codec.Buffer
109 buf = codec.NewBuffer(make([]byte, m.Size()))
111 buf = codec.NewBuffer(b)
113 buf.EncodeUint32(uint32(m.Retval))
114 buf.EncodeUint32(uint32(m.SwIfIndex))
115 return buf.Bytes(), nil
117 func (m *AvfCreateReply) Unmarshal(b []byte) error {
118 buf := codec.NewBuffer(b)
119 m.Retval = int32(buf.DecodeUint32())
120 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
124 // AvfDelete defines message 'avf_delete'.
125 type AvfDelete struct {
126 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
129 func (m *AvfDelete) Reset() { *m = AvfDelete{} }
130 func (*AvfDelete) GetMessageName() string { return "avf_delete" }
131 func (*AvfDelete) GetCrcString() string { return "f9e6675e" }
132 func (*AvfDelete) GetMessageType() api.MessageType {
133 return api.RequestMessage
136 func (m *AvfDelete) Size() int {
141 size += 4 // m.SwIfIndex
144 func (m *AvfDelete) Marshal(b []byte) ([]byte, error) {
145 var buf *codec.Buffer
147 buf = codec.NewBuffer(make([]byte, m.Size()))
149 buf = codec.NewBuffer(b)
151 buf.EncodeUint32(uint32(m.SwIfIndex))
152 return buf.Bytes(), nil
154 func (m *AvfDelete) Unmarshal(b []byte) error {
155 buf := codec.NewBuffer(b)
156 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
160 // AvfDeleteReply defines message 'avf_delete_reply'.
161 type AvfDeleteReply struct {
162 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
165 func (m *AvfDeleteReply) Reset() { *m = AvfDeleteReply{} }
166 func (*AvfDeleteReply) GetMessageName() string { return "avf_delete_reply" }
167 func (*AvfDeleteReply) GetCrcString() string { return "e8d4e804" }
168 func (*AvfDeleteReply) GetMessageType() api.MessageType {
169 return api.ReplyMessage
172 func (m *AvfDeleteReply) Size() int {
177 size += 4 // m.Retval
180 func (m *AvfDeleteReply) Marshal(b []byte) ([]byte, error) {
181 var buf *codec.Buffer
183 buf = codec.NewBuffer(make([]byte, m.Size()))
185 buf = codec.NewBuffer(b)
187 buf.EncodeUint32(uint32(m.Retval))
188 return buf.Bytes(), nil
190 func (m *AvfDeleteReply) Unmarshal(b []byte) error {
191 buf := codec.NewBuffer(b)
192 m.Retval = int32(buf.DecodeUint32())
196 func init() { file_avf_binapi_init() }
197 func file_avf_binapi_init() {
198 api.RegisterMessage((*AvfCreate)(nil), "avf_create_daab8ae2")
199 api.RegisterMessage((*AvfCreateReply)(nil), "avf_create_reply_5383d31f")
200 api.RegisterMessage((*AvfDelete)(nil), "avf_delete_f9e6675e")
201 api.RegisterMessage((*AvfDeleteReply)(nil), "avf_delete_reply_e8d4e804")
204 // Messages returns list of all messages in this module.
205 func AllMessages() []api.Message {
206 return []api.Message{
208 (*AvfCreateReply)(nil),
210 (*AvfDeleteReply)(nil),