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 = 0x2521f24d
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 XXX_MsgClassLen uint32 `struc:"sizeof=MsgClass"`
400 MsgClass string `binapi:",limit=32"`
401 XXX_MessageLen uint32 `struc:"sizeof=Message"`
402 Message string `binapi:",limit=256"`
405 func (*LogDetails) GetMessageName() string {
408 func (*LogDetails) GetCrcString() string {
411 func (*LogDetails) GetMessageType() api.MessageType {
412 return api.ReplyMessage
415 // LogDump represents VPP binary API message 'log_dump'.
416 type LogDump struct {
417 StartTimestamp Timestamp
420 func (*LogDump) GetMessageName() string {
423 func (*LogDump) GetCrcString() string {
426 func (*LogDump) GetMessageType() api.MessageType {
427 return api.RequestMessage
430 // ShowThreads represents VPP binary API message 'show_threads'.
431 type ShowThreads struct{}
433 func (*ShowThreads) GetMessageName() string {
434 return "show_threads"
436 func (*ShowThreads) GetCrcString() string {
439 func (*ShowThreads) GetMessageType() api.MessageType {
440 return api.RequestMessage
443 // ShowThreadsReply represents VPP binary API message 'show_threads_reply'.
444 type ShowThreadsReply struct {
446 Count uint32 `struc:"sizeof=ThreadData"`
447 ThreadData []ThreadData
450 func (*ShowThreadsReply) GetMessageName() string {
451 return "show_threads_reply"
453 func (*ShowThreadsReply) GetCrcString() string {
456 func (*ShowThreadsReply) GetMessageType() api.MessageType {
457 return api.ReplyMessage
460 // ShowVersion represents VPP binary API message 'show_version'.
461 type ShowVersion struct{}
463 func (*ShowVersion) GetMessageName() string {
464 return "show_version"
466 func (*ShowVersion) GetCrcString() string {
469 func (*ShowVersion) GetMessageType() api.MessageType {
470 return api.RequestMessage
473 // ShowVersionReply represents VPP binary API message 'show_version_reply'.
474 type ShowVersionReply struct {
476 XXX_ProgramLen uint32 `struc:"sizeof=Program"`
477 Program string `binapi:",limit=32"`
478 XXX_VersionLen uint32 `struc:"sizeof=Version"`
479 Version string `binapi:",limit=32"`
480 XXX_BuildDateLen uint32 `struc:"sizeof=BuildDate"`
481 BuildDate string `binapi:",limit=32"`
482 XXX_BuildDirectoryLen uint32 `struc:"sizeof=BuildDirectory"`
483 BuildDirectory string `binapi:",limit=256"`
486 func (*ShowVersionReply) GetMessageName() string {
487 return "show_version_reply"
489 func (*ShowVersionReply) GetCrcString() string {
492 func (*ShowVersionReply) GetMessageType() api.MessageType {
493 return api.ReplyMessage
496 // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'.
497 type ShowVpeSystemTime struct{}
499 func (*ShowVpeSystemTime) GetMessageName() string {
500 return "show_vpe_system_time"
502 func (*ShowVpeSystemTime) GetCrcString() string {
505 func (*ShowVpeSystemTime) GetMessageType() api.MessageType {
506 return api.RequestMessage
509 // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'.
510 type ShowVpeSystemTimeReply struct {
512 VpeSystemTime Timestamp
515 func (*ShowVpeSystemTimeReply) GetMessageName() string {
516 return "show_vpe_system_time_reply"
518 func (*ShowVpeSystemTimeReply) GetCrcString() string {
521 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
522 return api.ReplyMessage
526 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
527 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
528 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
529 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
530 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
531 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
532 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
533 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
534 api.RegisterMessage((*GetF64EndianValue)(nil), "vpe.GetF64EndianValue")
535 api.RegisterMessage((*GetF64EndianValueReply)(nil), "vpe.GetF64EndianValueReply")
536 api.RegisterMessage((*GetF64IncrementByOne)(nil), "vpe.GetF64IncrementByOne")
537 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "vpe.GetF64IncrementByOneReply")
538 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
539 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
540 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
541 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
542 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
543 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
544 api.RegisterMessage((*LogDetails)(nil), "vpe.LogDetails")
545 api.RegisterMessage((*LogDump)(nil), "vpe.LogDump")
546 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
547 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
548 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
549 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
550 api.RegisterMessage((*ShowVpeSystemTime)(nil), "vpe.ShowVpeSystemTime")
551 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "vpe.ShowVpeSystemTimeReply")
554 // Messages returns list of all messages in this module.
555 func AllMessages() []api.Message {
556 return []api.Message{
558 (*AddNodeNextReply)(nil),
561 (*CliInbandReply)(nil),
564 (*ControlPingReply)(nil),
565 (*GetF64EndianValue)(nil),
566 (*GetF64EndianValueReply)(nil),
567 (*GetF64IncrementByOne)(nil),
568 (*GetF64IncrementByOneReply)(nil),
569 (*GetNextIndex)(nil),
570 (*GetNextIndexReply)(nil),
571 (*GetNodeGraph)(nil),
572 (*GetNodeGraphReply)(nil),
573 (*GetNodeIndex)(nil),
574 (*GetNodeIndexReply)(nil),
578 (*ShowThreadsReply)(nil),
580 (*ShowVersionReply)(nil),
581 (*ShowVpeSystemTime)(nil),
582 (*ShowVpeSystemTimeReply)(nil),
586 // RPCService represents RPC service API for vpe module.
587 type RPCService interface {
588 DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error)
589 AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
590 Cli(ctx context.Context, in *Cli) (*CliReply, error)
591 CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
592 ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
593 GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
594 GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
595 GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
596 GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
597 GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
598 ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
599 ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
600 ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
603 type serviceClient struct {
607 func NewServiceClient(ch api.Channel) RPCService {
608 return &serviceClient{ch}
611 func (c *serviceClient) DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error) {
612 stream := c.ch.SendMultiRequest(in)
613 x := &serviceClient_DumpLogClient{stream}
617 type RPCService_DumpLogClient interface {
618 Recv() (*LogDetails, error)
621 type serviceClient_DumpLogClient struct {
625 func (c *serviceClient_DumpLogClient) Recv() (*LogDetails, error) {
627 stop, err := c.MultiRequestCtx.ReceiveReply(m)
637 func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
638 out := new(AddNodeNextReply)
639 err := c.ch.SendRequest(in).ReceiveReply(out)
646 func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
648 err := c.ch.SendRequest(in).ReceiveReply(out)
655 func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
656 out := new(CliInbandReply)
657 err := c.ch.SendRequest(in).ReceiveReply(out)
664 func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
665 out := new(ControlPingReply)
666 err := c.ch.SendRequest(in).ReceiveReply(out)
673 func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
674 out := new(GetF64EndianValueReply)
675 err := c.ch.SendRequest(in).ReceiveReply(out)
682 func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
683 out := new(GetF64IncrementByOneReply)
684 err := c.ch.SendRequest(in).ReceiveReply(out)
691 func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
692 out := new(GetNextIndexReply)
693 err := c.ch.SendRequest(in).ReceiveReply(out)
700 func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
701 out := new(GetNodeGraphReply)
702 err := c.ch.SendRequest(in).ReceiveReply(out)
709 func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
710 out := new(GetNodeIndexReply)
711 err := c.ch.SendRequest(in).ReceiveReply(out)
718 func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
719 out := new(ShowThreadsReply)
720 err := c.ch.SendRequest(in).ReceiveReply(out)
727 func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
728 out := new(ShowVersionReply)
729 err := c.ch.SendRequest(in).ReceiveReply(out)
736 func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
737 out := new(ShowVpeSystemTimeReply)
738 err := c.ch.SendRequest(in).ReceiveReply(out)
745 // This is a compile-time assertion to ensure that this generated file
746 // is compatible with the GoVPP api package it is being compiled against.
747 // A compilation error at this line likely means your copy of the
748 // GoVPP api package needs to be updated.
749 const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
751 // Reference imports to suppress errors if they are not otherwise used.
752 var _ = api.RegisterMessage
753 var _ = bytes.NewBuffer
754 var _ = context.Background