ce8c9c0d33f99e16b653b52bcdbb51f47cec6987
[govpp.git] / examples / bin_api / memif / memif.ba.go
1 // Code generated by GoVPP binapi-generator. DO NOT EDIT.
2 //  source: memif.api.json
3
4 /*
5  Package memif is a generated from VPP binary API module 'memif'.
6
7  It contains following objects:
8          10 messages
9           5 services
10
11 */
12 package memif
13
14 import "git.fd.io/govpp.git/api"
15 import "github.com/lunixbochs/struc"
16 import "bytes"
17
18 // Reference imports to suppress errors if they are not otherwise used.
19 var _ = api.RegisterMessage
20 var _ = struc.Pack
21 var _ = bytes.NewBuffer
22
23 /* Messages */
24
25 // MemifSocketFilenameAddDel represents the VPP binary API message 'memif_socket_filename_add_del'.
26 //
27 //            "memif_socket_filename_add_del",
28 //            [
29 //                "u16",
30 //                "_vl_msg_id"
31 //            ],
32 //            [
33 //                "u32",
34 //                "client_index"
35 //            ],
36 //            [
37 //                "u32",
38 //                "context"
39 //            ],
40 //            [
41 //                "u8",
42 //                "is_add"
43 //            ],
44 //            [
45 //                "u32",
46 //                "socket_id"
47 //            ],
48 //            [
49 //                "u8",
50 //                "socket_filename",
51 //                128
52 //            ],
53 //            {
54 //                "crc": "0x30e3929d"
55 //            }
56 //
57 type MemifSocketFilenameAddDel struct {
58         IsAdd          uint8
59         SocketID       uint32
60         SocketFilename []byte `struc:"[128]byte"`
61 }
62
63 func (*MemifSocketFilenameAddDel) GetMessageName() string {
64         return "memif_socket_filename_add_del"
65 }
66 func (*MemifSocketFilenameAddDel) GetCrcString() string {
67         return "30e3929d"
68 }
69 func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType {
70         return api.RequestMessage
71 }
72
73 // MemifSocketFilenameAddDelReply represents the VPP binary API message 'memif_socket_filename_add_del_reply'.
74 //
75 //            "memif_socket_filename_add_del_reply",
76 //            [
77 //                "u16",
78 //                "_vl_msg_id"
79 //            ],
80 //            [
81 //                "u32",
82 //                "context"
83 //            ],
84 //            [
85 //                "i32",
86 //                "retval"
87 //            ],
88 //            {
89 //                "crc": "0xe8d4e804"
90 //            }
91 //
92 type MemifSocketFilenameAddDelReply struct {
93         Retval int32
94 }
95
96 func (*MemifSocketFilenameAddDelReply) GetMessageName() string {
97         return "memif_socket_filename_add_del_reply"
98 }
99 func (*MemifSocketFilenameAddDelReply) GetCrcString() string {
100         return "e8d4e804"
101 }
102 func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType {
103         return api.ReplyMessage
104 }
105
106 // MemifCreate represents the VPP binary API message 'memif_create'.
107 //
108 //            "memif_create",
109 //            [
110 //                "u16",
111 //                "_vl_msg_id"
112 //            ],
113 //            [
114 //                "u32",
115 //                "client_index"
116 //            ],
117 //            [
118 //                "u32",
119 //                "context"
120 //            ],
121 //            [
122 //                "u8",
123 //                "role"
124 //            ],
125 //            [
126 //                "u8",
127 //                "mode"
128 //            ],
129 //            [
130 //                "u8",
131 //                "rx_queues"
132 //            ],
133 //            [
134 //                "u8",
135 //                "tx_queues"
136 //            ],
137 //            [
138 //                "u32",
139 //                "id"
140 //            ],
141 //            [
142 //                "u32",
143 //                "socket_id"
144 //            ],
145 //            [
146 //                "u8",
147 //                "secret",
148 //                24
149 //            ],
150 //            [
151 //                "u32",
152 //                "ring_size"
153 //            ],
154 //            [
155 //                "u16",
156 //                "buffer_size"
157 //            ],
158 //            [
159 //                "u8",
160 //                "hw_addr",
161 //                6
162 //            ],
163 //            {
164 //                "crc": "0x6597cdb2"
165 //            }
166 //
167 type MemifCreate struct {
168         Role       uint8
169         Mode       uint8
170         RxQueues   uint8
171         TxQueues   uint8
172         ID         uint32
173         SocketID   uint32
174         Secret     []byte `struc:"[24]byte"`
175         RingSize   uint32
176         BufferSize uint16
177         HwAddr     []byte `struc:"[6]byte"`
178 }
179
180 func (*MemifCreate) GetMessageName() string {
181         return "memif_create"
182 }
183 func (*MemifCreate) GetCrcString() string {
184         return "6597cdb2"
185 }
186 func (*MemifCreate) GetMessageType() api.MessageType {
187         return api.RequestMessage
188 }
189
190 // MemifCreateReply represents the VPP binary API message 'memif_create_reply'.
191 //
192 //            "memif_create_reply",
193 //            [
194 //                "u16",
195 //                "_vl_msg_id"
196 //            ],
197 //            [
198 //                "u32",
199 //                "context"
200 //            ],
201 //            [
202 //                "i32",
203 //                "retval"
204 //            ],
205 //            [
206 //                "u32",
207 //                "sw_if_index"
208 //            ],
209 //            {
210 //                "crc": "0xfda5941f"
211 //            }
212 //
213 type MemifCreateReply struct {
214         Retval    int32
215         SwIfIndex uint32
216 }
217
218 func (*MemifCreateReply) GetMessageName() string {
219         return "memif_create_reply"
220 }
221 func (*MemifCreateReply) GetCrcString() string {
222         return "fda5941f"
223 }
224 func (*MemifCreateReply) GetMessageType() api.MessageType {
225         return api.ReplyMessage
226 }
227
228 // MemifDelete represents the VPP binary API message 'memif_delete'.
229 //
230 //            "memif_delete",
231 //            [
232 //                "u16",
233 //                "_vl_msg_id"
234 //            ],
235 //            [
236 //                "u32",
237 //                "client_index"
238 //            ],
239 //            [
240 //                "u32",
241 //                "context"
242 //            ],
243 //            [
244 //                "u32",
245 //                "sw_if_index"
246 //            ],
247 //            {
248 //                "crc": "0x529cb13f"
249 //            }
250 //
251 type MemifDelete struct {
252         SwIfIndex uint32
253 }
254
255 func (*MemifDelete) GetMessageName() string {
256         return "memif_delete"
257 }
258 func (*MemifDelete) GetCrcString() string {
259         return "529cb13f"
260 }
261 func (*MemifDelete) GetMessageType() api.MessageType {
262         return api.RequestMessage
263 }
264
265 // MemifDeleteReply represents the VPP binary API message 'memif_delete_reply'.
266 //
267 //            "memif_delete_reply",
268 //            [
269 //                "u16",
270 //                "_vl_msg_id"
271 //            ],
272 //            [
273 //                "u32",
274 //                "context"
275 //            ],
276 //            [
277 //                "i32",
278 //                "retval"
279 //            ],
280 //            {
281 //                "crc": "0xe8d4e804"
282 //            }
283 //
284 type MemifDeleteReply struct {
285         Retval int32
286 }
287
288 func (*MemifDeleteReply) GetMessageName() string {
289         return "memif_delete_reply"
290 }
291 func (*MemifDeleteReply) GetCrcString() string {
292         return "e8d4e804"
293 }
294 func (*MemifDeleteReply) GetMessageType() api.MessageType {
295         return api.ReplyMessage
296 }
297
298 // MemifSocketFilenameDetails represents the VPP binary API message 'memif_socket_filename_details'.
299 //
300 //            "memif_socket_filename_details",
301 //            [
302 //                "u16",
303 //                "_vl_msg_id"
304 //            ],
305 //            [
306 //                "u32",
307 //                "context"
308 //            ],
309 //            [
310 //                "u32",
311 //                "socket_id"
312 //            ],
313 //            [
314 //                "u8",
315 //                "socket_filename",
316 //                128
317 //            ],
318 //            {
319 //                "crc": "0xe347e32f"
320 //            }
321 //
322 type MemifSocketFilenameDetails struct {
323         SocketID       uint32
324         SocketFilename []byte `struc:"[128]byte"`
325 }
326
327 func (*MemifSocketFilenameDetails) GetMessageName() string {
328         return "memif_socket_filename_details"
329 }
330 func (*MemifSocketFilenameDetails) GetCrcString() string {
331         return "e347e32f"
332 }
333 func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType {
334         return api.ReplyMessage
335 }
336
337 // MemifSocketFilenameDump represents the VPP binary API message 'memif_socket_filename_dump'.
338 //
339 //            "memif_socket_filename_dump",
340 //            [
341 //                "u16",
342 //                "_vl_msg_id"
343 //            ],
344 //            [
345 //                "u32",
346 //                "client_index"
347 //            ],
348 //            [
349 //                "u32",
350 //                "context"
351 //            ],
352 //            {
353 //                "crc": "0x51077d14"
354 //            }
355 //
356 type MemifSocketFilenameDump struct{}
357
358 func (*MemifSocketFilenameDump) GetMessageName() string {
359         return "memif_socket_filename_dump"
360 }
361 func (*MemifSocketFilenameDump) GetCrcString() string {
362         return "51077d14"
363 }
364 func (*MemifSocketFilenameDump) GetMessageType() api.MessageType {
365         return api.RequestMessage
366 }
367
368 // MemifDetails represents the VPP binary API message 'memif_details'.
369 //
370 //            "memif_details",
371 //            [
372 //                "u16",
373 //                "_vl_msg_id"
374 //            ],
375 //            [
376 //                "u32",
377 //                "context"
378 //            ],
379 //            [
380 //                "u32",
381 //                "sw_if_index"
382 //            ],
383 //            [
384 //                "u8",
385 //                "if_name",
386 //                64
387 //            ],
388 //            [
389 //                "u8",
390 //                "hw_addr",
391 //                6
392 //            ],
393 //            [
394 //                "u32",
395 //                "id"
396 //            ],
397 //            [
398 //                "u8",
399 //                "role"
400 //            ],
401 //            [
402 //                "u8",
403 //                "mode"
404 //            ],
405 //            [
406 //                "u32",
407 //                "socket_id"
408 //            ],
409 //            [
410 //                "u32",
411 //                "ring_size"
412 //            ],
413 //            [
414 //                "u16",
415 //                "buffer_size"
416 //            ],
417 //            [
418 //                "u8",
419 //                "admin_up_down"
420 //            ],
421 //            [
422 //                "u8",
423 //                "link_up_down"
424 //            ],
425 //            {
426 //                "crc": "0x4f5a3397"
427 //            }
428 //
429 type MemifDetails struct {
430         SwIfIndex   uint32
431         IfName      []byte `struc:"[64]byte"`
432         HwAddr      []byte `struc:"[6]byte"`
433         ID          uint32
434         Role        uint8
435         Mode        uint8
436         SocketID    uint32
437         RingSize    uint32
438         BufferSize  uint16
439         AdminUpDown uint8
440         LinkUpDown  uint8
441 }
442
443 func (*MemifDetails) GetMessageName() string {
444         return "memif_details"
445 }
446 func (*MemifDetails) GetCrcString() string {
447         return "4f5a3397"
448 }
449 func (*MemifDetails) GetMessageType() api.MessageType {
450         return api.ReplyMessage
451 }
452
453 // MemifDump represents the VPP binary API message 'memif_dump'.
454 //
455 //            "memif_dump",
456 //            [
457 //                "u16",
458 //                "_vl_msg_id"
459 //            ],
460 //            [
461 //                "u32",
462 //                "client_index"
463 //            ],
464 //            [
465 //                "u32",
466 //                "context"
467 //            ],
468 //            {
469 //                "crc": "0x51077d14"
470 //            }
471 //
472 type MemifDump struct{}
473
474 func (*MemifDump) GetMessageName() string {
475         return "memif_dump"
476 }
477 func (*MemifDump) GetCrcString() string {
478         return "51077d14"
479 }
480 func (*MemifDump) GetMessageType() api.MessageType {
481         return api.RequestMessage
482 }
483
484 /* Services */
485
486 type Services interface {
487         DumpMemif(*MemifDump) (*MemifDetails, error)
488         DumpMemifSocketFilename(*MemifSocketFilenameDump) (*MemifSocketFilenameDetails, error)
489         MemifCreate(*MemifCreate) (*MemifCreateReply, error)
490         MemifDelete(*MemifDelete) (*MemifDeleteReply, error)
491         MemifSocketFilenameAddDel(*MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error)
492 }
493
494 func init() {
495         api.RegisterMessage((*MemifSocketFilenameAddDel)(nil), "memif.MemifSocketFilenameAddDel")
496         api.RegisterMessage((*MemifSocketFilenameAddDelReply)(nil), "memif.MemifSocketFilenameAddDelReply")
497         api.RegisterMessage((*MemifCreate)(nil), "memif.MemifCreate")
498         api.RegisterMessage((*MemifCreateReply)(nil), "memif.MemifCreateReply")
499         api.RegisterMessage((*MemifDelete)(nil), "memif.MemifDelete")
500         api.RegisterMessage((*MemifDeleteReply)(nil), "memif.MemifDeleteReply")
501         api.RegisterMessage((*MemifSocketFilenameDetails)(nil), "memif.MemifSocketFilenameDetails")
502         api.RegisterMessage((*MemifSocketFilenameDump)(nil), "memif.MemifSocketFilenameDump")
503         api.RegisterMessage((*MemifDetails)(nil), "memif.MemifDetails")
504         api.RegisterMessage((*MemifDump)(nil), "memif.MemifDump")
505 }