1 // Code generated by GoVPP binapi-generator. DO NOT EDIT.
2 // source: /usr/share/vpp/api/core/vpe.api.json
5 Package vpe is a generated from VPP binary API module 'vpe'.
7 The vpe module consists of:
14 import api "git.fd.io/govpp.git/api"
16 import context "context"
17 import strconv "strconv"
18 import struc "github.com/lunixbochs/struc"
20 // Reference imports to suppress errors if they are not otherwise used.
21 var _ = api.RegisterMessage
22 var _ = bytes.NewBuffer
23 var _ = context.Background
27 // This is a compile-time assertion to ensure that this generated file
28 // is compatible with the GoVPP api package it is being compiled against.
29 // A compilation error at this line likely means your copy of the
30 // GoVPP api package needs to be updated.
31 const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
34 // ModuleName is the name of this module.
36 // APIVersion is the API version of this module.
38 // VersionCrc is the CRC of this module.
39 VersionCrc = 0x2cc8d629
44 // ThreadData represents VPP binary API type 'thread_data':
45 type ThreadData struct {
47 Name []byte `struc:"[64]byte"`
48 Type []byte `struc:"[64]byte"`
55 func (*ThreadData) GetTypeName() string {
58 func (*ThreadData) GetCrcString() string {
64 // AddNodeNext represents VPP binary API message 'add_node_next':
65 type AddNodeNext struct {
66 NodeName []byte `struc:"[64]byte"`
67 NextName []byte `struc:"[64]byte"`
70 func (*AddNodeNext) GetMessageName() string {
71 return "add_node_next"
73 func (*AddNodeNext) GetCrcString() string {
76 func (*AddNodeNext) GetMessageType() api.MessageType {
77 return api.RequestMessage
80 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply':
81 type AddNodeNextReply struct {
86 func (*AddNodeNextReply) GetMessageName() string {
87 return "add_node_next_reply"
89 func (*AddNodeNextReply) GetCrcString() string {
92 func (*AddNodeNextReply) GetMessageType() api.MessageType {
93 return api.ReplyMessage
96 // Cli represents VPP binary API message 'cli':
101 func (*Cli) GetMessageName() string {
104 func (*Cli) GetCrcString() string {
107 func (*Cli) GetMessageType() api.MessageType {
108 return api.RequestMessage
111 // CliInband represents VPP binary API message 'cli_inband':
112 type CliInband struct {
113 XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
117 func (*CliInband) GetMessageName() string {
120 func (*CliInband) GetCrcString() string {
123 func (*CliInband) GetMessageType() api.MessageType {
124 return api.RequestMessage
127 // CliInbandReply represents VPP binary API message 'cli_inband_reply':
128 type CliInbandReply struct {
130 XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
134 func (*CliInbandReply) GetMessageName() string {
135 return "cli_inband_reply"
137 func (*CliInbandReply) GetCrcString() string {
140 func (*CliInbandReply) GetMessageType() api.MessageType {
141 return api.ReplyMessage
144 // CliReply represents VPP binary API message 'cli_reply':
145 type CliReply struct {
150 func (*CliReply) GetMessageName() string {
153 func (*CliReply) GetCrcString() string {
156 func (*CliReply) GetMessageType() api.MessageType {
157 return api.ReplyMessage
160 // ControlPing represents VPP binary API message 'control_ping':
161 type ControlPing struct{}
163 func (*ControlPing) GetMessageName() string {
164 return "control_ping"
166 func (*ControlPing) GetCrcString() string {
169 func (*ControlPing) GetMessageType() api.MessageType {
170 return api.RequestMessage
173 // ControlPingReply represents VPP binary API message 'control_ping_reply':
174 type ControlPingReply struct {
180 func (*ControlPingReply) GetMessageName() string {
181 return "control_ping_reply"
183 func (*ControlPingReply) GetCrcString() string {
186 func (*ControlPingReply) GetMessageType() api.MessageType {
187 return api.ReplyMessage
190 // GetNextIndex represents VPP binary API message 'get_next_index':
191 type GetNextIndex struct {
192 NodeName []byte `struc:"[64]byte"`
193 NextName []byte `struc:"[64]byte"`
196 func (*GetNextIndex) GetMessageName() string {
197 return "get_next_index"
199 func (*GetNextIndex) GetCrcString() string {
202 func (*GetNextIndex) GetMessageType() api.MessageType {
203 return api.RequestMessage
206 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply':
207 type GetNextIndexReply struct {
212 func (*GetNextIndexReply) GetMessageName() string {
213 return "get_next_index_reply"
215 func (*GetNextIndexReply) GetCrcString() string {
218 func (*GetNextIndexReply) GetMessageType() api.MessageType {
219 return api.ReplyMessage
222 // GetNodeGraph represents VPP binary API message 'get_node_graph':
223 type GetNodeGraph struct{}
225 func (*GetNodeGraph) GetMessageName() string {
226 return "get_node_graph"
228 func (*GetNodeGraph) GetCrcString() string {
231 func (*GetNodeGraph) GetMessageType() api.MessageType {
232 return api.RequestMessage
235 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply':
236 type GetNodeGraphReply struct {
241 func (*GetNodeGraphReply) GetMessageName() string {
242 return "get_node_graph_reply"
244 func (*GetNodeGraphReply) GetCrcString() string {
247 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
248 return api.ReplyMessage
251 // GetNodeIndex represents VPP binary API message 'get_node_index':
252 type GetNodeIndex struct {
253 NodeName []byte `struc:"[64]byte"`
256 func (*GetNodeIndex) GetMessageName() string {
257 return "get_node_index"
259 func (*GetNodeIndex) GetCrcString() string {
262 func (*GetNodeIndex) GetMessageType() api.MessageType {
263 return api.RequestMessage
266 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply':
267 type GetNodeIndexReply struct {
272 func (*GetNodeIndexReply) GetMessageName() string {
273 return "get_node_index_reply"
275 func (*GetNodeIndexReply) GetCrcString() string {
278 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
279 return api.ReplyMessage
282 // ShowThreads represents VPP binary API message 'show_threads':
283 type ShowThreads struct{}
285 func (*ShowThreads) GetMessageName() string {
286 return "show_threads"
288 func (*ShowThreads) GetCrcString() string {
291 func (*ShowThreads) GetMessageType() api.MessageType {
292 return api.RequestMessage
295 // ShowThreadsReply represents VPP binary API message 'show_threads_reply':
296 type ShowThreadsReply struct {
298 Count uint32 `struc:"sizeof=ThreadData"`
299 ThreadData []ThreadData
302 func (*ShowThreadsReply) GetMessageName() string {
303 return "show_threads_reply"
305 func (*ShowThreadsReply) GetCrcString() string {
308 func (*ShowThreadsReply) GetMessageType() api.MessageType {
309 return api.ReplyMessage
312 // ShowVersion represents VPP binary API message 'show_version':
313 type ShowVersion struct{}
315 func (*ShowVersion) GetMessageName() string {
316 return "show_version"
318 func (*ShowVersion) GetCrcString() string {
321 func (*ShowVersion) GetMessageType() api.MessageType {
322 return api.RequestMessage
325 // ShowVersionReply represents VPP binary API message 'show_version_reply':
326 type ShowVersionReply struct {
328 XXX_ProgramLen uint32 `struc:"sizeof=Program"`
330 XXX_VersionLen uint32 `struc:"sizeof=Version"`
332 XXX_BuildDateLen uint32 `struc:"sizeof=BuildDate"`
334 XXX_BuildDirectoryLen uint32 `struc:"sizeof=BuildDirectory"`
335 BuildDirectory string
338 func (*ShowVersionReply) GetMessageName() string {
339 return "show_version_reply"
341 func (*ShowVersionReply) GetCrcString() string {
344 func (*ShowVersionReply) GetMessageType() api.MessageType {
345 return api.ReplyMessage
349 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
350 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
351 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
352 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
353 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
354 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
355 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
356 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
357 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
358 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
359 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
360 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
361 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
362 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
363 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
364 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
365 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
366 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
369 // Messages returns list of all messages in this module.
370 func AllMessages() []api.Message {
371 return []api.Message{
373 (*AddNodeNextReply)(nil),
376 (*CliInbandReply)(nil),
379 (*ControlPingReply)(nil),
380 (*GetNextIndex)(nil),
381 (*GetNextIndexReply)(nil),
382 (*GetNodeGraph)(nil),
383 (*GetNodeGraphReply)(nil),
384 (*GetNodeIndex)(nil),
385 (*GetNodeIndexReply)(nil),
387 (*ShowThreadsReply)(nil),
389 (*ShowVersionReply)(nil),
393 // Service represents VPP binary API services in vpe module.
394 type Service interface {
395 AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
396 Cli(ctx context.Context, in *Cli) (*CliReply, error)
397 CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
398 ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
399 GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
400 GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
401 GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
402 ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
403 ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
406 type service struct {
410 func NewService(ch api.Channel) Service {
414 func (c *service) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
415 out := new(AddNodeNextReply)
416 err := c.ch.SendRequest(in).ReceiveReply(out)
423 func (c *service) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
425 err := c.ch.SendRequest(in).ReceiveReply(out)
432 func (c *service) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
433 out := new(CliInbandReply)
434 err := c.ch.SendRequest(in).ReceiveReply(out)
441 func (c *service) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
442 out := new(ControlPingReply)
443 err := c.ch.SendRequest(in).ReceiveReply(out)
450 func (c *service) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
451 out := new(GetNextIndexReply)
452 err := c.ch.SendRequest(in).ReceiveReply(out)
459 func (c *service) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
460 out := new(GetNodeGraphReply)
461 err := c.ch.SendRequest(in).ReceiveReply(out)
468 func (c *service) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
469 out := new(GetNodeIndexReply)
470 err := c.ch.SendRequest(in).ReceiveReply(out)
477 func (c *service) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
478 out := new(ShowThreadsReply)
479 err := c.ch.SendRequest(in).ReceiveReply(out)
486 func (c *service) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
487 out := new(ShowVersionReply)
488 err := c.ch.SendRequest(in).ReceiveReply(out)