Merge "Add support for jumbo frames to libmemif"
[govpp.git] / examples / bin_api / memif / memif.go
1 // Code generated by govpp binapi-generator DO NOT EDIT.
2 // Package memif represents the VPP binary API of the 'memif' VPP module.
3 // Generated from '../../bin_api/memif.api.json'
4 package memif
5
6 import "git.fd.io/govpp.git/api"
7
8 // VlApiVersion contains version of the API.
9 const VlAPIVersion = 0x824c4ae0
10
11 // MemifCreate represents the VPP binary API message 'memif_create'.
12 // Generated from '../../bin_api/memif.api.json', line 24:
13 //
14 //            "memif_create",
15 //            [
16 //                "u16",
17 //                "_vl_msg_id"
18 //            ],
19 //            [
20 //                "u32",
21 //                "client_index"
22 //            ],
23 //            [
24 //                "u32",
25 //                "context"
26 //            ],
27 //            [
28 //                "u8",
29 //                "role"
30 //            ],
31 //            [
32 //                "u8",
33 //                "mode"
34 //            ],
35 //            [
36 //                "u8",
37 //                "rx_queues"
38 //            ],
39 //            [
40 //                "u8",
41 //                "tx_queues"
42 //            ],
43 //            [
44 //                "u32",
45 //                "id"
46 //            ],
47 //            [
48 //                "u8",
49 //                "socket_filename",
50 //                128
51 //            ],
52 //            [
53 //                "u8",
54 //                "secret",
55 //                24
56 //            ],
57 //            [
58 //                "u32",
59 //                "ring_size"
60 //            ],
61 //            [
62 //                "u16",
63 //                "buffer_size"
64 //            ],
65 //            [
66 //                "u8",
67 //                "hw_addr",
68 //                6
69 //            ],
70 //            {
71 //                "crc": "0x3551c914"
72 //            }
73 //
74 type MemifCreate struct {
75         Role           uint8
76         Mode           uint8
77         RxQueues       uint8
78         TxQueues       uint8
79         ID             uint32
80         SocketFilename []byte `struc:"[128]byte"`
81         Secret         []byte `struc:"[24]byte"`
82         RingSize       uint32
83         BufferSize     uint16
84         HwAddr         []byte `struc:"[6]byte"`
85 }
86
87 func (*MemifCreate) GetMessageName() string {
88         return "memif_create"
89 }
90 func (*MemifCreate) GetMessageType() api.MessageType {
91         return api.RequestMessage
92 }
93 func (*MemifCreate) GetCrcString() string {
94         return "3551c914"
95 }
96 func NewMemifCreate() api.Message {
97         return &MemifCreate{}
98 }
99
100 // MemifCreateReply represents the VPP binary API message 'memif_create_reply'.
101 // Generated from '../../bin_api/memif.api.json', line 85:
102 //
103 //            "memif_create_reply",
104 //            [
105 //                "u16",
106 //                "_vl_msg_id"
107 //            ],
108 //            [
109 //                "u32",
110 //                "context"
111 //            ],
112 //            [
113 //                "i32",
114 //                "retval"
115 //            ],
116 //            [
117 //                "u32",
118 //                "sw_if_index"
119 //            ],
120 //            {
121 //                "crc": "0xfda5941f"
122 //            }
123 //
124 type MemifCreateReply struct {
125         Retval    int32
126         SwIfIndex uint32
127 }
128
129 func (*MemifCreateReply) GetMessageName() string {
130         return "memif_create_reply"
131 }
132 func (*MemifCreateReply) GetMessageType() api.MessageType {
133         return api.ReplyMessage
134 }
135 func (*MemifCreateReply) GetCrcString() string {
136         return "fda5941f"
137 }
138 func NewMemifCreateReply() api.Message {
139         return &MemifCreateReply{}
140 }
141
142 // MemifDelete represents the VPP binary API message 'memif_delete'.
143 // Generated from '../../bin_api/memif.api.json', line 107:
144 //
145 //            "memif_delete",
146 //            [
147 //                "u16",
148 //                "_vl_msg_id"
149 //            ],
150 //            [
151 //                "u32",
152 //                "client_index"
153 //            ],
154 //            [
155 //                "u32",
156 //                "context"
157 //            ],
158 //            [
159 //                "u32",
160 //                "sw_if_index"
161 //            ],
162 //            {
163 //                "crc": "0x529cb13f"
164 //            }
165 //
166 type MemifDelete struct {
167         SwIfIndex uint32
168 }
169
170 func (*MemifDelete) GetMessageName() string {
171         return "memif_delete"
172 }
173 func (*MemifDelete) GetMessageType() api.MessageType {
174         return api.RequestMessage
175 }
176 func (*MemifDelete) GetCrcString() string {
177         return "529cb13f"
178 }
179 func NewMemifDelete() api.Message {
180         return &MemifDelete{}
181 }
182
183 // MemifDeleteReply represents the VPP binary API message 'memif_delete_reply'.
184 // Generated from '../../bin_api/memif.api.json', line 129:
185 //
186 //            "memif_delete_reply",
187 //            [
188 //                "u16",
189 //                "_vl_msg_id"
190 //            ],
191 //            [
192 //                "u32",
193 //                "context"
194 //            ],
195 //            [
196 //                "i32",
197 //                "retval"
198 //            ],
199 //            {
200 //                "crc": "0xe8d4e804"
201 //            }
202 //
203 type MemifDeleteReply struct {
204         Retval int32
205 }
206
207 func (*MemifDeleteReply) GetMessageName() string {
208         return "memif_delete_reply"
209 }
210 func (*MemifDeleteReply) GetMessageType() api.MessageType {
211         return api.ReplyMessage
212 }
213 func (*MemifDeleteReply) GetCrcString() string {
214         return "e8d4e804"
215 }
216 func NewMemifDeleteReply() api.Message {
217         return &MemifDeleteReply{}
218 }
219
220 // MemifDetails represents the VPP binary API message 'memif_details'.
221 // Generated from '../../bin_api/memif.api.json', line 147:
222 //
223 //            "memif_details",
224 //            [
225 //                "u16",
226 //                "_vl_msg_id"
227 //            ],
228 //            [
229 //                "u32",
230 //                "context"
231 //            ],
232 //            [
233 //                "u32",
234 //                "sw_if_index"
235 //            ],
236 //            [
237 //                "u8",
238 //                "if_name",
239 //                64
240 //            ],
241 //            [
242 //                "u8",
243 //                "hw_addr",
244 //                6
245 //            ],
246 //            [
247 //                "u32",
248 //                "id"
249 //            ],
250 //            [
251 //                "u8",
252 //                "role"
253 //            ],
254 //            [
255 //                "u8",
256 //                "mode"
257 //            ],
258 //            [
259 //                "u8",
260 //                "socket_filename",
261 //                128
262 //            ],
263 //            [
264 //                "u32",
265 //                "ring_size"
266 //            ],
267 //            [
268 //                "u16",
269 //                "buffer_size"
270 //            ],
271 //            [
272 //                "u8",
273 //                "admin_up_down"
274 //            ],
275 //            [
276 //                "u8",
277 //                "link_up_down"
278 //            ],
279 //            {
280 //                "crc": "0x0e1da928"
281 //            }
282 //
283 type MemifDetails struct {
284         SwIfIndex      uint32
285         IfName         []byte `struc:"[64]byte"`
286         HwAddr         []byte `struc:"[6]byte"`
287         ID             uint32
288         Role           uint8
289         Mode           uint8
290         SocketFilename []byte `struc:"[128]byte"`
291         RingSize       uint32
292         BufferSize     uint16
293         AdminUpDown    uint8
294         LinkUpDown     uint8
295 }
296
297 func (*MemifDetails) GetMessageName() string {
298         return "memif_details"
299 }
300 func (*MemifDetails) GetMessageType() api.MessageType {
301         return api.ReplyMessage
302 }
303 func (*MemifDetails) GetCrcString() string {
304         return "0e1da928"
305 }
306 func NewMemifDetails() api.Message {
307         return &MemifDetails{}
308 }
309
310 // MemifDump represents the VPP binary API message 'memif_dump'.
311 // Generated from '../../bin_api/memif.api.json', line 208:
312 //
313 //            "memif_dump",
314 //            [
315 //                "u16",
316 //                "_vl_msg_id"
317 //            ],
318 //            [
319 //                "u32",
320 //                "client_index"
321 //            ],
322 //            [
323 //                "u32",
324 //                "context"
325 //            ],
326 //            {
327 //                "crc": "0x51077d14"
328 //            }
329 //
330 type MemifDump struct {
331 }
332
333 func (*MemifDump) GetMessageName() string {
334         return "memif_dump"
335 }
336 func (*MemifDump) GetMessageType() api.MessageType {
337         return api.RequestMessage
338 }
339 func (*MemifDump) GetCrcString() string {
340         return "51077d14"
341 }
342 func NewMemifDump() api.Message {
343         return &MemifDump{}
344 }