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