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