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