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"
24 vpe_types "git.fd.io/govpp.git/examples/binapi/vpe_types"
28 // ModuleName is the name of this module.
30 // APIVersion is the API version of this module.
32 // VersionCrc is the CRC of this module.
33 VersionCrc = 0xc6c0bcf6
36 type LogLevel = vpe_types.LogLevel
38 type Timedelta = vpe_types.Timedelta
40 type Timestamp = vpe_types.Timestamp
42 // ThreadData represents VPP binary API type 'thread_data'.
43 type ThreadData struct {
45 Name []byte `struc:"[64]byte"`
46 Type []byte `struc:"[64]byte"`
53 func (*ThreadData) GetTypeName() string { return "thread_data" }
55 type Version = vpe_types.Version
57 // AddNodeNext represents VPP binary API message 'add_node_next'.
58 type AddNodeNext struct {
59 NodeName []byte `struc:"[64]byte"`
60 NextName []byte `struc:"[64]byte"`
63 func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
64 func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
65 func (*AddNodeNext) GetCrcString() string { return "9ab92f7a" }
66 func (*AddNodeNext) GetMessageType() api.MessageType { return api.RequestMessage }
68 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply'.
69 type AddNodeNextReply struct {
74 func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
75 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
76 func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
77 func (*AddNodeNextReply) GetMessageType() api.MessageType { return api.ReplyMessage }
79 // Cli represents VPP binary API message 'cli'.
84 func (m *Cli) Reset() { *m = Cli{} }
85 func (*Cli) GetMessageName() string { return "cli" }
86 func (*Cli) GetCrcString() string { return "23bfbfff" }
87 func (*Cli) GetMessageType() api.MessageType { return api.RequestMessage }
89 // CliInband represents VPP binary API message 'cli_inband'.
90 type CliInband struct {
91 XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
95 func (m *CliInband) Reset() { *m = CliInband{} }
96 func (*CliInband) GetMessageName() string { return "cli_inband" }
97 func (*CliInband) GetCrcString() string { return "f8377302" }
98 func (*CliInband) GetMessageType() api.MessageType { return api.RequestMessage }
100 // CliInbandReply represents VPP binary API message 'cli_inband_reply'.
101 type CliInbandReply struct {
103 XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
107 func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
108 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
109 func (*CliInbandReply) GetCrcString() string { return "05879051" }
110 func (*CliInbandReply) GetMessageType() api.MessageType { return api.ReplyMessage }
112 // CliReply represents VPP binary API message 'cli_reply'.
113 type CliReply struct {
118 func (m *CliReply) Reset() { *m = CliReply{} }
119 func (*CliReply) GetMessageName() string { return "cli_reply" }
120 func (*CliReply) GetCrcString() string { return "06d68297" }
121 func (*CliReply) GetMessageType() api.MessageType { return api.ReplyMessage }
123 // ControlPing represents VPP binary API message 'control_ping'.
124 type ControlPing struct{}
126 func (m *ControlPing) Reset() { *m = ControlPing{} }
127 func (*ControlPing) GetMessageName() string { return "control_ping" }
128 func (*ControlPing) GetCrcString() string { return "51077d14" }
129 func (*ControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
131 // ControlPingReply represents VPP binary API message 'control_ping_reply'.
132 type ControlPingReply struct {
138 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
139 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
140 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
141 func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
143 // GetF64EndianValue represents VPP binary API message 'get_f64_endian_value'.
144 type GetF64EndianValue struct {
148 func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
149 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
150 func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
151 func (*GetF64EndianValue) GetMessageType() api.MessageType { return api.RequestMessage }
153 // GetF64EndianValueReply represents VPP binary API message 'get_f64_endian_value_reply'.
154 type GetF64EndianValueReply struct {
159 func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
160 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
161 func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
162 func (*GetF64EndianValueReply) GetMessageType() api.MessageType { return api.ReplyMessage }
164 // GetF64IncrementByOne represents VPP binary API message 'get_f64_increment_by_one'.
165 type GetF64IncrementByOne struct {
169 func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
170 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
171 func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
172 func (*GetF64IncrementByOne) GetMessageType() api.MessageType { return api.RequestMessage }
174 // GetF64IncrementByOneReply represents VPP binary API message 'get_f64_increment_by_one_reply'.
175 type GetF64IncrementByOneReply struct {
180 func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
181 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
182 func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
183 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType { return api.ReplyMessage }
185 // GetNextIndex represents VPP binary API message 'get_next_index'.
186 type GetNextIndex struct {
187 NodeName []byte `struc:"[64]byte"`
188 NextName []byte `struc:"[64]byte"`
191 func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
192 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
193 func (*GetNextIndex) GetCrcString() string { return "9ab92f7a" }
194 func (*GetNextIndex) GetMessageType() api.MessageType { return api.RequestMessage }
196 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply'.
197 type GetNextIndexReply struct {
202 func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
203 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
204 func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
205 func (*GetNextIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
207 // GetNodeGraph represents VPP binary API message 'get_node_graph'.
208 type GetNodeGraph struct{}
210 func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
211 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
212 func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
213 func (*GetNodeGraph) GetMessageType() api.MessageType { return api.RequestMessage }
215 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply'.
216 type GetNodeGraphReply struct {
221 func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
222 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
223 func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
224 func (*GetNodeGraphReply) GetMessageType() api.MessageType { return api.ReplyMessage }
226 // GetNodeIndex represents VPP binary API message 'get_node_index'.
227 type GetNodeIndex struct {
228 NodeName []byte `struc:"[64]byte"`
231 func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
232 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
233 func (*GetNodeIndex) GetCrcString() string { return "6c9a495d" }
234 func (*GetNodeIndex) GetMessageType() api.MessageType { return api.RequestMessage }
236 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply'.
237 type GetNodeIndexReply struct {
242 func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
243 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
244 func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
245 func (*GetNodeIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
247 // LogDetails represents VPP binary API message 'log_details'.
248 type LogDetails struct {
251 MsgClass string `struc:"[32]byte"`
252 Message string `struc:"[256]byte"`
255 func (m *LogDetails) Reset() { *m = LogDetails{} }
256 func (*LogDetails) GetMessageName() string { return "log_details" }
257 func (*LogDetails) GetCrcString() string { return "255827a1" }
258 func (*LogDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
260 // LogDump represents VPP binary API message 'log_dump'.
261 type LogDump struct {
262 StartTimestamp Timestamp
265 func (m *LogDump) Reset() { *m = LogDump{} }
266 func (*LogDump) GetMessageName() string { return "log_dump" }
267 func (*LogDump) GetCrcString() string { return "6ab31753" }
268 func (*LogDump) GetMessageType() api.MessageType { return api.RequestMessage }
270 // ShowThreads represents VPP binary API message 'show_threads'.
271 type ShowThreads struct{}
273 func (m *ShowThreads) Reset() { *m = ShowThreads{} }
274 func (*ShowThreads) GetMessageName() string { return "show_threads" }
275 func (*ShowThreads) GetCrcString() string { return "51077d14" }
276 func (*ShowThreads) GetMessageType() api.MessageType { return api.RequestMessage }
278 // ShowThreadsReply represents VPP binary API message 'show_threads_reply'.
279 type ShowThreadsReply struct {
281 Count uint32 `struc:"sizeof=ThreadData"`
282 ThreadData []ThreadData
285 func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
286 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
287 func (*ShowThreadsReply) GetCrcString() string { return "f5e0b66f" }
288 func (*ShowThreadsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
290 // ShowVersion represents VPP binary API message 'show_version'.
291 type ShowVersion struct{}
293 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
294 func (*ShowVersion) GetMessageName() string { return "show_version" }
295 func (*ShowVersion) GetCrcString() string { return "51077d14" }
296 func (*ShowVersion) GetMessageType() api.MessageType { return api.RequestMessage }
298 // ShowVersionReply represents VPP binary API message 'show_version_reply'.
299 type ShowVersionReply struct {
301 Program string `struc:"[32]byte"`
302 Version string `struc:"[32]byte"`
303 BuildDate string `struc:"[32]byte"`
304 BuildDirectory string `struc:"[256]byte"`
307 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
308 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
309 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
310 func (*ShowVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage }
312 // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'.
313 type ShowVpeSystemTime struct{}
315 func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
316 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
317 func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
318 func (*ShowVpeSystemTime) GetMessageType() api.MessageType { return api.RequestMessage }
320 // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'.
321 type ShowVpeSystemTimeReply struct {
323 VpeSystemTime Timestamp
326 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
327 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
328 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
329 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType { return api.ReplyMessage }
332 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
333 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
334 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
335 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
336 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
337 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
338 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
339 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
340 api.RegisterMessage((*GetF64EndianValue)(nil), "vpe.GetF64EndianValue")
341 api.RegisterMessage((*GetF64EndianValueReply)(nil), "vpe.GetF64EndianValueReply")
342 api.RegisterMessage((*GetF64IncrementByOne)(nil), "vpe.GetF64IncrementByOne")
343 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "vpe.GetF64IncrementByOneReply")
344 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
345 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
346 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
347 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
348 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
349 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
350 api.RegisterMessage((*LogDetails)(nil), "vpe.LogDetails")
351 api.RegisterMessage((*LogDump)(nil), "vpe.LogDump")
352 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
353 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
354 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
355 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
356 api.RegisterMessage((*ShowVpeSystemTime)(nil), "vpe.ShowVpeSystemTime")
357 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "vpe.ShowVpeSystemTimeReply")
360 // Messages returns list of all messages in this module.
361 func AllMessages() []api.Message {
362 return []api.Message{
364 (*AddNodeNextReply)(nil),
367 (*CliInbandReply)(nil),
370 (*ControlPingReply)(nil),
371 (*GetF64EndianValue)(nil),
372 (*GetF64EndianValueReply)(nil),
373 (*GetF64IncrementByOne)(nil),
374 (*GetF64IncrementByOneReply)(nil),
375 (*GetNextIndex)(nil),
376 (*GetNextIndexReply)(nil),
377 (*GetNodeGraph)(nil),
378 (*GetNodeGraphReply)(nil),
379 (*GetNodeIndex)(nil),
380 (*GetNodeIndexReply)(nil),
384 (*ShowThreadsReply)(nil),
386 (*ShowVersionReply)(nil),
387 (*ShowVpeSystemTime)(nil),
388 (*ShowVpeSystemTimeReply)(nil),
392 // RPCService represents RPC service API for vpe module.
393 type RPCService interface {
394 DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error)
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 GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
400 GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
401 GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
402 GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
403 GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
404 ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
405 ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
406 ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
409 type serviceClient struct {
413 func NewServiceClient(ch api.Channel) RPCService {
414 return &serviceClient{ch}
417 func (c *serviceClient) DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error) {
418 stream := c.ch.SendMultiRequest(in)
419 x := &serviceClient_DumpLogClient{stream}
423 type RPCService_DumpLogClient interface {
424 Recv() (*LogDetails, error)
427 type serviceClient_DumpLogClient struct {
431 func (c *serviceClient_DumpLogClient) Recv() (*LogDetails, error) {
433 stop, err := c.MultiRequestCtx.ReceiveReply(m)
443 func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
444 out := new(AddNodeNextReply)
445 err := c.ch.SendRequest(in).ReceiveReply(out)
452 func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
454 err := c.ch.SendRequest(in).ReceiveReply(out)
461 func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
462 out := new(CliInbandReply)
463 err := c.ch.SendRequest(in).ReceiveReply(out)
470 func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
471 out := new(ControlPingReply)
472 err := c.ch.SendRequest(in).ReceiveReply(out)
479 func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
480 out := new(GetF64EndianValueReply)
481 err := c.ch.SendRequest(in).ReceiveReply(out)
488 func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
489 out := new(GetF64IncrementByOneReply)
490 err := c.ch.SendRequest(in).ReceiveReply(out)
497 func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
498 out := new(GetNextIndexReply)
499 err := c.ch.SendRequest(in).ReceiveReply(out)
506 func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
507 out := new(GetNodeGraphReply)
508 err := c.ch.SendRequest(in).ReceiveReply(out)
515 func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
516 out := new(GetNodeIndexReply)
517 err := c.ch.SendRequest(in).ReceiveReply(out)
524 func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
525 out := new(ShowThreadsReply)
526 err := c.ch.SendRequest(in).ReceiveReply(out)
533 func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
534 out := new(ShowVersionReply)
535 err := c.ch.SendRequest(in).ReceiveReply(out)
542 func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
543 out := new(ShowVpeSystemTimeReply)
544 err := c.ch.SendRequest(in).ReceiveReply(out)
551 // This is a compile-time assertion to ensure that this generated file
552 // is compatible with the GoVPP api package it is being compiled against.
553 // A compilation error at this line likely means your copy of the
554 // GoVPP api package needs to be updated.
555 const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
557 // Reference imports to suppress errors if they are not otherwise used.
558 var _ = api.RegisterMessage
559 var _ = bytes.NewBuffer
560 var _ = context.Background