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