594f0c4b49fb18fb6c2852108c250698ae3bd467
[govpp.git] / binapi / vpe / vpe.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package vpe contains generated bindings for API file vpe.api.
7 //
8 // Contents:
9 //   1 struct
10 //  26 messages
11 //
12 package vpe
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         vpe_types "git.fd.io/govpp.git/binapi/vpe_types"
17         codec "git.fd.io/govpp.git/codec"
18 )
19
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
25
26 const (
27         APIFile    = "vpe"
28         APIVersion = "1.6.1"
29         VersionCrc = 0xbd2c94f4
30 )
31
32 // ThreadData defines type 'thread_data'.
33 type ThreadData struct {
34         ID        uint32 `binapi:"u32,name=id" json:"id,omitempty"`
35         Name      string `binapi:"string[64],name=name" json:"name,omitempty"`
36         Type      string `binapi:"string[64],name=type" json:"type,omitempty"`
37         PID       uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
38         CPUID     uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
39         Core      uint32 `binapi:"u32,name=core" json:"core,omitempty"`
40         CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
41 }
42
43 // AddNodeNext defines message 'add_node_next'.
44 type AddNodeNext struct {
45         NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
46         NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
47 }
48
49 func (m *AddNodeNext) Reset()               { *m = AddNodeNext{} }
50 func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
51 func (*AddNodeNext) GetCrcString() string   { return "2457116d" }
52 func (*AddNodeNext) GetMessageType() api.MessageType {
53         return api.RequestMessage
54 }
55
56 func (m *AddNodeNext) Size() (size int) {
57         if m == nil {
58                 return 0
59         }
60         size += 64 // m.NodeName
61         size += 64 // m.NextName
62         return size
63 }
64 func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
65         if b == nil {
66                 b = make([]byte, m.Size())
67         }
68         buf := codec.NewBuffer(b)
69         buf.EncodeString(m.NodeName, 64)
70         buf.EncodeString(m.NextName, 64)
71         return buf.Bytes(), nil
72 }
73 func (m *AddNodeNext) Unmarshal(b []byte) error {
74         buf := codec.NewBuffer(b)
75         m.NodeName = buf.DecodeString(64)
76         m.NextName = buf.DecodeString(64)
77         return nil
78 }
79
80 // AddNodeNextReply defines message 'add_node_next_reply'.
81 type AddNodeNextReply struct {
82         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
83         NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
84 }
85
86 func (m *AddNodeNextReply) Reset()               { *m = AddNodeNextReply{} }
87 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
88 func (*AddNodeNextReply) GetCrcString() string   { return "2ed75f32" }
89 func (*AddNodeNextReply) GetMessageType() api.MessageType {
90         return api.ReplyMessage
91 }
92
93 func (m *AddNodeNextReply) Size() (size int) {
94         if m == nil {
95                 return 0
96         }
97         size += 4 // m.Retval
98         size += 4 // m.NextIndex
99         return size
100 }
101 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
102         if b == nil {
103                 b = make([]byte, m.Size())
104         }
105         buf := codec.NewBuffer(b)
106         buf.EncodeInt32(m.Retval)
107         buf.EncodeUint32(m.NextIndex)
108         return buf.Bytes(), nil
109 }
110 func (m *AddNodeNextReply) Unmarshal(b []byte) error {
111         buf := codec.NewBuffer(b)
112         m.Retval = buf.DecodeInt32()
113         m.NextIndex = buf.DecodeUint32()
114         return nil
115 }
116
117 // Cli defines message 'cli'.
118 type Cli struct {
119         CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
120 }
121
122 func (m *Cli) Reset()               { *m = Cli{} }
123 func (*Cli) GetMessageName() string { return "cli" }
124 func (*Cli) GetCrcString() string   { return "23bfbfff" }
125 func (*Cli) GetMessageType() api.MessageType {
126         return api.RequestMessage
127 }
128
129 func (m *Cli) Size() (size int) {
130         if m == nil {
131                 return 0
132         }
133         size += 8 // m.CmdInShmem
134         return size
135 }
136 func (m *Cli) Marshal(b []byte) ([]byte, error) {
137         if b == nil {
138                 b = make([]byte, m.Size())
139         }
140         buf := codec.NewBuffer(b)
141         buf.EncodeUint64(m.CmdInShmem)
142         return buf.Bytes(), nil
143 }
144 func (m *Cli) Unmarshal(b []byte) error {
145         buf := codec.NewBuffer(b)
146         m.CmdInShmem = buf.DecodeUint64()
147         return nil
148 }
149
150 // CliInband defines message 'cli_inband'.
151 type CliInband struct {
152         Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
153 }
154
155 func (m *CliInband) Reset()               { *m = CliInband{} }
156 func (*CliInband) GetMessageName() string { return "cli_inband" }
157 func (*CliInband) GetCrcString() string   { return "f8377302" }
158 func (*CliInband) GetMessageType() api.MessageType {
159         return api.RequestMessage
160 }
161
162 func (m *CliInband) Size() (size int) {
163         if m == nil {
164                 return 0
165         }
166         size += 4 + len(m.Cmd) // m.Cmd
167         return size
168 }
169 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
170         if b == nil {
171                 b = make([]byte, m.Size())
172         }
173         buf := codec.NewBuffer(b)
174         buf.EncodeString(m.Cmd, 0)
175         return buf.Bytes(), nil
176 }
177 func (m *CliInband) Unmarshal(b []byte) error {
178         buf := codec.NewBuffer(b)
179         m.Cmd = buf.DecodeString(0)
180         return nil
181 }
182
183 // CliInbandReply defines message 'cli_inband_reply'.
184 type CliInbandReply struct {
185         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
186         Reply  string `binapi:"string[],name=reply" json:"reply,omitempty"`
187 }
188
189 func (m *CliInbandReply) Reset()               { *m = CliInbandReply{} }
190 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
191 func (*CliInbandReply) GetCrcString() string   { return "05879051" }
192 func (*CliInbandReply) GetMessageType() api.MessageType {
193         return api.ReplyMessage
194 }
195
196 func (m *CliInbandReply) Size() (size int) {
197         if m == nil {
198                 return 0
199         }
200         size += 4                // m.Retval
201         size += 4 + len(m.Reply) // m.Reply
202         return size
203 }
204 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
205         if b == nil {
206                 b = make([]byte, m.Size())
207         }
208         buf := codec.NewBuffer(b)
209         buf.EncodeInt32(m.Retval)
210         buf.EncodeString(m.Reply, 0)
211         return buf.Bytes(), nil
212 }
213 func (m *CliInbandReply) Unmarshal(b []byte) error {
214         buf := codec.NewBuffer(b)
215         m.Retval = buf.DecodeInt32()
216         m.Reply = buf.DecodeString(0)
217         return nil
218 }
219
220 // CliReply defines message 'cli_reply'.
221 type CliReply struct {
222         Retval       int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
223         ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
224 }
225
226 func (m *CliReply) Reset()               { *m = CliReply{} }
227 func (*CliReply) GetMessageName() string { return "cli_reply" }
228 func (*CliReply) GetCrcString() string   { return "06d68297" }
229 func (*CliReply) GetMessageType() api.MessageType {
230         return api.ReplyMessage
231 }
232
233 func (m *CliReply) Size() (size int) {
234         if m == nil {
235                 return 0
236         }
237         size += 4 // m.Retval
238         size += 8 // m.ReplyInShmem
239         return size
240 }
241 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
242         if b == nil {
243                 b = make([]byte, m.Size())
244         }
245         buf := codec.NewBuffer(b)
246         buf.EncodeInt32(m.Retval)
247         buf.EncodeUint64(m.ReplyInShmem)
248         return buf.Bytes(), nil
249 }
250 func (m *CliReply) Unmarshal(b []byte) error {
251         buf := codec.NewBuffer(b)
252         m.Retval = buf.DecodeInt32()
253         m.ReplyInShmem = buf.DecodeUint64()
254         return nil
255 }
256
257 // ControlPing defines message 'control_ping'.
258 type ControlPing struct{}
259
260 func (m *ControlPing) Reset()               { *m = ControlPing{} }
261 func (*ControlPing) GetMessageName() string { return "control_ping" }
262 func (*ControlPing) GetCrcString() string   { return "51077d14" }
263 func (*ControlPing) GetMessageType() api.MessageType {
264         return api.RequestMessage
265 }
266
267 func (m *ControlPing) Size() (size int) {
268         if m == nil {
269                 return 0
270         }
271         return size
272 }
273 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
274         if b == nil {
275                 b = make([]byte, m.Size())
276         }
277         buf := codec.NewBuffer(b)
278         return buf.Bytes(), nil
279 }
280 func (m *ControlPing) Unmarshal(b []byte) error {
281         return nil
282 }
283
284 // ControlPingReply defines message 'control_ping_reply'.
285 type ControlPingReply struct {
286         Retval      int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
287         ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
288         VpePID      uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
289 }
290
291 func (m *ControlPingReply) Reset()               { *m = ControlPingReply{} }
292 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
293 func (*ControlPingReply) GetCrcString() string   { return "f6b0b8ca" }
294 func (*ControlPingReply) GetMessageType() api.MessageType {
295         return api.ReplyMessage
296 }
297
298 func (m *ControlPingReply) Size() (size int) {
299         if m == nil {
300                 return 0
301         }
302         size += 4 // m.Retval
303         size += 4 // m.ClientIndex
304         size += 4 // m.VpePID
305         return size
306 }
307 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
308         if b == nil {
309                 b = make([]byte, m.Size())
310         }
311         buf := codec.NewBuffer(b)
312         buf.EncodeInt32(m.Retval)
313         buf.EncodeUint32(m.ClientIndex)
314         buf.EncodeUint32(m.VpePID)
315         return buf.Bytes(), nil
316 }
317 func (m *ControlPingReply) Unmarshal(b []byte) error {
318         buf := codec.NewBuffer(b)
319         m.Retval = buf.DecodeInt32()
320         m.ClientIndex = buf.DecodeUint32()
321         m.VpePID = buf.DecodeUint32()
322         return nil
323 }
324
325 // GetF64EndianValue defines message 'get_f64_endian_value'.
326 type GetF64EndianValue struct {
327         F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
328 }
329
330 func (m *GetF64EndianValue) Reset()               { *m = GetF64EndianValue{} }
331 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
332 func (*GetF64EndianValue) GetCrcString() string   { return "809fcd44" }
333 func (*GetF64EndianValue) GetMessageType() api.MessageType {
334         return api.RequestMessage
335 }
336
337 func (m *GetF64EndianValue) Size() (size int) {
338         if m == nil {
339                 return 0
340         }
341         size += 8 // m.F64One
342         return size
343 }
344 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
345         if b == nil {
346                 b = make([]byte, m.Size())
347         }
348         buf := codec.NewBuffer(b)
349         buf.EncodeFloat64(m.F64One)
350         return buf.Bytes(), nil
351 }
352 func (m *GetF64EndianValue) Unmarshal(b []byte) error {
353         buf := codec.NewBuffer(b)
354         m.F64One = buf.DecodeFloat64()
355         return nil
356 }
357
358 // GetF64EndianValueReply defines message 'get_f64_endian_value_reply'.
359 type GetF64EndianValueReply struct {
360         Retval       uint32  `binapi:"u32,name=retval" json:"retval,omitempty"`
361         F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
362 }
363
364 func (m *GetF64EndianValueReply) Reset()               { *m = GetF64EndianValueReply{} }
365 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
366 func (*GetF64EndianValueReply) GetCrcString() string   { return "7e02e404" }
367 func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
368         return api.ReplyMessage
369 }
370
371 func (m *GetF64EndianValueReply) Size() (size int) {
372         if m == nil {
373                 return 0
374         }
375         size += 4 // m.Retval
376         size += 8 // m.F64OneResult
377         return size
378 }
379 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
380         if b == nil {
381                 b = make([]byte, m.Size())
382         }
383         buf := codec.NewBuffer(b)
384         buf.EncodeUint32(m.Retval)
385         buf.EncodeFloat64(m.F64OneResult)
386         return buf.Bytes(), nil
387 }
388 func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
389         buf := codec.NewBuffer(b)
390         m.Retval = buf.DecodeUint32()
391         m.F64OneResult = buf.DecodeFloat64()
392         return nil
393 }
394
395 // GetF64IncrementByOne defines message 'get_f64_increment_by_one'.
396 type GetF64IncrementByOne struct {
397         F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
398 }
399
400 func (m *GetF64IncrementByOne) Reset()               { *m = GetF64IncrementByOne{} }
401 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
402 func (*GetF64IncrementByOne) GetCrcString() string   { return "b64f027e" }
403 func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
404         return api.RequestMessage
405 }
406
407 func (m *GetF64IncrementByOne) Size() (size int) {
408         if m == nil {
409                 return 0
410         }
411         size += 8 // m.F64Value
412         return size
413 }
414 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
415         if b == nil {
416                 b = make([]byte, m.Size())
417         }
418         buf := codec.NewBuffer(b)
419         buf.EncodeFloat64(m.F64Value)
420         return buf.Bytes(), nil
421 }
422 func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
423         buf := codec.NewBuffer(b)
424         m.F64Value = buf.DecodeFloat64()
425         return nil
426 }
427
428 // GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'.
429 type GetF64IncrementByOneReply struct {
430         Retval   uint32  `binapi:"u32,name=retval" json:"retval,omitempty"`
431         F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
432 }
433
434 func (m *GetF64IncrementByOneReply) Reset()               { *m = GetF64IncrementByOneReply{} }
435 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
436 func (*GetF64IncrementByOneReply) GetCrcString() string   { return "d25dbaa3" }
437 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
438         return api.ReplyMessage
439 }
440
441 func (m *GetF64IncrementByOneReply) Size() (size int) {
442         if m == nil {
443                 return 0
444         }
445         size += 4 // m.Retval
446         size += 8 // m.F64Value
447         return size
448 }
449 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
450         if b == nil {
451                 b = make([]byte, m.Size())
452         }
453         buf := codec.NewBuffer(b)
454         buf.EncodeUint32(m.Retval)
455         buf.EncodeFloat64(m.F64Value)
456         return buf.Bytes(), nil
457 }
458 func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
459         buf := codec.NewBuffer(b)
460         m.Retval = buf.DecodeUint32()
461         m.F64Value = buf.DecodeFloat64()
462         return nil
463 }
464
465 // GetNextIndex defines message 'get_next_index'.
466 type GetNextIndex struct {
467         NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
468         NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
469 }
470
471 func (m *GetNextIndex) Reset()               { *m = GetNextIndex{} }
472 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
473 func (*GetNextIndex) GetCrcString() string   { return "2457116d" }
474 func (*GetNextIndex) GetMessageType() api.MessageType {
475         return api.RequestMessage
476 }
477
478 func (m *GetNextIndex) Size() (size int) {
479         if m == nil {
480                 return 0
481         }
482         size += 64 // m.NodeName
483         size += 64 // m.NextName
484         return size
485 }
486 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
487         if b == nil {
488                 b = make([]byte, m.Size())
489         }
490         buf := codec.NewBuffer(b)
491         buf.EncodeString(m.NodeName, 64)
492         buf.EncodeString(m.NextName, 64)
493         return buf.Bytes(), nil
494 }
495 func (m *GetNextIndex) Unmarshal(b []byte) error {
496         buf := codec.NewBuffer(b)
497         m.NodeName = buf.DecodeString(64)
498         m.NextName = buf.DecodeString(64)
499         return nil
500 }
501
502 // GetNextIndexReply defines message 'get_next_index_reply'.
503 type GetNextIndexReply struct {
504         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
505         NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
506 }
507
508 func (m *GetNextIndexReply) Reset()               { *m = GetNextIndexReply{} }
509 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
510 func (*GetNextIndexReply) GetCrcString() string   { return "2ed75f32" }
511 func (*GetNextIndexReply) GetMessageType() api.MessageType {
512         return api.ReplyMessage
513 }
514
515 func (m *GetNextIndexReply) Size() (size int) {
516         if m == nil {
517                 return 0
518         }
519         size += 4 // m.Retval
520         size += 4 // m.NextIndex
521         return size
522 }
523 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
524         if b == nil {
525                 b = make([]byte, m.Size())
526         }
527         buf := codec.NewBuffer(b)
528         buf.EncodeInt32(m.Retval)
529         buf.EncodeUint32(m.NextIndex)
530         return buf.Bytes(), nil
531 }
532 func (m *GetNextIndexReply) Unmarshal(b []byte) error {
533         buf := codec.NewBuffer(b)
534         m.Retval = buf.DecodeInt32()
535         m.NextIndex = buf.DecodeUint32()
536         return nil
537 }
538
539 // GetNodeGraph defines message 'get_node_graph'.
540 type GetNodeGraph struct{}
541
542 func (m *GetNodeGraph) Reset()               { *m = GetNodeGraph{} }
543 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
544 func (*GetNodeGraph) GetCrcString() string   { return "51077d14" }
545 func (*GetNodeGraph) GetMessageType() api.MessageType {
546         return api.RequestMessage
547 }
548
549 func (m *GetNodeGraph) Size() (size int) {
550         if m == nil {
551                 return 0
552         }
553         return size
554 }
555 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
556         if b == nil {
557                 b = make([]byte, m.Size())
558         }
559         buf := codec.NewBuffer(b)
560         return buf.Bytes(), nil
561 }
562 func (m *GetNodeGraph) Unmarshal(b []byte) error {
563         return nil
564 }
565
566 // GetNodeGraphReply defines message 'get_node_graph_reply'.
567 type GetNodeGraphReply struct {
568         Retval       int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
569         ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
570 }
571
572 func (m *GetNodeGraphReply) Reset()               { *m = GetNodeGraphReply{} }
573 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
574 func (*GetNodeGraphReply) GetCrcString() string   { return "06d68297" }
575 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
576         return api.ReplyMessage
577 }
578
579 func (m *GetNodeGraphReply) Size() (size int) {
580         if m == nil {
581                 return 0
582         }
583         size += 4 // m.Retval
584         size += 8 // m.ReplyInShmem
585         return size
586 }
587 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
588         if b == nil {
589                 b = make([]byte, m.Size())
590         }
591         buf := codec.NewBuffer(b)
592         buf.EncodeInt32(m.Retval)
593         buf.EncodeUint64(m.ReplyInShmem)
594         return buf.Bytes(), nil
595 }
596 func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
597         buf := codec.NewBuffer(b)
598         m.Retval = buf.DecodeInt32()
599         m.ReplyInShmem = buf.DecodeUint64()
600         return nil
601 }
602
603 // GetNodeIndex defines message 'get_node_index'.
604 type GetNodeIndex struct {
605         NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
606 }
607
608 func (m *GetNodeIndex) Reset()               { *m = GetNodeIndex{} }
609 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
610 func (*GetNodeIndex) GetCrcString() string   { return "f1984c64" }
611 func (*GetNodeIndex) GetMessageType() api.MessageType {
612         return api.RequestMessage
613 }
614
615 func (m *GetNodeIndex) Size() (size int) {
616         if m == nil {
617                 return 0
618         }
619         size += 64 // m.NodeName
620         return size
621 }
622 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
623         if b == nil {
624                 b = make([]byte, m.Size())
625         }
626         buf := codec.NewBuffer(b)
627         buf.EncodeString(m.NodeName, 64)
628         return buf.Bytes(), nil
629 }
630 func (m *GetNodeIndex) Unmarshal(b []byte) error {
631         buf := codec.NewBuffer(b)
632         m.NodeName = buf.DecodeString(64)
633         return nil
634 }
635
636 // GetNodeIndexReply defines message 'get_node_index_reply'.
637 type GetNodeIndexReply struct {
638         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
639         NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
640 }
641
642 func (m *GetNodeIndexReply) Reset()               { *m = GetNodeIndexReply{} }
643 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
644 func (*GetNodeIndexReply) GetCrcString() string   { return "a8600b89" }
645 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
646         return api.ReplyMessage
647 }
648
649 func (m *GetNodeIndexReply) Size() (size int) {
650         if m == nil {
651                 return 0
652         }
653         size += 4 // m.Retval
654         size += 4 // m.NodeIndex
655         return size
656 }
657 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
658         if b == nil {
659                 b = make([]byte, m.Size())
660         }
661         buf := codec.NewBuffer(b)
662         buf.EncodeInt32(m.Retval)
663         buf.EncodeUint32(m.NodeIndex)
664         return buf.Bytes(), nil
665 }
666 func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
667         buf := codec.NewBuffer(b)
668         m.Retval = buf.DecodeInt32()
669         m.NodeIndex = buf.DecodeUint32()
670         return nil
671 }
672
673 // LogDetails defines message 'log_details'.
674 type LogDetails struct {
675         Timestamp vpe_types.Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
676         Level     vpe_types.LogLevel  `binapi:"log_level,name=level" json:"level,omitempty"`
677         MsgClass  string              `binapi:"string[32],name=msg_class" json:"msg_class,omitempty"`
678         Message   string              `binapi:"string[256],name=message" json:"message,omitempty"`
679 }
680
681 func (m *LogDetails) Reset()               { *m = LogDetails{} }
682 func (*LogDetails) GetMessageName() string { return "log_details" }
683 func (*LogDetails) GetCrcString() string   { return "255827a1" }
684 func (*LogDetails) GetMessageType() api.MessageType {
685         return api.ReplyMessage
686 }
687
688 func (m *LogDetails) Size() (size int) {
689         if m == nil {
690                 return 0
691         }
692         size += 8   // m.Timestamp
693         size += 4   // m.Level
694         size += 32  // m.MsgClass
695         size += 256 // m.Message
696         return size
697 }
698 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
699         if b == nil {
700                 b = make([]byte, m.Size())
701         }
702         buf := codec.NewBuffer(b)
703         buf.EncodeFloat64(float64(m.Timestamp))
704         buf.EncodeUint32(uint32(m.Level))
705         buf.EncodeString(m.MsgClass, 32)
706         buf.EncodeString(m.Message, 256)
707         return buf.Bytes(), nil
708 }
709 func (m *LogDetails) Unmarshal(b []byte) error {
710         buf := codec.NewBuffer(b)
711         m.Timestamp = vpe_types.Timestamp(buf.DecodeFloat64())
712         m.Level = vpe_types.LogLevel(buf.DecodeUint32())
713         m.MsgClass = buf.DecodeString(32)
714         m.Message = buf.DecodeString(256)
715         return nil
716 }
717
718 // LogDump defines message 'log_dump'.
719 type LogDump struct {
720         StartTimestamp vpe_types.Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
721 }
722
723 func (m *LogDump) Reset()               { *m = LogDump{} }
724 func (*LogDump) GetMessageName() string { return "log_dump" }
725 func (*LogDump) GetCrcString() string   { return "6ab31753" }
726 func (*LogDump) GetMessageType() api.MessageType {
727         return api.RequestMessage
728 }
729
730 func (m *LogDump) Size() (size int) {
731         if m == nil {
732                 return 0
733         }
734         size += 8 // m.StartTimestamp
735         return size
736 }
737 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
738         if b == nil {
739                 b = make([]byte, m.Size())
740         }
741         buf := codec.NewBuffer(b)
742         buf.EncodeFloat64(float64(m.StartTimestamp))
743         return buf.Bytes(), nil
744 }
745 func (m *LogDump) Unmarshal(b []byte) error {
746         buf := codec.NewBuffer(b)
747         m.StartTimestamp = vpe_types.Timestamp(buf.DecodeFloat64())
748         return nil
749 }
750
751 // ShowThreads defines message 'show_threads'.
752 type ShowThreads struct{}
753
754 func (m *ShowThreads) Reset()               { *m = ShowThreads{} }
755 func (*ShowThreads) GetMessageName() string { return "show_threads" }
756 func (*ShowThreads) GetCrcString() string   { return "51077d14" }
757 func (*ShowThreads) GetMessageType() api.MessageType {
758         return api.RequestMessage
759 }
760
761 func (m *ShowThreads) Size() (size int) {
762         if m == nil {
763                 return 0
764         }
765         return size
766 }
767 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
768         if b == nil {
769                 b = make([]byte, m.Size())
770         }
771         buf := codec.NewBuffer(b)
772         return buf.Bytes(), nil
773 }
774 func (m *ShowThreads) Unmarshal(b []byte) error {
775         return nil
776 }
777
778 // ShowThreadsReply defines message 'show_threads_reply'.
779 type ShowThreadsReply struct {
780         Retval     int32        `binapi:"i32,name=retval" json:"retval,omitempty"`
781         Count      uint32       `binapi:"u32,name=count" json:"-"`
782         ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
783 }
784
785 func (m *ShowThreadsReply) Reset()               { *m = ShowThreadsReply{} }
786 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
787 func (*ShowThreadsReply) GetCrcString() string   { return "efd78e83" }
788 func (*ShowThreadsReply) GetMessageType() api.MessageType {
789         return api.ReplyMessage
790 }
791
792 func (m *ShowThreadsReply) Size() (size int) {
793         if m == nil {
794                 return 0
795         }
796         size += 4 // m.Retval
797         size += 4 // m.Count
798         for j1 := 0; j1 < len(m.ThreadData); j1++ {
799                 var s1 ThreadData
800                 _ = s1
801                 if j1 < len(m.ThreadData) {
802                         s1 = m.ThreadData[j1]
803                 }
804                 size += 4  // s1.ID
805                 size += 64 // s1.Name
806                 size += 64 // s1.Type
807                 size += 4  // s1.PID
808                 size += 4  // s1.CPUID
809                 size += 4  // s1.Core
810                 size += 4  // s1.CPUSocket
811         }
812         return size
813 }
814 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
815         if b == nil {
816                 b = make([]byte, m.Size())
817         }
818         buf := codec.NewBuffer(b)
819         buf.EncodeInt32(m.Retval)
820         buf.EncodeUint32(uint32(len(m.ThreadData)))
821         for j0 := 0; j0 < len(m.ThreadData); j0++ {
822                 var v0 ThreadData // ThreadData
823                 if j0 < len(m.ThreadData) {
824                         v0 = m.ThreadData[j0]
825                 }
826                 buf.EncodeUint32(v0.ID)
827                 buf.EncodeString(v0.Name, 64)
828                 buf.EncodeString(v0.Type, 64)
829                 buf.EncodeUint32(v0.PID)
830                 buf.EncodeUint32(v0.CPUID)
831                 buf.EncodeUint32(v0.Core)
832                 buf.EncodeUint32(v0.CPUSocket)
833         }
834         return buf.Bytes(), nil
835 }
836 func (m *ShowThreadsReply) Unmarshal(b []byte) error {
837         buf := codec.NewBuffer(b)
838         m.Retval = buf.DecodeInt32()
839         m.Count = buf.DecodeUint32()
840         m.ThreadData = make([]ThreadData, m.Count)
841         for j0 := 0; j0 < len(m.ThreadData); j0++ {
842                 m.ThreadData[j0].ID = buf.DecodeUint32()
843                 m.ThreadData[j0].Name = buf.DecodeString(64)
844                 m.ThreadData[j0].Type = buf.DecodeString(64)
845                 m.ThreadData[j0].PID = buf.DecodeUint32()
846                 m.ThreadData[j0].CPUID = buf.DecodeUint32()
847                 m.ThreadData[j0].Core = buf.DecodeUint32()
848                 m.ThreadData[j0].CPUSocket = buf.DecodeUint32()
849         }
850         return nil
851 }
852
853 // ShowVersion defines message 'show_version'.
854 type ShowVersion struct{}
855
856 func (m *ShowVersion) Reset()               { *m = ShowVersion{} }
857 func (*ShowVersion) GetMessageName() string { return "show_version" }
858 func (*ShowVersion) GetCrcString() string   { return "51077d14" }
859 func (*ShowVersion) GetMessageType() api.MessageType {
860         return api.RequestMessage
861 }
862
863 func (m *ShowVersion) Size() (size int) {
864         if m == nil {
865                 return 0
866         }
867         return size
868 }
869 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
870         if b == nil {
871                 b = make([]byte, m.Size())
872         }
873         buf := codec.NewBuffer(b)
874         return buf.Bytes(), nil
875 }
876 func (m *ShowVersion) Unmarshal(b []byte) error {
877         return nil
878 }
879
880 // ShowVersionReply defines message 'show_version_reply'.
881 type ShowVersionReply struct {
882         Retval         int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
883         Program        string `binapi:"string[32],name=program" json:"program,omitempty"`
884         Version        string `binapi:"string[32],name=version" json:"version,omitempty"`
885         BuildDate      string `binapi:"string[32],name=build_date" json:"build_date,omitempty"`
886         BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty"`
887 }
888
889 func (m *ShowVersionReply) Reset()               { *m = ShowVersionReply{} }
890 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
891 func (*ShowVersionReply) GetCrcString() string   { return "c919bde1" }
892 func (*ShowVersionReply) GetMessageType() api.MessageType {
893         return api.ReplyMessage
894 }
895
896 func (m *ShowVersionReply) Size() (size int) {
897         if m == nil {
898                 return 0
899         }
900         size += 4   // m.Retval
901         size += 32  // m.Program
902         size += 32  // m.Version
903         size += 32  // m.BuildDate
904         size += 256 // m.BuildDirectory
905         return size
906 }
907 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
908         if b == nil {
909                 b = make([]byte, m.Size())
910         }
911         buf := codec.NewBuffer(b)
912         buf.EncodeInt32(m.Retval)
913         buf.EncodeString(m.Program, 32)
914         buf.EncodeString(m.Version, 32)
915         buf.EncodeString(m.BuildDate, 32)
916         buf.EncodeString(m.BuildDirectory, 256)
917         return buf.Bytes(), nil
918 }
919 func (m *ShowVersionReply) Unmarshal(b []byte) error {
920         buf := codec.NewBuffer(b)
921         m.Retval = buf.DecodeInt32()
922         m.Program = buf.DecodeString(32)
923         m.Version = buf.DecodeString(32)
924         m.BuildDate = buf.DecodeString(32)
925         m.BuildDirectory = buf.DecodeString(256)
926         return nil
927 }
928
929 // ShowVpeSystemTime defines message 'show_vpe_system_time'.
930 type ShowVpeSystemTime struct{}
931
932 func (m *ShowVpeSystemTime) Reset()               { *m = ShowVpeSystemTime{} }
933 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
934 func (*ShowVpeSystemTime) GetCrcString() string   { return "51077d14" }
935 func (*ShowVpeSystemTime) GetMessageType() api.MessageType {
936         return api.RequestMessage
937 }
938
939 func (m *ShowVpeSystemTime) Size() (size int) {
940         if m == nil {
941                 return 0
942         }
943         return size
944 }
945 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
946         if b == nil {
947                 b = make([]byte, m.Size())
948         }
949         buf := codec.NewBuffer(b)
950         return buf.Bytes(), nil
951 }
952 func (m *ShowVpeSystemTime) Unmarshal(b []byte) error {
953         return nil
954 }
955
956 // ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'.
957 type ShowVpeSystemTimeReply struct {
958         Retval        int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
959         VpeSystemTime vpe_types.Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
960 }
961
962 func (m *ShowVpeSystemTimeReply) Reset()               { *m = ShowVpeSystemTimeReply{} }
963 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
964 func (*ShowVpeSystemTimeReply) GetCrcString() string   { return "7ffd8193" }
965 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
966         return api.ReplyMessage
967 }
968
969 func (m *ShowVpeSystemTimeReply) Size() (size int) {
970         if m == nil {
971                 return 0
972         }
973         size += 4 // m.Retval
974         size += 8 // m.VpeSystemTime
975         return size
976 }
977 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
978         if b == nil {
979                 b = make([]byte, m.Size())
980         }
981         buf := codec.NewBuffer(b)
982         buf.EncodeInt32(m.Retval)
983         buf.EncodeFloat64(float64(m.VpeSystemTime))
984         return buf.Bytes(), nil
985 }
986 func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
987         buf := codec.NewBuffer(b)
988         m.Retval = buf.DecodeInt32()
989         m.VpeSystemTime = vpe_types.Timestamp(buf.DecodeFloat64())
990         return nil
991 }
992
993 func init() { file_vpe_binapi_init() }
994 func file_vpe_binapi_init() {
995         api.RegisterMessage((*AddNodeNext)(nil), "add_node_next_2457116d")
996         api.RegisterMessage((*AddNodeNextReply)(nil), "add_node_next_reply_2ed75f32")
997         api.RegisterMessage((*Cli)(nil), "cli_23bfbfff")
998         api.RegisterMessage((*CliInband)(nil), "cli_inband_f8377302")
999         api.RegisterMessage((*CliInbandReply)(nil), "cli_inband_reply_05879051")
1000         api.RegisterMessage((*CliReply)(nil), "cli_reply_06d68297")
1001         api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14")
1002         api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca")
1003         api.RegisterMessage((*GetF64EndianValue)(nil), "get_f64_endian_value_809fcd44")
1004         api.RegisterMessage((*GetF64EndianValueReply)(nil), "get_f64_endian_value_reply_7e02e404")
1005         api.RegisterMessage((*GetF64IncrementByOne)(nil), "get_f64_increment_by_one_b64f027e")
1006         api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "get_f64_increment_by_one_reply_d25dbaa3")
1007         api.RegisterMessage((*GetNextIndex)(nil), "get_next_index_2457116d")
1008         api.RegisterMessage((*GetNextIndexReply)(nil), "get_next_index_reply_2ed75f32")
1009         api.RegisterMessage((*GetNodeGraph)(nil), "get_node_graph_51077d14")
1010         api.RegisterMessage((*GetNodeGraphReply)(nil), "get_node_graph_reply_06d68297")
1011         api.RegisterMessage((*GetNodeIndex)(nil), "get_node_index_f1984c64")
1012         api.RegisterMessage((*GetNodeIndexReply)(nil), "get_node_index_reply_a8600b89")
1013         api.RegisterMessage((*LogDetails)(nil), "log_details_255827a1")
1014         api.RegisterMessage((*LogDump)(nil), "log_dump_6ab31753")
1015         api.RegisterMessage((*ShowThreads)(nil), "show_threads_51077d14")
1016         api.RegisterMessage((*ShowThreadsReply)(nil), "show_threads_reply_efd78e83")
1017         api.RegisterMessage((*ShowVersion)(nil), "show_version_51077d14")
1018         api.RegisterMessage((*ShowVersionReply)(nil), "show_version_reply_c919bde1")
1019         api.RegisterMessage((*ShowVpeSystemTime)(nil), "show_vpe_system_time_51077d14")
1020         api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "show_vpe_system_time_reply_7ffd8193")
1021 }
1022
1023 // Messages returns list of all messages in this module.
1024 func AllMessages() []api.Message {
1025         return []api.Message{
1026                 (*AddNodeNext)(nil),
1027                 (*AddNodeNextReply)(nil),
1028                 (*Cli)(nil),
1029                 (*CliInband)(nil),
1030                 (*CliInbandReply)(nil),
1031                 (*CliReply)(nil),
1032                 (*ControlPing)(nil),
1033                 (*ControlPingReply)(nil),
1034                 (*GetF64EndianValue)(nil),
1035                 (*GetF64EndianValueReply)(nil),
1036                 (*GetF64IncrementByOne)(nil),
1037                 (*GetF64IncrementByOneReply)(nil),
1038                 (*GetNextIndex)(nil),
1039                 (*GetNextIndexReply)(nil),
1040                 (*GetNodeGraph)(nil),
1041                 (*GetNodeGraphReply)(nil),
1042                 (*GetNodeIndex)(nil),
1043                 (*GetNodeIndexReply)(nil),
1044                 (*LogDetails)(nil),
1045                 (*LogDump)(nil),
1046                 (*ShowThreads)(nil),
1047                 (*ShowThreadsReply)(nil),
1048                 (*ShowVersion)(nil),
1049                 (*ShowVersionReply)(nil),
1050                 (*ShowVpeSystemTime)(nil),
1051                 (*ShowVpeSystemTimeReply)(nil),
1052         }
1053 }