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