e0d5f975eed1fb3e03cf4f66ed2375c7741ecd3f
[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 //          "string",
223 //          "cmd"
224 //      ],
225 //      {
226 //          "crc": "0xb1ad59b3"
227 //      }
228 //
229 type CliInband struct {
230         XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
231         Cmd        string
232 }
233
234 func (*CliInband) GetMessageName() string {
235         return "cli_inband"
236 }
237 func (*CliInband) GetCrcString() string {
238         return "b1ad59b3"
239 }
240 func (*CliInband) GetMessageType() api.MessageType {
241         return api.RequestMessage
242 }
243
244 // CliReply represents VPP binary API message 'cli_reply':
245 //
246 //      "cli_reply",
247 //      [
248 //          "u16",
249 //          "_vl_msg_id"
250 //      ],
251 //      [
252 //          "u32",
253 //          "context"
254 //      ],
255 //      [
256 //          "i32",
257 //          "retval"
258 //      ],
259 //      [
260 //          "u64",
261 //          "reply_in_shmem"
262 //      ],
263 //      {
264 //          "crc": "0x06d68297"
265 //      }
266 //
267 type CliReply struct {
268         Retval       int32
269         ReplyInShmem uint64
270 }
271
272 func (*CliReply) GetMessageName() string {
273         return "cli_reply"
274 }
275 func (*CliReply) GetCrcString() string {
276         return "06d68297"
277 }
278 func (*CliReply) GetMessageType() api.MessageType {
279         return api.ReplyMessage
280 }
281
282 // CliInbandReply represents VPP binary API message 'cli_inband_reply':
283 //
284 //      "cli_inband_reply",
285 //      [
286 //          "u16",
287 //          "_vl_msg_id"
288 //      ],
289 //      [
290 //          "u32",
291 //          "context"
292 //      ],
293 //      [
294 //          "i32",
295 //          "retval"
296 //      ],
297 //      [
298 //          "string",
299 //          "reply"
300 //      ],
301 //      {
302 //          "crc": "0x6d3c80a4"
303 //      }
304 //
305 type CliInbandReply struct {
306         Retval       int32
307         XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
308         Reply        string
309 }
310
311 func (*CliInbandReply) GetMessageName() string {
312         return "cli_inband_reply"
313 }
314 func (*CliInbandReply) GetCrcString() string {
315         return "6d3c80a4"
316 }
317 func (*CliInbandReply) GetMessageType() api.MessageType {
318         return api.ReplyMessage
319 }
320
321 // GetNodeIndex represents VPP binary API message 'get_node_index':
322 //
323 //      "get_node_index",
324 //      [
325 //          "u16",
326 //          "_vl_msg_id"
327 //      ],
328 //      [
329 //          "u32",
330 //          "client_index"
331 //      ],
332 //      [
333 //          "u32",
334 //          "context"
335 //      ],
336 //      [
337 //          "u8",
338 //          "node_name",
339 //          64
340 //      ],
341 //      {
342 //          "crc": "0x6c9a495d"
343 //      }
344 //
345 type GetNodeIndex struct {
346         NodeName []byte `struc:"[64]byte"`
347 }
348
349 func (*GetNodeIndex) GetMessageName() string {
350         return "get_node_index"
351 }
352 func (*GetNodeIndex) GetCrcString() string {
353         return "6c9a495d"
354 }
355 func (*GetNodeIndex) GetMessageType() api.MessageType {
356         return api.RequestMessage
357 }
358
359 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply':
360 //
361 //      "get_node_index_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 //          "node_index"
377 //      ],
378 //      {
379 //          "crc": "0xa8600b89"
380 //      }
381 //
382 type GetNodeIndexReply struct {
383         Retval    int32
384         NodeIndex uint32
385 }
386
387 func (*GetNodeIndexReply) GetMessageName() string {
388         return "get_node_index_reply"
389 }
390 func (*GetNodeIndexReply) GetCrcString() string {
391         return "a8600b89"
392 }
393 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
394         return api.ReplyMessage
395 }
396
397 // AddNodeNext represents VPP binary API message 'add_node_next':
398 //
399 //      "add_node_next",
400 //      [
401 //          "u16",
402 //          "_vl_msg_id"
403 //      ],
404 //      [
405 //          "u32",
406 //          "client_index"
407 //      ],
408 //      [
409 //          "u32",
410 //          "context"
411 //      ],
412 //      [
413 //          "u8",
414 //          "node_name",
415 //          64
416 //      ],
417 //      [
418 //          "u8",
419 //          "next_name",
420 //          64
421 //      ],
422 //      {
423 //          "crc": "0x9ab92f7a"
424 //      }
425 //
426 type AddNodeNext struct {
427         NodeName []byte `struc:"[64]byte"`
428         NextName []byte `struc:"[64]byte"`
429 }
430
431 func (*AddNodeNext) GetMessageName() string {
432         return "add_node_next"
433 }
434 func (*AddNodeNext) GetCrcString() string {
435         return "9ab92f7a"
436 }
437 func (*AddNodeNext) GetMessageType() api.MessageType {
438         return api.RequestMessage
439 }
440
441 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply':
442 //
443 //      "add_node_next_reply",
444 //      [
445 //          "u16",
446 //          "_vl_msg_id"
447 //      ],
448 //      [
449 //          "u32",
450 //          "context"
451 //      ],
452 //      [
453 //          "i32",
454 //          "retval"
455 //      ],
456 //      [
457 //          "u32",
458 //          "next_index"
459 //      ],
460 //      {
461 //          "crc": "0x2ed75f32"
462 //      }
463 //
464 type AddNodeNextReply struct {
465         Retval    int32
466         NextIndex uint32
467 }
468
469 func (*AddNodeNextReply) GetMessageName() string {
470         return "add_node_next_reply"
471 }
472 func (*AddNodeNextReply) GetCrcString() string {
473         return "2ed75f32"
474 }
475 func (*AddNodeNextReply) GetMessageType() api.MessageType {
476         return api.ReplyMessage
477 }
478
479 // ShowVersion represents VPP binary API message 'show_version':
480 //
481 //      "show_version",
482 //      [
483 //          "u16",
484 //          "_vl_msg_id"
485 //      ],
486 //      [
487 //          "u32",
488 //          "client_index"
489 //      ],
490 //      [
491 //          "u32",
492 //          "context"
493 //      ],
494 //      {
495 //          "crc": "0x51077d14"
496 //      }
497 //
498 type ShowVersion struct{}
499
500 func (*ShowVersion) GetMessageName() string {
501         return "show_version"
502 }
503 func (*ShowVersion) GetCrcString() string {
504         return "51077d14"
505 }
506 func (*ShowVersion) GetMessageType() api.MessageType {
507         return api.RequestMessage
508 }
509
510 // ShowVersionReply represents VPP binary API message 'show_version_reply':
511 //
512 //      "show_version_reply",
513 //      [
514 //          "u16",
515 //          "_vl_msg_id"
516 //      ],
517 //      [
518 //          "u32",
519 //          "context"
520 //      ],
521 //      [
522 //          "i32",
523 //          "retval"
524 //      ],
525 //      [
526 //          "string",
527 //          "program"
528 //      ],
529 //      [
530 //          "string",
531 //          "version"
532 //      ],
533 //      [
534 //          "string",
535 //          "build_date"
536 //      ],
537 //      [
538 //          "string",
539 //          "build_directory"
540 //      ],
541 //      {
542 //          "crc": "0xb9bcf6df"
543 //      }
544 //
545 type ShowVersionReply struct {
546         Retval                int32
547         XXX_ProgramLen        uint32 `struc:"sizeof=Program"`
548         Program               string
549         XXX_VersionLen        uint32 `struc:"sizeof=Version"`
550         Version               string
551         XXX_BuildDateLen      uint32 `struc:"sizeof=BuildDate"`
552         BuildDate             string
553         XXX_BuildDirectoryLen uint32 `struc:"sizeof=BuildDirectory"`
554         BuildDirectory        string
555 }
556
557 func (*ShowVersionReply) GetMessageName() string {
558         return "show_version_reply"
559 }
560 func (*ShowVersionReply) GetCrcString() string {
561         return "b9bcf6df"
562 }
563 func (*ShowVersionReply) GetMessageType() api.MessageType {
564         return api.ReplyMessage
565 }
566
567 // ShowThreads represents VPP binary API message 'show_threads':
568 //
569 //      "show_threads",
570 //      [
571 //          "u16",
572 //          "_vl_msg_id"
573 //      ],
574 //      [
575 //          "u32",
576 //          "client_index"
577 //      ],
578 //      [
579 //          "u32",
580 //          "context"
581 //      ],
582 //      {
583 //          "crc": "0x51077d14"
584 //      }
585 //
586 type ShowThreads struct{}
587
588 func (*ShowThreads) GetMessageName() string {
589         return "show_threads"
590 }
591 func (*ShowThreads) GetCrcString() string {
592         return "51077d14"
593 }
594 func (*ShowThreads) GetMessageType() api.MessageType {
595         return api.RequestMessage
596 }
597
598 // ShowThreadsReply represents VPP binary API message 'show_threads_reply':
599 //
600 //      "show_threads_reply",
601 //      [
602 //          "u16",
603 //          "_vl_msg_id"
604 //      ],
605 //      [
606 //          "u32",
607 //          "context"
608 //      ],
609 //      [
610 //          "i32",
611 //          "retval"
612 //      ],
613 //      [
614 //          "u32",
615 //          "count"
616 //      ],
617 //      [
618 //          "vl_api_thread_data_t",
619 //          "thread_data",
620 //          0,
621 //          "count"
622 //      ],
623 //      {
624 //          "crc": "0x6942fb35"
625 //      }
626 //
627 type ShowThreadsReply struct {
628         Retval     int32
629         Count      uint32 `struc:"sizeof=ThreadData"`
630         ThreadData []ThreadData
631 }
632
633 func (*ShowThreadsReply) GetMessageName() string {
634         return "show_threads_reply"
635 }
636 func (*ShowThreadsReply) GetCrcString() string {
637         return "6942fb35"
638 }
639 func (*ShowThreadsReply) GetMessageType() api.MessageType {
640         return api.ReplyMessage
641 }
642
643 // GetNodeGraph represents VPP binary API message 'get_node_graph':
644 //
645 //      "get_node_graph",
646 //      [
647 //          "u16",
648 //          "_vl_msg_id"
649 //      ],
650 //      [
651 //          "u32",
652 //          "client_index"
653 //      ],
654 //      [
655 //          "u32",
656 //          "context"
657 //      ],
658 //      {
659 //          "crc": "0x51077d14"
660 //      }
661 //
662 type GetNodeGraph struct{}
663
664 func (*GetNodeGraph) GetMessageName() string {
665         return "get_node_graph"
666 }
667 func (*GetNodeGraph) GetCrcString() string {
668         return "51077d14"
669 }
670 func (*GetNodeGraph) GetMessageType() api.MessageType {
671         return api.RequestMessage
672 }
673
674 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply':
675 //
676 //      "get_node_graph_reply",
677 //      [
678 //          "u16",
679 //          "_vl_msg_id"
680 //      ],
681 //      [
682 //          "u32",
683 //          "context"
684 //      ],
685 //      [
686 //          "i32",
687 //          "retval"
688 //      ],
689 //      [
690 //          "u64",
691 //          "reply_in_shmem"
692 //      ],
693 //      {
694 //          "crc": "0x06d68297"
695 //      }
696 //
697 type GetNodeGraphReply struct {
698         Retval       int32
699         ReplyInShmem uint64
700 }
701
702 func (*GetNodeGraphReply) GetMessageName() string {
703         return "get_node_graph_reply"
704 }
705 func (*GetNodeGraphReply) GetCrcString() string {
706         return "06d68297"
707 }
708 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
709         return api.ReplyMessage
710 }
711
712 // GetNextIndex represents VPP binary API message 'get_next_index':
713 //
714 //      "get_next_index",
715 //      [
716 //          "u16",
717 //          "_vl_msg_id"
718 //      ],
719 //      [
720 //          "u32",
721 //          "client_index"
722 //      ],
723 //      [
724 //          "u32",
725 //          "context"
726 //      ],
727 //      [
728 //          "u8",
729 //          "node_name",
730 //          64
731 //      ],
732 //      [
733 //          "u8",
734 //          "next_name",
735 //          64
736 //      ],
737 //      {
738 //          "crc": "0x9ab92f7a"
739 //      }
740 //
741 type GetNextIndex struct {
742         NodeName []byte `struc:"[64]byte"`
743         NextName []byte `struc:"[64]byte"`
744 }
745
746 func (*GetNextIndex) GetMessageName() string {
747         return "get_next_index"
748 }
749 func (*GetNextIndex) GetCrcString() string {
750         return "9ab92f7a"
751 }
752 func (*GetNextIndex) GetMessageType() api.MessageType {
753         return api.RequestMessage
754 }
755
756 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply':
757 //
758 //      "get_next_index_reply",
759 //      [
760 //          "u16",
761 //          "_vl_msg_id"
762 //      ],
763 //      [
764 //          "u32",
765 //          "context"
766 //      ],
767 //      [
768 //          "i32",
769 //          "retval"
770 //      ],
771 //      [
772 //          "u32",
773 //          "next_index"
774 //      ],
775 //      {
776 //          "crc": "0x2ed75f32"
777 //      }
778 //
779 type GetNextIndexReply struct {
780         Retval    int32
781         NextIndex uint32
782 }
783
784 func (*GetNextIndexReply) GetMessageName() string {
785         return "get_next_index_reply"
786 }
787 func (*GetNextIndexReply) GetCrcString() string {
788         return "2ed75f32"
789 }
790 func (*GetNextIndexReply) GetMessageType() api.MessageType {
791         return api.ReplyMessage
792 }
793
794 func init() {
795         api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
796         api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
797         api.RegisterMessage((*Cli)(nil), "vpe.Cli")
798         api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
799         api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
800         api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
801         api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
802         api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
803         api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
804         api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
805         api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
806         api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
807         api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
808         api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
809         api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
810         api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
811         api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
812         api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
813 }