1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // source: /usr/share/vpp/api/core/vpe.api.json
5 Package vpe is a generated VPP binary API for 'vpe' module.
19 api "git.fd.io/govpp.git/api"
20 struc "github.com/lunixbochs/struc"
26 // ModuleName is the name of this module.
28 // APIVersion is the API version of this module.
30 // VersionCrc is the CRC of this module.
31 VersionCrc = 0x1bf55581
34 // LogLevel represents VPP binary API enum 'log_level'.
38 VPE_API_LOG_LEVEL_EMERG LogLevel = 0
39 VPE_API_LOG_LEVEL_ALERT LogLevel = 1
40 VPE_API_LOG_LEVEL_CRIT LogLevel = 2
41 VPE_API_LOG_LEVEL_ERR LogLevel = 3
42 VPE_API_LOG_LEVEL_WARNING LogLevel = 4
43 VPE_API_LOG_LEVEL_NOTICE LogLevel = 5
44 VPE_API_LOG_LEVEL_INFO LogLevel = 6
45 VPE_API_LOG_LEVEL_DEBUG LogLevel = 7
46 VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
49 var LogLevel_name = map[uint32]string{
50 0: "VPE_API_LOG_LEVEL_EMERG",
51 1: "VPE_API_LOG_LEVEL_ALERT",
52 2: "VPE_API_LOG_LEVEL_CRIT",
53 3: "VPE_API_LOG_LEVEL_ERR",
54 4: "VPE_API_LOG_LEVEL_WARNING",
55 5: "VPE_API_LOG_LEVEL_NOTICE",
56 6: "VPE_API_LOG_LEVEL_INFO",
57 7: "VPE_API_LOG_LEVEL_DEBUG",
58 8: "VPE_API_LOG_LEVEL_DISABLED",
61 var LogLevel_value = map[string]uint32{
62 "VPE_API_LOG_LEVEL_EMERG": 0,
63 "VPE_API_LOG_LEVEL_ALERT": 1,
64 "VPE_API_LOG_LEVEL_CRIT": 2,
65 "VPE_API_LOG_LEVEL_ERR": 3,
66 "VPE_API_LOG_LEVEL_WARNING": 4,
67 "VPE_API_LOG_LEVEL_NOTICE": 5,
68 "VPE_API_LOG_LEVEL_INFO": 6,
69 "VPE_API_LOG_LEVEL_DEBUG": 7,
70 "VPE_API_LOG_LEVEL_DISABLED": 8,
73 func (x LogLevel) String() string {
74 s, ok := LogLevel_name[uint32(x)]
78 return strconv.Itoa(int(x))
81 // Timedelta represents VPP binary API alias 'timedelta'.
82 type Timedelta float64
84 // Timestamp represents VPP binary API alias 'timestamp'.
85 type Timestamp float64
87 // ThreadData represents VPP binary API type 'thread_data'.
88 type ThreadData struct {
90 Name []byte `struc:"[64]byte"`
91 Type []byte `struc:"[64]byte"`
98 func (*ThreadData) GetTypeName() string {
102 // Version represents VPP binary API type 'version'.
103 type Version struct {
107 PreRelease []byte `struc:"[17]byte"`
108 BuildMetadata []byte `struc:"[17]byte"`
111 func (*Version) GetTypeName() string {
115 // AddNodeNext represents VPP binary API message 'add_node_next'.
116 type AddNodeNext struct {
117 NodeName []byte `struc:"[64]byte"`
118 NextName []byte `struc:"[64]byte"`
121 func (*AddNodeNext) GetMessageName() string {
122 return "add_node_next"
124 func (*AddNodeNext) GetCrcString() string {
127 func (*AddNodeNext) GetMessageType() api.MessageType {
128 return api.RequestMessage
131 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply'.
132 type AddNodeNextReply struct {
137 func (*AddNodeNextReply) GetMessageName() string {
138 return "add_node_next_reply"
140 func (*AddNodeNextReply) GetCrcString() string {
143 func (*AddNodeNextReply) GetMessageType() api.MessageType {
144 return api.ReplyMessage
147 // Cli represents VPP binary API message 'cli'.
152 func (*Cli) GetMessageName() string {
155 func (*Cli) GetCrcString() string {
158 func (*Cli) GetMessageType() api.MessageType {
159 return api.RequestMessage
162 // CliInband represents VPP binary API message 'cli_inband'.
163 type CliInband struct {
164 XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
168 func (*CliInband) GetMessageName() string {
171 func (*CliInband) GetCrcString() string {
174 func (*CliInband) GetMessageType() api.MessageType {
175 return api.RequestMessage
178 // CliInbandReply represents VPP binary API message 'cli_inband_reply'.
179 type CliInbandReply struct {
181 XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
185 func (*CliInbandReply) GetMessageName() string {
186 return "cli_inband_reply"
188 func (*CliInbandReply) GetCrcString() string {
191 func (*CliInbandReply) GetMessageType() api.MessageType {
192 return api.ReplyMessage
195 // CliReply represents VPP binary API message 'cli_reply'.
196 type CliReply struct {
201 func (*CliReply) GetMessageName() string {
204 func (*CliReply) GetCrcString() string {
207 func (*CliReply) GetMessageType() api.MessageType {
208 return api.ReplyMessage
211 // ControlPing represents VPP binary API message 'control_ping'.
212 type ControlPing struct{}
214 func (*ControlPing) GetMessageName() string {
215 return "control_ping"
217 func (*ControlPing) GetCrcString() string {
220 func (*ControlPing) GetMessageType() api.MessageType {
221 return api.RequestMessage
224 // ControlPingReply represents VPP binary API message 'control_ping_reply'.
225 type ControlPingReply struct {
231 func (*ControlPingReply) GetMessageName() string {
232 return "control_ping_reply"
234 func (*ControlPingReply) GetCrcString() string {
237 func (*ControlPingReply) GetMessageType() api.MessageType {
238 return api.ReplyMessage
241 // GetF64EndianValue represents VPP binary API message 'get_f64_endian_value'.
242 type GetF64EndianValue struct {
246 func (*GetF64EndianValue) GetMessageName() string {
247 return "get_f64_endian_value"
249 func (*GetF64EndianValue) GetCrcString() string {
252 func (*GetF64EndianValue) GetMessageType() api.MessageType {
253 return api.RequestMessage
256 // GetF64EndianValueReply represents VPP binary API message 'get_f64_endian_value_reply'.
257 type GetF64EndianValueReply struct {
262 func (*GetF64EndianValueReply) GetMessageName() string {
263 return "get_f64_endian_value_reply"
265 func (*GetF64EndianValueReply) GetCrcString() string {
268 func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
269 return api.ReplyMessage
272 // GetF64IncrementByOne represents VPP binary API message 'get_f64_increment_by_one'.
273 type GetF64IncrementByOne struct {
277 func (*GetF64IncrementByOne) GetMessageName() string {
278 return "get_f64_increment_by_one"
280 func (*GetF64IncrementByOne) GetCrcString() string {
283 func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
284 return api.RequestMessage
287 // GetF64IncrementByOneReply represents VPP binary API message 'get_f64_increment_by_one_reply'.
288 type GetF64IncrementByOneReply struct {
293 func (*GetF64IncrementByOneReply) GetMessageName() string {
294 return "get_f64_increment_by_one_reply"
296 func (*GetF64IncrementByOneReply) GetCrcString() string {
299 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
300 return api.ReplyMessage
303 // GetNextIndex represents VPP binary API message 'get_next_index'.
304 type GetNextIndex struct {
305 NodeName []byte `struc:"[64]byte"`
306 NextName []byte `struc:"[64]byte"`
309 func (*GetNextIndex) GetMessageName() string {
310 return "get_next_index"
312 func (*GetNextIndex) GetCrcString() string {
315 func (*GetNextIndex) GetMessageType() api.MessageType {
316 return api.RequestMessage
319 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply'.
320 type GetNextIndexReply struct {
325 func (*GetNextIndexReply) GetMessageName() string {
326 return "get_next_index_reply"
328 func (*GetNextIndexReply) GetCrcString() string {
331 func (*GetNextIndexReply) GetMessageType() api.MessageType {
332 return api.ReplyMessage
335 // GetNodeGraph represents VPP binary API message 'get_node_graph'.
336 type GetNodeGraph struct{}
338 func (*GetNodeGraph) GetMessageName() string {
339 return "get_node_graph"
341 func (*GetNodeGraph) GetCrcString() string {
344 func (*GetNodeGraph) GetMessageType() api.MessageType {
345 return api.RequestMessage
348 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply'.
349 type GetNodeGraphReply struct {
354 func (*GetNodeGraphReply) GetMessageName() string {
355 return "get_node_graph_reply"
357 func (*GetNodeGraphReply) GetCrcString() string {
360 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
361 return api.ReplyMessage
364 // GetNodeIndex represents VPP binary API message 'get_node_index'.
365 type GetNodeIndex struct {
366 NodeName []byte `struc:"[64]byte"`
369 func (*GetNodeIndex) GetMessageName() string {
370 return "get_node_index"
372 func (*GetNodeIndex) GetCrcString() string {
375 func (*GetNodeIndex) GetMessageType() api.MessageType {
376 return api.RequestMessage
379 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply'.
380 type GetNodeIndexReply struct {
385 func (*GetNodeIndexReply) GetMessageName() string {
386 return "get_node_index_reply"
388 func (*GetNodeIndexReply) GetCrcString() string {
391 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
392 return api.ReplyMessage
395 // LogDetails represents VPP binary API message 'log_details'.
396 type LogDetails struct {
399 MsgClass string `struc:"[32]byte"`
400 Message string `struc:"[256]byte"`
403 func (*LogDetails) GetMessageName() string {
406 func (*LogDetails) GetCrcString() string {
409 func (*LogDetails) GetMessageType() api.MessageType {
410 return api.ReplyMessage
413 // LogDump represents VPP binary API message 'log_dump'.
414 type LogDump struct {
415 StartTimestamp Timestamp
418 func (*LogDump) GetMessageName() string {
421 func (*LogDump) GetCrcString() string {
424 func (*LogDump) GetMessageType() api.MessageType {
425 return api.RequestMessage
428 // ShowThreads represents VPP binary API message 'show_threads'.
429 type ShowThreads struct{}
431 func (*ShowThreads) GetMessageName() string {
432 return "show_threads"
434 func (*ShowThreads) GetCrcString() string {
437 func (*ShowThreads) GetMessageType() api.MessageType {
438 return api.RequestMessage
441 // ShowThreadsReply represents VPP binary API message 'show_threads_reply'.
442 type ShowThreadsReply struct {
444 Count uint32 `struc:"sizeof=ThreadData"`
445 ThreadData []ThreadData
448 func (*ShowThreadsReply) GetMessageName() string {
449 return "show_threads_reply"
451 func (*ShowThreadsReply) GetCrcString() string {
454 func (*ShowThreadsReply) GetMessageType() api.MessageType {
455 return api.ReplyMessage
458 // ShowVersion represents VPP binary API message 'show_version'.
459 type ShowVersion struct{}
461 func (*ShowVersion) GetMessageName() string {
462 return "show_version"
464 func (*ShowVersion) GetCrcString() string {
467 func (*ShowVersion) GetMessageType() api.MessageType {
468 return api.RequestMessage
471 // ShowVersionReply represents VPP binary API message 'show_version_reply'.
472 type ShowVersionReply struct {
474 Program string `struc:"[32]byte"`
475 Version string `struc:"[32]byte"`
476 BuildDate string `struc:"[32]byte"`
477 BuildDirectory string `struc:"[256]byte"`
480 func (*ShowVersionReply) GetMessageName() string {
481 return "show_version_reply"
483 func (*ShowVersionReply) GetCrcString() string {
486 func (*ShowVersionReply) GetMessageType() api.MessageType {
487 return api.ReplyMessage
490 // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'.
491 type ShowVpeSystemTime struct{}
493 func (*ShowVpeSystemTime) GetMessageName() string {
494 return "show_vpe_system_time"
496 func (*ShowVpeSystemTime) GetCrcString() string {
499 func (*ShowVpeSystemTime) GetMessageType() api.MessageType {
500 return api.RequestMessage
503 // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'.
504 type ShowVpeSystemTimeReply struct {
506 VpeSystemTime Timestamp
509 func (*ShowVpeSystemTimeReply) GetMessageName() string {
510 return "show_vpe_system_time_reply"
512 func (*ShowVpeSystemTimeReply) GetCrcString() string {
515 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
516 return api.ReplyMessage
520 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
521 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
522 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
523 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
524 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
525 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
526 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
527 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
528 api.RegisterMessage((*GetF64EndianValue)(nil), "vpe.GetF64EndianValue")
529 api.RegisterMessage((*GetF64EndianValueReply)(nil), "vpe.GetF64EndianValueReply")
530 api.RegisterMessage((*GetF64IncrementByOne)(nil), "vpe.GetF64IncrementByOne")
531 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "vpe.GetF64IncrementByOneReply")
532 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
533 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
534 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
535 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
536 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
537 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
538 api.RegisterMessage((*LogDetails)(nil), "vpe.LogDetails")
539 api.RegisterMessage((*LogDump)(nil), "vpe.LogDump")
540 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
541 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
542 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
543 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
544 api.RegisterMessage((*ShowVpeSystemTime)(nil), "vpe.ShowVpeSystemTime")
545 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "vpe.ShowVpeSystemTimeReply")
548 // Messages returns list of all messages in this module.
549 func AllMessages() []api.Message {
550 return []api.Message{
552 (*AddNodeNextReply)(nil),
555 (*CliInbandReply)(nil),
558 (*ControlPingReply)(nil),
559 (*GetF64EndianValue)(nil),
560 (*GetF64EndianValueReply)(nil),
561 (*GetF64IncrementByOne)(nil),
562 (*GetF64IncrementByOneReply)(nil),
563 (*GetNextIndex)(nil),
564 (*GetNextIndexReply)(nil),
565 (*GetNodeGraph)(nil),
566 (*GetNodeGraphReply)(nil),
567 (*GetNodeIndex)(nil),
568 (*GetNodeIndexReply)(nil),
572 (*ShowThreadsReply)(nil),
574 (*ShowVersionReply)(nil),
575 (*ShowVpeSystemTime)(nil),
576 (*ShowVpeSystemTimeReply)(nil),
580 // RPCService represents RPC service API for vpe module.
581 type RPCService interface {
582 DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error)
583 AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
584 Cli(ctx context.Context, in *Cli) (*CliReply, error)
585 CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
586 ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
587 GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
588 GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
589 GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
590 GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
591 GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
592 ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
593 ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
594 ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
597 type serviceClient struct {
601 func NewServiceClient(ch api.Channel) RPCService {
602 return &serviceClient{ch}
605 func (c *serviceClient) DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error) {
606 stream := c.ch.SendMultiRequest(in)
607 x := &serviceClient_DumpLogClient{stream}
611 type RPCService_DumpLogClient interface {
612 Recv() (*LogDetails, error)
615 type serviceClient_DumpLogClient struct {
619 func (c *serviceClient_DumpLogClient) Recv() (*LogDetails, error) {
621 stop, err := c.MultiRequestCtx.ReceiveReply(m)
631 func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
632 out := new(AddNodeNextReply)
633 err := c.ch.SendRequest(in).ReceiveReply(out)
640 func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
642 err := c.ch.SendRequest(in).ReceiveReply(out)
649 func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
650 out := new(CliInbandReply)
651 err := c.ch.SendRequest(in).ReceiveReply(out)
658 func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
659 out := new(ControlPingReply)
660 err := c.ch.SendRequest(in).ReceiveReply(out)
667 func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
668 out := new(GetF64EndianValueReply)
669 err := c.ch.SendRequest(in).ReceiveReply(out)
676 func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
677 out := new(GetF64IncrementByOneReply)
678 err := c.ch.SendRequest(in).ReceiveReply(out)
685 func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
686 out := new(GetNextIndexReply)
687 err := c.ch.SendRequest(in).ReceiveReply(out)
694 func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
695 out := new(GetNodeGraphReply)
696 err := c.ch.SendRequest(in).ReceiveReply(out)
703 func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
704 out := new(GetNodeIndexReply)
705 err := c.ch.SendRequest(in).ReceiveReply(out)
712 func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
713 out := new(ShowThreadsReply)
714 err := c.ch.SendRequest(in).ReceiveReply(out)
721 func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
722 out := new(ShowVersionReply)
723 err := c.ch.SendRequest(in).ReceiveReply(out)
730 func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
731 out := new(ShowVpeSystemTimeReply)
732 err := c.ch.SendRequest(in).ReceiveReply(out)
739 // This is a compile-time assertion to ensure that this generated file
740 // is compatible with the GoVPP api package it is being compiled against.
741 // A compilation error at this line likely means your copy of the
742 // GoVPP api package needs to be updated.
743 const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
745 // Reference imports to suppress errors if they are not otherwise used.
746 var _ = api.RegisterMessage
747 var _ = bytes.NewBuffer
748 var _ = context.Background