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