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.
22 api "git.fd.io/govpp.git/api"
23 struc "github.com/lunixbochs/struc"
25 vpe_types "git.fd.io/govpp.git/examples/binapi/vpe_types"
29 // ModuleName is the name of this module.
31 // APIVersion is the API version of this module.
33 // VersionCrc is the CRC of this module.
34 VersionCrc = 0xc6c0bcf6
37 type LogLevel = vpe_types.LogLevel
39 type Timedelta = vpe_types.Timedelta
41 type Timestamp = vpe_types.Timestamp
43 // ThreadData represents VPP binary API type 'thread_data'.
44 type ThreadData struct {
46 Name []byte `struc:"[64]byte"`
47 Type []byte `struc:"[64]byte"`
54 func (*ThreadData) GetTypeName() string { return "thread_data" }
56 type Version = vpe_types.Version
58 // AddNodeNext represents VPP binary API message 'add_node_next'.
59 type AddNodeNext struct {
60 NodeName []byte `struc:"[64]byte"`
61 NextName []byte `struc:"[64]byte"`
64 func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
65 func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
66 func (*AddNodeNext) GetCrcString() string { return "9ab92f7a" }
67 func (*AddNodeNext) GetMessageType() api.MessageType { return api.RequestMessage }
69 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply'.
70 type AddNodeNextReply struct {
75 func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
76 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
77 func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
78 func (*AddNodeNextReply) GetMessageType() api.MessageType { return api.ReplyMessage }
80 // Cli represents VPP binary API message 'cli'.
85 func (m *Cli) Reset() { *m = Cli{} }
86 func (*Cli) GetMessageName() string { return "cli" }
87 func (*Cli) GetCrcString() string { return "23bfbfff" }
88 func (*Cli) GetMessageType() api.MessageType { return api.RequestMessage }
90 // CliInband represents VPP binary API message 'cli_inband'.
91 type CliInband struct {
92 XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
96 func (m *CliInband) Reset() { *m = CliInband{} }
97 func (*CliInband) GetMessageName() string { return "cli_inband" }
98 func (*CliInband) GetCrcString() string { return "f8377302" }
99 func (*CliInband) GetMessageType() api.MessageType { return api.RequestMessage }
101 // CliInbandReply represents VPP binary API message 'cli_inband_reply'.
102 type CliInbandReply struct {
104 XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
108 func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
109 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
110 func (*CliInbandReply) GetCrcString() string { return "05879051" }
111 func (*CliInbandReply) GetMessageType() api.MessageType { return api.ReplyMessage }
113 // CliReply represents VPP binary API message 'cli_reply'.
114 type CliReply struct {
119 func (m *CliReply) Reset() { *m = CliReply{} }
120 func (*CliReply) GetMessageName() string { return "cli_reply" }
121 func (*CliReply) GetCrcString() string { return "06d68297" }
122 func (*CliReply) GetMessageType() api.MessageType { return api.ReplyMessage }
124 // ControlPing represents VPP binary API message 'control_ping'.
125 type ControlPing struct{}
127 func (m *ControlPing) Reset() { *m = ControlPing{} }
128 func (*ControlPing) GetMessageName() string { return "control_ping" }
129 func (*ControlPing) GetCrcString() string { return "51077d14" }
130 func (*ControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
132 // ControlPingReply represents VPP binary API message 'control_ping_reply'.
133 type ControlPingReply struct {
139 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
140 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
141 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
142 func (*ControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
144 // GetF64EndianValue represents VPP binary API message 'get_f64_endian_value'.
145 type GetF64EndianValue struct {
149 func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
150 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
151 func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
152 func (*GetF64EndianValue) GetMessageType() api.MessageType { return api.RequestMessage }
154 // GetF64EndianValueReply represents VPP binary API message 'get_f64_endian_value_reply'.
155 type GetF64EndianValueReply struct {
160 func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
161 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
162 func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
163 func (*GetF64EndianValueReply) GetMessageType() api.MessageType { return api.ReplyMessage }
165 // GetF64IncrementByOne represents VPP binary API message 'get_f64_increment_by_one'.
166 type GetF64IncrementByOne struct {
170 func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
171 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
172 func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
173 func (*GetF64IncrementByOne) GetMessageType() api.MessageType { return api.RequestMessage }
175 // GetF64IncrementByOneReply represents VPP binary API message 'get_f64_increment_by_one_reply'.
176 type GetF64IncrementByOneReply struct {
181 func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
182 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
183 func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
184 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType { return api.ReplyMessage }
186 // GetNextIndex represents VPP binary API message 'get_next_index'.
187 type GetNextIndex struct {
188 NodeName []byte `struc:"[64]byte"`
189 NextName []byte `struc:"[64]byte"`
192 func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
193 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
194 func (*GetNextIndex) GetCrcString() string { return "9ab92f7a" }
195 func (*GetNextIndex) GetMessageType() api.MessageType { return api.RequestMessage }
197 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply'.
198 type GetNextIndexReply struct {
203 func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
204 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
205 func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
206 func (*GetNextIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
208 // GetNodeGraph represents VPP binary API message 'get_node_graph'.
209 type GetNodeGraph struct{}
211 func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
212 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
213 func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
214 func (*GetNodeGraph) GetMessageType() api.MessageType { return api.RequestMessage }
216 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply'.
217 type GetNodeGraphReply struct {
222 func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
223 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
224 func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
225 func (*GetNodeGraphReply) GetMessageType() api.MessageType { return api.ReplyMessage }
227 // GetNodeIndex represents VPP binary API message 'get_node_index'.
228 type GetNodeIndex struct {
229 NodeName []byte `struc:"[64]byte"`
232 func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
233 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
234 func (*GetNodeIndex) GetCrcString() string { return "6c9a495d" }
235 func (*GetNodeIndex) GetMessageType() api.MessageType { return api.RequestMessage }
237 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply'.
238 type GetNodeIndexReply struct {
243 func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
244 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
245 func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
246 func (*GetNodeIndexReply) GetMessageType() api.MessageType { return api.ReplyMessage }
248 // LogDetails represents VPP binary API message 'log_details'.
249 type LogDetails struct {
252 MsgClass string `struc:"[32]byte"`
253 Message string `struc:"[256]byte"`
256 func (m *LogDetails) Reset() { *m = LogDetails{} }
257 func (*LogDetails) GetMessageName() string { return "log_details" }
258 func (*LogDetails) GetCrcString() string { return "255827a1" }
259 func (*LogDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
261 // LogDump represents VPP binary API message 'log_dump'.
262 type LogDump struct {
263 StartTimestamp Timestamp
266 func (m *LogDump) Reset() { *m = LogDump{} }
267 func (*LogDump) GetMessageName() string { return "log_dump" }
268 func (*LogDump) GetCrcString() string { return "6ab31753" }
269 func (*LogDump) GetMessageType() api.MessageType { return api.RequestMessage }
271 // ShowThreads represents VPP binary API message 'show_threads'.
272 type ShowThreads struct{}
274 func (m *ShowThreads) Reset() { *m = ShowThreads{} }
275 func (*ShowThreads) GetMessageName() string { return "show_threads" }
276 func (*ShowThreads) GetCrcString() string { return "51077d14" }
277 func (*ShowThreads) GetMessageType() api.MessageType { return api.RequestMessage }
279 // ShowThreadsReply represents VPP binary API message 'show_threads_reply'.
280 type ShowThreadsReply struct {
282 Count uint32 `struc:"sizeof=ThreadData"`
283 ThreadData []ThreadData
286 func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
287 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
288 func (*ShowThreadsReply) GetCrcString() string { return "f5e0b66f" }
289 func (*ShowThreadsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
291 // ShowVersion represents VPP binary API message 'show_version'.
292 type ShowVersion struct{}
294 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
295 func (*ShowVersion) GetMessageName() string { return "show_version" }
296 func (*ShowVersion) GetCrcString() string { return "51077d14" }
297 func (*ShowVersion) GetMessageType() api.MessageType { return api.RequestMessage }
299 // ShowVersionReply represents VPP binary API message 'show_version_reply'.
300 type ShowVersionReply struct {
302 Program string `struc:"[32]byte"`
303 Version string `struc:"[32]byte"`
304 BuildDate string `struc:"[32]byte"`
305 BuildDirectory string `struc:"[256]byte"`
308 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
309 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
310 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
311 func (*ShowVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage }
313 // ShowVpeSystemTime represents VPP binary API message 'show_vpe_system_time'.
314 type ShowVpeSystemTime struct{}
316 func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
317 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
318 func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
319 func (*ShowVpeSystemTime) GetMessageType() api.MessageType { return api.RequestMessage }
321 // ShowVpeSystemTimeReply represents VPP binary API message 'show_vpe_system_time_reply'.
322 type ShowVpeSystemTimeReply struct {
324 VpeSystemTime Timestamp
327 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
328 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
329 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
330 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType { return api.ReplyMessage }
333 api.RegisterMessage((*AddNodeNext)(nil), "vpe.AddNodeNext")
334 api.RegisterMessage((*AddNodeNextReply)(nil), "vpe.AddNodeNextReply")
335 api.RegisterMessage((*Cli)(nil), "vpe.Cli")
336 api.RegisterMessage((*CliInband)(nil), "vpe.CliInband")
337 api.RegisterMessage((*CliInbandReply)(nil), "vpe.CliInbandReply")
338 api.RegisterMessage((*CliReply)(nil), "vpe.CliReply")
339 api.RegisterMessage((*ControlPing)(nil), "vpe.ControlPing")
340 api.RegisterMessage((*ControlPingReply)(nil), "vpe.ControlPingReply")
341 api.RegisterMessage((*GetF64EndianValue)(nil), "vpe.GetF64EndianValue")
342 api.RegisterMessage((*GetF64EndianValueReply)(nil), "vpe.GetF64EndianValueReply")
343 api.RegisterMessage((*GetF64IncrementByOne)(nil), "vpe.GetF64IncrementByOne")
344 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "vpe.GetF64IncrementByOneReply")
345 api.RegisterMessage((*GetNextIndex)(nil), "vpe.GetNextIndex")
346 api.RegisterMessage((*GetNextIndexReply)(nil), "vpe.GetNextIndexReply")
347 api.RegisterMessage((*GetNodeGraph)(nil), "vpe.GetNodeGraph")
348 api.RegisterMessage((*GetNodeGraphReply)(nil), "vpe.GetNodeGraphReply")
349 api.RegisterMessage((*GetNodeIndex)(nil), "vpe.GetNodeIndex")
350 api.RegisterMessage((*GetNodeIndexReply)(nil), "vpe.GetNodeIndexReply")
351 api.RegisterMessage((*LogDetails)(nil), "vpe.LogDetails")
352 api.RegisterMessage((*LogDump)(nil), "vpe.LogDump")
353 api.RegisterMessage((*ShowThreads)(nil), "vpe.ShowThreads")
354 api.RegisterMessage((*ShowThreadsReply)(nil), "vpe.ShowThreadsReply")
355 api.RegisterMessage((*ShowVersion)(nil), "vpe.ShowVersion")
356 api.RegisterMessage((*ShowVersionReply)(nil), "vpe.ShowVersionReply")
357 api.RegisterMessage((*ShowVpeSystemTime)(nil), "vpe.ShowVpeSystemTime")
358 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "vpe.ShowVpeSystemTimeReply")
361 // Messages returns list of all messages in this module.
362 func AllMessages() []api.Message {
363 return []api.Message{
365 (*AddNodeNextReply)(nil),
368 (*CliInbandReply)(nil),
371 (*ControlPingReply)(nil),
372 (*GetF64EndianValue)(nil),
373 (*GetF64EndianValueReply)(nil),
374 (*GetF64IncrementByOne)(nil),
375 (*GetF64IncrementByOneReply)(nil),
376 (*GetNextIndex)(nil),
377 (*GetNextIndexReply)(nil),
378 (*GetNodeGraph)(nil),
379 (*GetNodeGraphReply)(nil),
380 (*GetNodeIndex)(nil),
381 (*GetNodeIndexReply)(nil),
385 (*ShowThreadsReply)(nil),
387 (*ShowVersionReply)(nil),
388 (*ShowVpeSystemTime)(nil),
389 (*ShowVpeSystemTimeReply)(nil),
393 // RPCService represents RPC service API for vpe module.
394 type RPCService interface {
395 DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error)
396 AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
397 Cli(ctx context.Context, in *Cli) (*CliReply, error)
398 CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
399 ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
400 GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
401 GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
402 GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
403 GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
404 GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
405 ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
406 ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
407 ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
410 type serviceClient struct {
414 func NewServiceClient(ch api.Channel) RPCService {
415 return &serviceClient{ch}
418 func (c *serviceClient) DumpLog(ctx context.Context, in *LogDump) (RPCService_DumpLogClient, error) {
419 stream := c.ch.SendMultiRequest(in)
420 x := &serviceClient_DumpLogClient{stream}
424 type RPCService_DumpLogClient interface {
425 Recv() (*LogDetails, error)
428 type serviceClient_DumpLogClient struct {
432 func (c *serviceClient_DumpLogClient) Recv() (*LogDetails, error) {
434 stop, err := c.MultiRequestCtx.ReceiveReply(m)
444 func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
445 out := new(AddNodeNextReply)
446 err := c.ch.SendRequest(in).ReceiveReply(out)
453 func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
455 err := c.ch.SendRequest(in).ReceiveReply(out)
462 func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
463 out := new(CliInbandReply)
464 err := c.ch.SendRequest(in).ReceiveReply(out)
471 func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
472 out := new(ControlPingReply)
473 err := c.ch.SendRequest(in).ReceiveReply(out)
480 func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
481 out := new(GetF64EndianValueReply)
482 err := c.ch.SendRequest(in).ReceiveReply(out)
489 func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
490 out := new(GetF64IncrementByOneReply)
491 err := c.ch.SendRequest(in).ReceiveReply(out)
498 func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
499 out := new(GetNextIndexReply)
500 err := c.ch.SendRequest(in).ReceiveReply(out)
507 func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
508 out := new(GetNodeGraphReply)
509 err := c.ch.SendRequest(in).ReceiveReply(out)
516 func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
517 out := new(GetNodeIndexReply)
518 err := c.ch.SendRequest(in).ReceiveReply(out)
525 func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
526 out := new(ShowThreadsReply)
527 err := c.ch.SendRequest(in).ReceiveReply(out)
534 func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
535 out := new(ShowVersionReply)
536 err := c.ch.SendRequest(in).ReceiveReply(out)
543 func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
544 out := new(ShowVpeSystemTimeReply)
545 err := c.ch.SendRequest(in).ReceiveReply(out)
552 // This is a compile-time assertion to ensure that this generated file
553 // is compatible with the GoVPP api package it is being compiled against.
554 // A compilation error at this line likely means your copy of the
555 // GoVPP api package needs to be updated.
556 const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
558 // Reference imports to suppress errors if they are not otherwise used.
559 var _ = api.RegisterMessage
560 var _ = bytes.NewBuffer
561 var _ = context.Background