48925ac2abb71f700bef4da8b1df48fb0a75cd4a
[govpp.git] / examples / bin_api / vpe / vpe.ba.go
1 // Code generated by GoVPP binapi-generator. DO NOT EDIT.
2 //  source: vpe.api.json
3
4 /*
5  Package vpe is a generated from VPP binary API module 'vpe'.
6
7  It contains following objects:
8          18 messages
9           1 type
10           9 services
11
12 */
13 package vpe
14
15 import "git.fd.io/govpp.git/api"
16 import "github.com/lunixbochs/struc"
17 import "bytes"
18
19 // Reference imports to suppress errors if they are not otherwise used.
20 var _ = api.RegisterMessage
21 var _ = struc.Pack
22 var _ = bytes.NewBuffer
23
24 // Services represents VPP binary API services:
25 //
26 //      "services": {
27 //          "cli_inband": {
28 //              "reply": "cli_inband_reply"
29 //          },
30 //          "get_node_index": {
31 //              "reply": "get_node_index_reply"
32 //          },
33 //          "cli": {
34 //              "reply": "cli_reply"
35 //          },
36 //          "show_version": {
37 //              "reply": "show_version_reply"
38 //          },
39 //          "get_node_graph": {
40 //              "reply": "get_node_graph_reply"
41 //          },
42 //          "get_next_index": {
43 //              "reply": "get_next_index_reply"
44 //          },
45 //          "show_threads": {
46 //              "reply": "show_threads_reply"
47 //          },
48 //          "add_node_next": {
49 //              "reply": "add_node_next_reply"
50 //          },
51 //          "control_ping": {
52 //              "reply": "control_ping_reply"
53 //          }
54 //      },
55 //
56 type Services interface {
57         AddNodeNext(*AddNodeNext) (*AddNodeNextReply, error)
58         Cli(*Cli) (*CliReply, error)
59         CliInband(*CliInband) (*CliInbandReply, error)
60         ControlPing(*ControlPing) (*ControlPingReply, error)
61         GetNextIndex(*GetNextIndex) (*GetNextIndexReply, error)
62         GetNodeGraph(*GetNodeGraph) (*GetNodeGraphReply, error)
63         GetNodeIndex(*GetNodeIndex) (*GetNodeIndexReply, error)
64         ShowThreads(*ShowThreads) (*ShowThreadsReply, error)
65         ShowVersion(*ShowVersion) (*ShowVersionReply, error)
66 }
67
68 /* Types */
69
70 // ThreadData represents VPP binary API type 'thread_data':
71 //
72 //      "thread_data",
73 //      0,
74 //      "count"
75 //
76 type ThreadData struct {
77         ID        uint32
78         Name      []byte `struc:"[64]byte"`
79         Type      []byte `struc:"[64]byte"`
80         PID       uint32
81         CPUID     uint32
82         Core      uint32
83         CPUSocket uint32
84 }
85
86 func (*ThreadData) GetTypeName() string {
87         return "thread_data"
88 }
89 func (*ThreadData) GetCrcString() string {
90         return "0f57094e"
91 }
92
93 /* Messages */
94
95 // ControlPing represents VPP binary API message 'control_ping':
96 //
97 //      "control_ping",
98 //      [
99 //          "u16",
100 //          "_vl_msg_id"
101 //      ],
102 //      [
103 //          "u32",
104 //          "client_index"
105 //      ],
106 //      [
107 //          "u32",
108 //          "context"
109 //      ],
110 //      {
111 //          "crc": "0x51077d14"
112 //      }
113 //
114 type ControlPing struct{}
115
116 func (*ControlPing) GetMessageName() string {
117         return "control_ping"
118 }
119 func (*ControlPing) GetCrcString() string {
120         return "51077d14"
121 }
122 func (*ControlPing) GetMessageType() api.MessageType {
123         return api.RequestMessage
124 }
125
126 // ControlPingReply represents VPP binary API message 'control_ping_reply':
127 //
128 //      "control_ping_reply",
129 //      [
130 //          "u16",
131 //          "_vl_msg_id"
132 //      ],
133 //      [
134 //          "u32",
135 //          "context"
136 //      ],
137 //      [
138 //          "i32",
139 //          "retval"
140 //      ],
141 //      [
142 //          "u32",
143 //          "client_index"
144 //      ],
145 //      [
146 //          "u32",
147 //          "vpe_pid"
148 //      ],
149 //      {
150 //          "crc": "0xf6b0b8ca"
151 //      }
152 //
153 type ControlPingReply struct {
154         Retval      int32
155         ClientIndex uint32
156         VpePID      uint32
157 }
158
159 func (*ControlPingReply) GetMessageName() string {
160         return "control_ping_reply"
161 }
162 func (*ControlPingReply) GetCrcString() string {
163         return "f6b0b8ca"
164 }
165 func (*ControlPingReply) GetMessageType() api.MessageType {
166         return api.ReplyMessage
167 }
168
169 // Cli represents VPP binary API message 'cli':
170 //
171 //      "cli",
172 //      [
173 //          "u16",
174 //          "_vl_msg_id"
175 //      ],
176 //      [
177 //          "u32",
178 //          "client_index"
179 //      ],
180 //      [
181 //          "u32",
182 //          "context"
183 //      ],
184 //      [
185 //          "u64",
186 //          "cmd_in_shmem"
187 //      ],
188 //      {
189 //          "crc": "0x23bfbfff"
190 //      }
191 //
192 type Cli struct {
193         CmdInShmem uint64
194 }
195
196 func (*Cli) GetMessageName() string {
197         return "cli"
198 }
199 func (*Cli) GetCrcString() string {
200         return "23bfbfff"
201 }
202 func (*Cli) GetMessageType() api.MessageType {
203         return api.RequestMessage
204 }
205
206 // CliInband represents VPP binary API message 'cli_inband':
207 //
208 //      "cli_inband",
209 //      [
210 //          "u16",
211 //          "_vl_msg_id"
212 //      ],
213 //      [
214 //          "u32",
215 //          "client_index"
216 //      ],
217 //      [
218 //          "u32",
219 //          "context"
220 //      ],
221 //      [
222 //          "u32",
223 //          "length"
224 //      ],
225 //      [
226 //          "u8",
227 //          "cmd",
228 //          0,
229 //          "length"
230 //      ],
231 //      {
232 //          "crc": "0x74e00a49"
233 //      }
234 //
235 type CliInband struct {
236         Length uint32 `struc:"sizeof=Cmd"`
237         Cmd    []byte
238 }
239
240 func (*CliInband) GetMessageName() string {
241         return "cli_inband"
242 }
243 func (*CliInband) GetCrcString() string {
244         return "74e00a49"
245 }
246 func (*CliInband) GetMessageType() api.MessageType {
247         return api.RequestMessage
248 }
249
250 // CliReply represents VPP binary API message 'cli_reply':
251 //
252 //      "cli_reply",
253 //      [
254 //          "u16",
255 //          "_vl_msg_id"
256 //      ],
257 //      [
258 //          "u32",
259 //          "context"
260 //      ],
261 //      [
262 //          "i32",
263 //          "retval"
264 //      ],
265 //      [
266 //          "u64",
267 //          "reply_in_shmem"
268 //      ],
269 //      {
270 //          "crc": "0x06d68297"
271 //      }
272 //
273 type CliReply struct {
274         Retval       int32
275         ReplyInShmem uint64
276 }
277
278 func (*CliReply) GetMessageName() string {
279         return "cli_reply"
280 }
281 func (*CliReply) GetCrcString() string {
282         return "06d68297"
283 }
284 func (*CliReply) GetMessageType() api.MessageType {
285         return api.ReplyMessage
286 }
287
288 // CliInbandReply represents VPP binary API message 'cli_inband_reply':
289 //
290 //      "cli_inband_reply",
291 //      [
292 //          "u16",
293 //          "_vl_msg_id"
294 //      ],
295 //      [
296 //          "u32",
297 //          "context"
298 //      ],
299 //      [
300 //          "i32",
301 //          "retval"
302 //      ],
303 //      [
304 //          "u32",
305 //          "length"
306 //      ],
307 //      [
308 //          "u8",
309 //          "reply",
310 //          0,
311 //          "length"
312 //      ],
313 //      {
314 //          "crc": "0x1f22bbb8"
315 //      }
316 //
317 type CliInbandReply struct {
318         Retval int32
319         Length uint32 `struc:"sizeof=Reply"`
320         Reply  []byte
321 }
322
323 func (*CliInbandReply) GetMessageName() string {
324         return "cli_inband_reply"
325 }
326 func (*CliInbandReply) GetCrcString() string {
327         return "1f22bbb8"
328 }
329 func (*CliInbandReply) GetMessageType() api.MessageType {
330         return api.ReplyMessage
331 }
332
333 // GetNodeIndex represents VPP binary API message 'get_node_index':
334 //
335 //      "get_node_index",
336 //      [
337 //          "u16",
338 //          "_vl_msg_id"
339 //      ],
340 //      [
341 //          "u32",
342 //          "client_index"
343 //      ],
344 //      [
345 //          "u32",
346 //          "context"
347 //      ],
348 //      [
349 //          "u8",
350 //          "node_name",
351 //          64
352 //      ],
353 //      {
354 //          "crc": "0x6c9a495d"
355 //      }
356 //
357 type GetNodeIndex struct {
358         NodeName []byte `struc:"[64]byte"`
359 }
360
361 func (*GetNodeIndex) GetMessageName() string {
362         return "get_node_index"
363 }
364 func (*GetNodeIndex) GetCrcString() string {
365         return "6c9a495d"
366 }
367 func (*GetNodeIndex) GetMessageType() api.MessageType {
368         return api.RequestMessage
369 }
370
371 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply':
372 //
373 //      "get_node_index_reply",
374 //      [
375 //          "u16",
376 //          "_vl_msg_id"
377 //      ],
378 //      [
379 //          "u32",
380 //          "context"
381 //      ],
382 //      [
383 //          "i32",
384 //          "retval"
385 //      ],
386 //      [
387 //          "u32",
388 //          "node_index"
389 //      ],
390 //      {
391 //          "crc": "0xa8600b89"
392 //      }
393 //
394 type GetNodeIndexReply struct {
395         Retval    int32
396         NodeIndex uint32
397 }
398
399 func (*GetNodeIndexReply) GetMessageName() string {
400         return "get_node_index_reply"
401 }
402 func (*GetNodeIndexReply) GetCrcString() string {
403         return "a8600b89"
404 }
405 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
406         return api.ReplyMessage
407 }
408
409 // AddNodeNext represents VPP binary API message 'add_node_next':
410 //
411 //      "add_node_next",
412 //      [
413 //          "u16",
414 //          "_vl_msg_id"
415 //      ],
416 //      [
417 //          "u32",
418 //          "client_index"
419 //      ],
420 //      [
421 //          "u32",
422 //          "context"
423 //      ],
424 //      [
425 //          "u8",
426 //          "node_name",
427 //          64
428 //      ],
429 //      [
430 //          "u8",
431 //          "next_name",
432 //          64
433 //      ],
434 //      {
435 //          "crc": "0x9ab92f7a"
436 //      }
437 //
438 type AddNodeNext struct {
439         NodeName []byte `struc:"[64]byte"`
440         NextName []byte `struc:"[64]byte"`
441 }
442
443 func (*AddNodeNext) GetMessageName() string {
444         return "add_node_next"
445 }
446 func (*AddNodeNext) GetCrcString() string {
447         return "9ab92f7a"
448 }
449 func (*AddNodeNext) GetMessageType() api.MessageType {
450         return api.RequestMessage
451 }
452
453 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply':
454 //
455 //      "add_node_next_reply",
456 //      [
457 //          "u16",
458 //          "_vl_msg_id"
459 //      ],
460 //      [
461 //          "u32",
462 //          "context"
463 //      ],
464 //      [
465 //          "i32",
466 //          "retval"
467 //      ],
468 //      [
469 //          "u32",
470 //          "next_index"
471 //      ],
472 //      {
473 //          "crc": "0x2ed75f32"
474 //      }
475 //
476 type AddNodeNextReply struct {
477         Retval    int32
478         NextIndex uint32
479 }
480
481 func (*AddNodeNextReply) GetMessageName() string {
482         return "add_node_next_reply"
483 }
484 func (*AddNodeNextReply) GetCrcString() string {
485         return "2ed75f32"
486 }
487 func (*AddNodeNextReply) GetMessageType() api.MessageType {
488         return api.ReplyMessage
489 }
490
491 // ShowVersion represents VPP binary API message 'show_version':
492 //
493 //      "show_version",
494 //      [
495 //          "u16",
496 //          "_vl_msg_id"
497 //      ],
498 //      [
499 //          "u32",
500 //          "client_index"
501 //      ],
502 //      [
503 //          "u32",
504 //          "context"
505 //      ],
506 //      {
507 //          "crc": "0x51077d14"
508 //      }
509 //
510 type ShowVersion struct{}
511
512 func (*ShowVersion) GetMessageName() string {
513         return "show_version"
514 }
515 func (*ShowVersion) GetCrcString() string {
516         return "51077d14"
517 }
518 func (*ShowVersion) GetMessageType() api.MessageType {
519         return api.RequestMessage
520 }
521
522 // ShowVersionReply represents VPP binary API message 'show_version_reply':
523 //
524 //      "show_version_reply",
525 //      [
526 //          "u16",
527 //          "_vl_msg_id"
528 //      ],
529 //      [
530 //          "u32",
531 //          "context"
532 //      ],
533 //      [
534 //          "i32",
535 //          "retval"
536 //      ],
537 //      [
538 //          "u8",
539 //          "program",
540 //          32
541 //      ],
542 //      [
543 //          "u8",
544 //          "version",
545 //          32
546 //      ],
547 //      [
548 //          "u8",
549 //          "build_date",
550 //          32
551 //      ],
552 //      [
553 //          "u8",
554 //          "build_directory",
555 //          256
556 //      ],
557 //      {
558 //          "crc": "0x8b5a13b4"
559 //      }
560 //
561 type ShowVersionReply struct {
562         Retval         int32
563         Program        []byte `struc:"[32]byte"`
564         Version        []byte `struc:"[32]byte"`
565         BuildDate      []byte `struc:"[32]byte"`
566         BuildDirectory []byte `struc:"[256]byte"`
567 }
568
569 func (*ShowVersionReply) GetMessageName() string {
570         return "show_version_reply"
571 }
572 func (*ShowVersionReply) GetCrcString() string {
573         return "8b5a13b4"
574 }
575 func (*ShowVersionReply) GetMessageType() api.MessageType {
576         return api.ReplyMessage
577 }
578
579 // ShowThreads represents VPP binary API message 'show_threads':
580 //
581 //      "show_threads",
582 //      [
583 //          "u16",
584 //          "_vl_msg_id"
585 //      ],
586 //      [
587 //          "u32",
588 //          "client_index"
589 //      ],
590 //      [
591 //          "u32",
592 //          "context"
593 //      ],
594 //      {
595 //          "crc": "0x51077d14"
596 //      }
597 //
598 type ShowThreads struct{}
599
600 func (*ShowThreads) GetMessageName() string {
601         return "show_threads"
602 }
603 func (*ShowThreads) GetCrcString() string {
604         return "51077d14"
605 }
606 func (*ShowThreads) GetMessageType() api.MessageType {
607         return api.RequestMessage
608 }
609
610 // ShowThreadsReply represents VPP binary API message 'show_threads_reply':
611 //
612 //      "show_threads_reply",
613 //      [
614 //          "u16",
615 //          "_vl_msg_id"
616 //      ],
617 //      [
618 //          "u32",
619 //          "context"
620 //      ],
621 //      [
622 //          "i32",
623 //          "retval"
624 //      ],
625 //      [
626 //          "u32",
627 //          "count"
628 //      ],
629 //      [
630 //          "vl_api_thread_data_t",
631 //          "thread_data",
632 //          0,
633 //          "count"
634 //      ],
635 //      {
636 //          "crc": "0x6942fb35"
637 //      }
638 //
639 type ShowThreadsReply struct {
640         Retval     int32
641         Count      uint32 `struc:"sizeof=ThreadData"`
642         ThreadData []ThreadData
643 }
644
645 func (*ShowThreadsReply) GetMessageName() string {
646         return "show_threads_reply"
647 }
648 func (*ShowThreadsReply) GetCrcString() string {
649         return "6942fb35"
650 }
651 func (*ShowThreadsReply) GetMessageType() api.MessageType {
652         return api.ReplyMessage
653 }
654
655 // GetNodeGraph represents VPP binary API message 'get_node_graph':
656 //
657 //      "get_node_graph",
658 //      [
659 //          "u16",
660 //          "_vl_msg_id"
661 //      ],
662 //      [
663 //          "u32",
664 //          "client_index"
665 //      ],
666 //      [
667 //          "u32",
668 //          "context"
669 //      ],
670 //      {
671 //          "crc": "0x51077d14"
672 //      }
673 //
674 type GetNodeGraph struct{}
675
676 func (*GetNodeGraph) GetMessageName() string {
677         return "get_node_graph"
678 }
679 func (*GetNodeGraph) GetCrcString() string {
680         return "51077d14"
681 }
682 func (*GetNodeGraph) GetMessageType() api.MessageType {
683         return api.RequestMessage
684 }
685
686 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply':
687 //
688 //      "get_node_graph_reply",
689 //      [
690 //          "u16",
691 //          "_vl_msg_id"
692 //      ],
693 //      [
694 //          "u32",
695 //          "context"
696 //      ],
697 //      [
698 //          "i32",
699 //          "retval"
700 //      ],
701 //      [
702 //          "u64",
703 //          "reply_in_shmem"
704 //      ],
705 //      {
706 //          "crc": "0x06d68297"
707 //      }
708 //
709 type GetNodeGraphReply struct {
710         Retval       int32
711         ReplyInShmem uint64
712 }
713
714 func (*GetNodeGraphReply) GetMessageName() string {
715         return "get_node_graph_reply"
716 }
717 func (*GetNodeGraphReply) GetCrcString() string {
718         return "06d68297"
719 }
720 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
721         return api.ReplyMessage
722 }
723
724 // GetNextIndex represents VPP binary API message 'get_next_index':
725 //
726 //      "get_next_index",
727 //      [
728 //          "u16",
729 //          "_vl_msg_id"
730 //      ],
731 //      [
732 //          "u32",
733 //          "client_index"
734 //      ],
735 //      [
736 //          "u32",
737 //          "context"
738 //      ],
739 //      [
740 //          "u8",
741 //          "node_name",
742 //          64
743 //      ],
744 //      [
745 //          "u8",
746 //          "next_name",
747 //          64
748 //      ],
749 //      {
750 //          "crc": "0x9ab92f7a"
751 //      }
752 //
753 type GetNextIndex struct {
754         NodeName []byte `struc:"[64]byte"`
755         NextName []byte `struc:"[64]byte"`
756 }
757
758 func (*GetNextIndex) GetMessageName() string {
759         return "get_next_index"
760 }
761 func (*GetNextIndex) GetCrcString() string {
762         return "9ab92f7a"
763 }
764 func (*GetNextIndex) GetMessageType() api.MessageType {
765         return api.RequestMessage
766 }
767
768 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply':
769 //
770 //      "get_next_index_reply",
771 //      [
772 //          "u16",
773 //          "_vl_msg_id"
774 //      ],
775 //      [
776 //          "u32",
777 //          "context"
778 //      ],
779 //      [
780 //          "i32",
781 //          "retval"
782 //      ],
783 //      [
784 //          "u32",
785 //          "next_index"
786 //      ],
787 //      {
788 //          "crc": "0x2ed75f32"
789 //      }
790 //
791 type GetNextIndexReply struct {
792         Retval    int32
793         NextIndex uint32
794 }
795
796 func (*GetNextIndexReply) GetMessageName() string {
797         return "get_next_index_reply"
798 }
799 func (*GetNextIndexReply) GetCrcString() string {
800         return "2ed75f32"
801 }
802 func (*GetNextIndexReply) GetMessageType() api.MessageType {
803         return api.ReplyMessage
804 }
805
806 func init() {
807         api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
808         api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
809         api.RegisterMessage((*Cli)(nil), "vpe.Cli")
810         api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
811         api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
812         api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
813         api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
814         api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
815         api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
816         api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
817         api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
818         api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
819         api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
820         api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
821         api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
822         api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
823         api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
824         api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
825 }