Binary API generator improvements
[govpp.git] / examples / binapi / memclnt / memclnt.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/memclnt.api.json
6
7 /*
8 Package memclnt contains generated code for VPP API file memclnt.api (2.1.0).
9
10 It consists of:
11          22 messages
12           2 types
13 */
14 package memclnt
15
16 import (
17         "bytes"
18         "context"
19         "encoding/binary"
20         "fmt"
21         "io"
22         "math"
23         "net"
24         "strconv"
25         "strings"
26
27         api "git.fd.io/govpp.git/api"
28         codec "git.fd.io/govpp.git/codec"
29         struc "github.com/lunixbochs/struc"
30 )
31
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the GoVPP api package it is being compiled against.
34 // A compilation error at this line likely means your copy of the
35 // GoVPP api package needs to be updated.
36 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
37
38 const (
39         // ModuleName is the name of this module.
40         ModuleName = "memclnt"
41         // APIVersion is the API version of this module.
42         APIVersion = "2.1.0"
43         // VersionCrc is the CRC of this module.
44         VersionCrc = 0x8d3dd881
45 )
46
47 // MessageTableEntry represents VPP binary API type 'message_table_entry'.
48 type MessageTableEntry struct {
49         Index uint16 `binapi:"u16,name=index" json:"index,omitempty"`
50         Name  string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
51 }
52
53 func (*MessageTableEntry) GetTypeName() string { return "message_table_entry" }
54
55 // ModuleVersion represents VPP binary API type 'module_version'.
56 type ModuleVersion struct {
57         Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
58         Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
59         Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
60         Name  string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
61 }
62
63 func (*ModuleVersion) GetTypeName() string { return "module_version" }
64
65 // APIVersions represents VPP binary API message 'api_versions'.
66 type APIVersions struct{}
67
68 func (m *APIVersions) Reset()                        { *m = APIVersions{} }
69 func (*APIVersions) GetMessageName() string          { return "api_versions" }
70 func (*APIVersions) GetCrcString() string            { return "51077d14" }
71 func (*APIVersions) GetMessageType() api.MessageType { return api.RequestMessage }
72
73 func (m *APIVersions) Size() int {
74         if m == nil {
75                 return 0
76         }
77         var size int
78         return size
79 }
80 func (m *APIVersions) Marshal(b []byte) ([]byte, error) {
81         o := binary.BigEndian
82         _ = o
83         pos := 0
84         _ = pos
85         var buf []byte
86         if b == nil {
87                 buf = make([]byte, m.Size())
88         } else {
89                 buf = b
90         }
91         return buf, nil
92 }
93 func (m *APIVersions) Unmarshal(tmp []byte) error {
94         o := binary.BigEndian
95         _ = o
96         pos := 0
97         _ = pos
98         return nil
99 }
100
101 // APIVersionsReply represents VPP binary API message 'api_versions_reply'.
102 type APIVersionsReply struct {
103         Retval      int32           `binapi:"i32,name=retval" json:"retval,omitempty"`
104         Count       uint32          `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=APIVersions"`
105         APIVersions []ModuleVersion `binapi:"module_version[count],name=api_versions" json:"api_versions,omitempty"`
106 }
107
108 func (m *APIVersionsReply) Reset()                        { *m = APIVersionsReply{} }
109 func (*APIVersionsReply) GetMessageName() string          { return "api_versions_reply" }
110 func (*APIVersionsReply) GetCrcString() string            { return "5f0d99d6" }
111 func (*APIVersionsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
112
113 func (m *APIVersionsReply) Size() int {
114         if m == nil {
115                 return 0
116         }
117         var size int
118         // field[1] m.Retval
119         size += 4
120         // field[1] m.Count
121         size += 4
122         // field[1] m.APIVersions
123         for j1 := 0; j1 < len(m.APIVersions); j1++ {
124                 var s1 ModuleVersion
125                 _ = s1
126                 if j1 < len(m.APIVersions) {
127                         s1 = m.APIVersions[j1]
128                 }
129                 // field[2] s1.Major
130                 size += 4
131                 // field[2] s1.Minor
132                 size += 4
133                 // field[2] s1.Patch
134                 size += 4
135                 // field[2] s1.Name
136                 size += 64
137         }
138         return size
139 }
140 func (m *APIVersionsReply) Marshal(b []byte) ([]byte, error) {
141         o := binary.BigEndian
142         _ = o
143         pos := 0
144         _ = pos
145         var buf []byte
146         if b == nil {
147                 buf = make([]byte, m.Size())
148         } else {
149                 buf = b
150         }
151         // field[1] m.Retval
152         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
153         pos += 4
154         // field[1] m.Count
155         o.PutUint32(buf[pos:pos+4], uint32(len(m.APIVersions)))
156         pos += 4
157         // field[1] m.APIVersions
158         for j1 := 0; j1 < len(m.APIVersions); j1++ {
159                 var v1 ModuleVersion
160                 if j1 < len(m.APIVersions) {
161                         v1 = m.APIVersions[j1]
162                 }
163                 // field[2] v1.Major
164                 o.PutUint32(buf[pos:pos+4], uint32(v1.Major))
165                 pos += 4
166                 // field[2] v1.Minor
167                 o.PutUint32(buf[pos:pos+4], uint32(v1.Minor))
168                 pos += 4
169                 // field[2] v1.Patch
170                 o.PutUint32(buf[pos:pos+4], uint32(v1.Patch))
171                 pos += 4
172                 // field[2] v1.Name
173                 copy(buf[pos:pos+64], v1.Name)
174                 pos += 64
175         }
176         return buf, nil
177 }
178 func (m *APIVersionsReply) Unmarshal(tmp []byte) error {
179         o := binary.BigEndian
180         _ = o
181         pos := 0
182         _ = pos
183         // field[1] m.Retval
184         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
185         pos += 4
186         // field[1] m.Count
187         m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
188         pos += 4
189         // field[1] m.APIVersions
190         m.APIVersions = make([]ModuleVersion, int(m.Count))
191         for j1 := 0; j1 < int(m.Count); j1++ {
192                 // field[2] m.APIVersions[j1].Major
193                 m.APIVersions[j1].Major = uint32(o.Uint32(tmp[pos : pos+4]))
194                 pos += 4
195                 // field[2] m.APIVersions[j1].Minor
196                 m.APIVersions[j1].Minor = uint32(o.Uint32(tmp[pos : pos+4]))
197                 pos += 4
198                 // field[2] m.APIVersions[j1].Patch
199                 m.APIVersions[j1].Patch = uint32(o.Uint32(tmp[pos : pos+4]))
200                 pos += 4
201                 // field[2] m.APIVersions[j1].Name
202                 {
203                         nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
204                         m.APIVersions[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
205                         pos += 64
206                 }
207         }
208         return nil
209 }
210
211 // GetFirstMsgID represents VPP binary API message 'get_first_msg_id'.
212 type GetFirstMsgID struct {
213         Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
214 }
215
216 func (m *GetFirstMsgID) Reset()                        { *m = GetFirstMsgID{} }
217 func (*GetFirstMsgID) GetMessageName() string          { return "get_first_msg_id" }
218 func (*GetFirstMsgID) GetCrcString() string            { return "ebf79a66" }
219 func (*GetFirstMsgID) GetMessageType() api.MessageType { return api.RequestMessage }
220
221 func (m *GetFirstMsgID) Size() int {
222         if m == nil {
223                 return 0
224         }
225         var size int
226         // field[1] m.Name
227         size += 64
228         return size
229 }
230 func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) {
231         o := binary.BigEndian
232         _ = o
233         pos := 0
234         _ = pos
235         var buf []byte
236         if b == nil {
237                 buf = make([]byte, m.Size())
238         } else {
239                 buf = b
240         }
241         // field[1] m.Name
242         copy(buf[pos:pos+64], m.Name)
243         pos += 64
244         return buf, nil
245 }
246 func (m *GetFirstMsgID) Unmarshal(tmp []byte) error {
247         o := binary.BigEndian
248         _ = o
249         pos := 0
250         _ = pos
251         // field[1] m.Name
252         {
253                 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
254                 m.Name = codec.DecodeString(tmp[pos : pos+nul])
255                 pos += 64
256         }
257         return nil
258 }
259
260 // GetFirstMsgIDReply represents VPP binary API message 'get_first_msg_id_reply'.
261 type GetFirstMsgIDReply struct {
262         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
263         FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
264 }
265
266 func (m *GetFirstMsgIDReply) Reset()                        { *m = GetFirstMsgIDReply{} }
267 func (*GetFirstMsgIDReply) GetMessageName() string          { return "get_first_msg_id_reply" }
268 func (*GetFirstMsgIDReply) GetCrcString() string            { return "7d337472" }
269 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType { return api.ReplyMessage }
270
271 func (m *GetFirstMsgIDReply) Size() int {
272         if m == nil {
273                 return 0
274         }
275         var size int
276         // field[1] m.Retval
277         size += 4
278         // field[1] m.FirstMsgID
279         size += 2
280         return size
281 }
282 func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) {
283         o := binary.BigEndian
284         _ = o
285         pos := 0
286         _ = pos
287         var buf []byte
288         if b == nil {
289                 buf = make([]byte, m.Size())
290         } else {
291                 buf = b
292         }
293         // field[1] m.Retval
294         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
295         pos += 4
296         // field[1] m.FirstMsgID
297         o.PutUint16(buf[pos:pos+2], uint16(m.FirstMsgID))
298         pos += 2
299         return buf, nil
300 }
301 func (m *GetFirstMsgIDReply) Unmarshal(tmp []byte) error {
302         o := binary.BigEndian
303         _ = o
304         pos := 0
305         _ = pos
306         // field[1] m.Retval
307         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
308         pos += 4
309         // field[1] m.FirstMsgID
310         m.FirstMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
311         pos += 2
312         return nil
313 }
314
315 // MemclntCreate represents VPP binary API message 'memclnt_create'.
316 type MemclntCreate struct {
317         CtxQuota    int32    `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"`
318         InputQueue  uint64   `binapi:"u64,name=input_queue" json:"input_queue,omitempty"`
319         Name        string   `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
320         APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty" struc:"[8]uint32"`
321 }
322
323 func (m *MemclntCreate) Reset()                        { *m = MemclntCreate{} }
324 func (*MemclntCreate) GetMessageName() string          { return "memclnt_create" }
325 func (*MemclntCreate) GetCrcString() string            { return "9c5e1c2f" }
326 func (*MemclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage }
327
328 func (m *MemclntCreate) Size() int {
329         if m == nil {
330                 return 0
331         }
332         var size int
333         // field[1] m.CtxQuota
334         size += 4
335         // field[1] m.InputQueue
336         size += 8
337         // field[1] m.Name
338         size += 64
339         // field[1] m.APIVersions
340         size += 32
341         return size
342 }
343 func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) {
344         o := binary.BigEndian
345         _ = o
346         pos := 0
347         _ = pos
348         var buf []byte
349         if b == nil {
350                 buf = make([]byte, m.Size())
351         } else {
352                 buf = b
353         }
354         // field[1] m.CtxQuota
355         o.PutUint32(buf[pos:pos+4], uint32(m.CtxQuota))
356         pos += 4
357         // field[1] m.InputQueue
358         o.PutUint64(buf[pos:pos+8], uint64(m.InputQueue))
359         pos += 8
360         // field[1] m.Name
361         copy(buf[pos:pos+64], m.Name)
362         pos += 64
363         // field[1] m.APIVersions
364         for i := 0; i < 8; i++ {
365                 var x uint32
366                 if i < len(m.APIVersions) {
367                         x = uint32(m.APIVersions[i])
368                 }
369                 o.PutUint32(buf[pos:pos+4], uint32(x))
370                 pos += 4
371         }
372         return buf, nil
373 }
374 func (m *MemclntCreate) Unmarshal(tmp []byte) error {
375         o := binary.BigEndian
376         _ = o
377         pos := 0
378         _ = pos
379         // field[1] m.CtxQuota
380         m.CtxQuota = int32(o.Uint32(tmp[pos : pos+4]))
381         pos += 4
382         // field[1] m.InputQueue
383         m.InputQueue = uint64(o.Uint64(tmp[pos : pos+8]))
384         pos += 8
385         // field[1] m.Name
386         {
387                 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
388                 m.Name = codec.DecodeString(tmp[pos : pos+nul])
389                 pos += 64
390         }
391         // field[1] m.APIVersions
392         m.APIVersions = make([]uint32, 8)
393         for i := 0; i < len(m.APIVersions); i++ {
394                 m.APIVersions[i] = uint32(o.Uint32(tmp[pos : pos+4]))
395                 pos += 4
396         }
397         return nil
398 }
399
400 // MemclntCreateReply represents VPP binary API message 'memclnt_create_reply'.
401 type MemclntCreateReply struct {
402         Response     int32  `binapi:"i32,name=response" json:"response,omitempty"`
403         Handle       uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
404         Index        uint32 `binapi:"u32,name=index" json:"index,omitempty"`
405         MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"`
406 }
407
408 func (m *MemclntCreateReply) Reset()                        { *m = MemclntCreateReply{} }
409 func (*MemclntCreateReply) GetMessageName() string          { return "memclnt_create_reply" }
410 func (*MemclntCreateReply) GetCrcString() string            { return "42ec4560" }
411 func (*MemclntCreateReply) GetMessageType() api.MessageType { return api.ReplyMessage }
412
413 func (m *MemclntCreateReply) Size() int {
414         if m == nil {
415                 return 0
416         }
417         var size int
418         // field[1] m.Response
419         size += 4
420         // field[1] m.Handle
421         size += 8
422         // field[1] m.Index
423         size += 4
424         // field[1] m.MessageTable
425         size += 8
426         return size
427 }
428 func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) {
429         o := binary.BigEndian
430         _ = o
431         pos := 0
432         _ = pos
433         var buf []byte
434         if b == nil {
435                 buf = make([]byte, m.Size())
436         } else {
437                 buf = b
438         }
439         // field[1] m.Response
440         o.PutUint32(buf[pos:pos+4], uint32(m.Response))
441         pos += 4
442         // field[1] m.Handle
443         o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
444         pos += 8
445         // field[1] m.Index
446         o.PutUint32(buf[pos:pos+4], uint32(m.Index))
447         pos += 4
448         // field[1] m.MessageTable
449         o.PutUint64(buf[pos:pos+8], uint64(m.MessageTable))
450         pos += 8
451         return buf, nil
452 }
453 func (m *MemclntCreateReply) Unmarshal(tmp []byte) error {
454         o := binary.BigEndian
455         _ = o
456         pos := 0
457         _ = pos
458         // field[1] m.Response
459         m.Response = int32(o.Uint32(tmp[pos : pos+4]))
460         pos += 4
461         // field[1] m.Handle
462         m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
463         pos += 8
464         // field[1] m.Index
465         m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
466         pos += 4
467         // field[1] m.MessageTable
468         m.MessageTable = uint64(o.Uint64(tmp[pos : pos+8]))
469         pos += 8
470         return nil
471 }
472
473 // MemclntDelete represents VPP binary API message 'memclnt_delete'.
474 type MemclntDelete struct {
475         Index     uint32 `binapi:"u32,name=index" json:"index,omitempty"`
476         Handle    uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
477         DoCleanup bool   `binapi:"bool,name=do_cleanup" json:"do_cleanup,omitempty"`
478 }
479
480 func (m *MemclntDelete) Reset()                        { *m = MemclntDelete{} }
481 func (*MemclntDelete) GetMessageName() string          { return "memclnt_delete" }
482 func (*MemclntDelete) GetCrcString() string            { return "7e1c04e3" }
483 func (*MemclntDelete) GetMessageType() api.MessageType { return api.OtherMessage }
484
485 func (m *MemclntDelete) Size() int {
486         if m == nil {
487                 return 0
488         }
489         var size int
490         // field[1] m.Index
491         size += 4
492         // field[1] m.Handle
493         size += 8
494         // field[1] m.DoCleanup
495         size += 1
496         return size
497 }
498 func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) {
499         o := binary.BigEndian
500         _ = o
501         pos := 0
502         _ = pos
503         var buf []byte
504         if b == nil {
505                 buf = make([]byte, m.Size())
506         } else {
507                 buf = b
508         }
509         // field[1] m.Index
510         o.PutUint32(buf[pos:pos+4], uint32(m.Index))
511         pos += 4
512         // field[1] m.Handle
513         o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
514         pos += 8
515         // field[1] m.DoCleanup
516         if m.DoCleanup {
517                 buf[pos] = 1
518         }
519         pos += 1
520         return buf, nil
521 }
522 func (m *MemclntDelete) Unmarshal(tmp []byte) error {
523         o := binary.BigEndian
524         _ = o
525         pos := 0
526         _ = pos
527         // field[1] m.Index
528         m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
529         pos += 4
530         // field[1] m.Handle
531         m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
532         pos += 8
533         // field[1] m.DoCleanup
534         m.DoCleanup = tmp[pos] != 0
535         pos += 1
536         return nil
537 }
538
539 // MemclntDeleteReply represents VPP binary API message 'memclnt_delete_reply'.
540 type MemclntDeleteReply struct {
541         Response int32  `binapi:"i32,name=response" json:"response,omitempty"`
542         Handle   uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
543 }
544
545 func (m *MemclntDeleteReply) Reset()                        { *m = MemclntDeleteReply{} }
546 func (*MemclntDeleteReply) GetMessageName() string          { return "memclnt_delete_reply" }
547 func (*MemclntDeleteReply) GetCrcString() string            { return "3d3b6312" }
548 func (*MemclntDeleteReply) GetMessageType() api.MessageType { return api.OtherMessage }
549
550 func (m *MemclntDeleteReply) Size() int {
551         if m == nil {
552                 return 0
553         }
554         var size int
555         // field[1] m.Response
556         size += 4
557         // field[1] m.Handle
558         size += 8
559         return size
560 }
561 func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) {
562         o := binary.BigEndian
563         _ = o
564         pos := 0
565         _ = pos
566         var buf []byte
567         if b == nil {
568                 buf = make([]byte, m.Size())
569         } else {
570                 buf = b
571         }
572         // field[1] m.Response
573         o.PutUint32(buf[pos:pos+4], uint32(m.Response))
574         pos += 4
575         // field[1] m.Handle
576         o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
577         pos += 8
578         return buf, nil
579 }
580 func (m *MemclntDeleteReply) Unmarshal(tmp []byte) error {
581         o := binary.BigEndian
582         _ = o
583         pos := 0
584         _ = pos
585         // field[1] m.Response
586         m.Response = int32(o.Uint32(tmp[pos : pos+4]))
587         pos += 4
588         // field[1] m.Handle
589         m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
590         pos += 8
591         return nil
592 }
593
594 // MemclntKeepalive represents VPP binary API message 'memclnt_keepalive'.
595 type MemclntKeepalive struct{}
596
597 func (m *MemclntKeepalive) Reset()                        { *m = MemclntKeepalive{} }
598 func (*MemclntKeepalive) GetMessageName() string          { return "memclnt_keepalive" }
599 func (*MemclntKeepalive) GetCrcString() string            { return "51077d14" }
600 func (*MemclntKeepalive) GetMessageType() api.MessageType { return api.RequestMessage }
601
602 func (m *MemclntKeepalive) Size() int {
603         if m == nil {
604                 return 0
605         }
606         var size int
607         return size
608 }
609 func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) {
610         o := binary.BigEndian
611         _ = o
612         pos := 0
613         _ = pos
614         var buf []byte
615         if b == nil {
616                 buf = make([]byte, m.Size())
617         } else {
618                 buf = b
619         }
620         return buf, nil
621 }
622 func (m *MemclntKeepalive) Unmarshal(tmp []byte) error {
623         o := binary.BigEndian
624         _ = o
625         pos := 0
626         _ = pos
627         return nil
628 }
629
630 // MemclntKeepaliveReply represents VPP binary API message 'memclnt_keepalive_reply'.
631 type MemclntKeepaliveReply struct {
632         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
633 }
634
635 func (m *MemclntKeepaliveReply) Reset()                        { *m = MemclntKeepaliveReply{} }
636 func (*MemclntKeepaliveReply) GetMessageName() string          { return "memclnt_keepalive_reply" }
637 func (*MemclntKeepaliveReply) GetCrcString() string            { return "e8d4e804" }
638 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType { return api.ReplyMessage }
639
640 func (m *MemclntKeepaliveReply) Size() int {
641         if m == nil {
642                 return 0
643         }
644         var size int
645         // field[1] m.Retval
646         size += 4
647         return size
648 }
649 func (m *MemclntKeepaliveReply) Marshal(b []byte) ([]byte, error) {
650         o := binary.BigEndian
651         _ = o
652         pos := 0
653         _ = pos
654         var buf []byte
655         if b == nil {
656                 buf = make([]byte, m.Size())
657         } else {
658                 buf = b
659         }
660         // field[1] m.Retval
661         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
662         pos += 4
663         return buf, nil
664 }
665 func (m *MemclntKeepaliveReply) Unmarshal(tmp []byte) error {
666         o := binary.BigEndian
667         _ = o
668         pos := 0
669         _ = pos
670         // field[1] m.Retval
671         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
672         pos += 4
673         return nil
674 }
675
676 // MemclntReadTimeout represents VPP binary API message 'memclnt_read_timeout'.
677 type MemclntReadTimeout struct {
678         Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
679 }
680
681 func (m *MemclntReadTimeout) Reset()                        { *m = MemclntReadTimeout{} }
682 func (*MemclntReadTimeout) GetMessageName() string          { return "memclnt_read_timeout" }
683 func (*MemclntReadTimeout) GetCrcString() string            { return "c3a3a452" }
684 func (*MemclntReadTimeout) GetMessageType() api.MessageType { return api.OtherMessage }
685
686 func (m *MemclntReadTimeout) Size() int {
687         if m == nil {
688                 return 0
689         }
690         var size int
691         // field[1] m.Dummy
692         size += 1
693         return size
694 }
695 func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) {
696         o := binary.BigEndian
697         _ = o
698         pos := 0
699         _ = pos
700         var buf []byte
701         if b == nil {
702                 buf = make([]byte, m.Size())
703         } else {
704                 buf = b
705         }
706         // field[1] m.Dummy
707         buf[pos] = uint8(m.Dummy)
708         pos += 1
709         return buf, nil
710 }
711 func (m *MemclntReadTimeout) Unmarshal(tmp []byte) error {
712         o := binary.BigEndian
713         _ = o
714         pos := 0
715         _ = pos
716         // field[1] m.Dummy
717         m.Dummy = uint8(tmp[pos])
718         pos += 1
719         return nil
720 }
721
722 // MemclntRxThreadSuspend represents VPP binary API message 'memclnt_rx_thread_suspend'.
723 type MemclntRxThreadSuspend struct {
724         Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
725 }
726
727 func (m *MemclntRxThreadSuspend) Reset()                        { *m = MemclntRxThreadSuspend{} }
728 func (*MemclntRxThreadSuspend) GetMessageName() string          { return "memclnt_rx_thread_suspend" }
729 func (*MemclntRxThreadSuspend) GetCrcString() string            { return "c3a3a452" }
730 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType { return api.OtherMessage }
731
732 func (m *MemclntRxThreadSuspend) Size() int {
733         if m == nil {
734                 return 0
735         }
736         var size int
737         // field[1] m.Dummy
738         size += 1
739         return size
740 }
741 func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) {
742         o := binary.BigEndian
743         _ = o
744         pos := 0
745         _ = pos
746         var buf []byte
747         if b == nil {
748                 buf = make([]byte, m.Size())
749         } else {
750                 buf = b
751         }
752         // field[1] m.Dummy
753         buf[pos] = uint8(m.Dummy)
754         pos += 1
755         return buf, nil
756 }
757 func (m *MemclntRxThreadSuspend) Unmarshal(tmp []byte) error {
758         o := binary.BigEndian
759         _ = o
760         pos := 0
761         _ = pos
762         // field[1] m.Dummy
763         m.Dummy = uint8(tmp[pos])
764         pos += 1
765         return nil
766 }
767
768 // RPCCall represents VPP binary API message 'rpc_call'.
769 type RPCCall struct {
770         Function        uint64 `binapi:"u64,name=function" json:"function,omitempty"`
771         Multicast       uint8  `binapi:"u8,name=multicast" json:"multicast,omitempty"`
772         NeedBarrierSync uint8  `binapi:"u8,name=need_barrier_sync" json:"need_barrier_sync,omitempty"`
773         SendReply       uint8  `binapi:"u8,name=send_reply" json:"send_reply,omitempty"`
774         DataLen         uint32 `binapi:"u32,name=data_len" json:"data_len,omitempty" struc:"sizeof=Data"`
775         Data            []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
776 }
777
778 func (m *RPCCall) Reset()                        { *m = RPCCall{} }
779 func (*RPCCall) GetMessageName() string          { return "rpc_call" }
780 func (*RPCCall) GetCrcString() string            { return "7e8a2c95" }
781 func (*RPCCall) GetMessageType() api.MessageType { return api.RequestMessage }
782
783 func (m *RPCCall) Size() int {
784         if m == nil {
785                 return 0
786         }
787         var size int
788         // field[1] m.Function
789         size += 8
790         // field[1] m.Multicast
791         size += 1
792         // field[1] m.NeedBarrierSync
793         size += 1
794         // field[1] m.SendReply
795         size += 1
796         // field[1] m.DataLen
797         size += 4
798         // field[1] m.Data
799         size += 1 * len(m.Data)
800         return size
801 }
802 func (m *RPCCall) Marshal(b []byte) ([]byte, error) {
803         o := binary.BigEndian
804         _ = o
805         pos := 0
806         _ = pos
807         var buf []byte
808         if b == nil {
809                 buf = make([]byte, m.Size())
810         } else {
811                 buf = b
812         }
813         // field[1] m.Function
814         o.PutUint64(buf[pos:pos+8], uint64(m.Function))
815         pos += 8
816         // field[1] m.Multicast
817         buf[pos] = uint8(m.Multicast)
818         pos += 1
819         // field[1] m.NeedBarrierSync
820         buf[pos] = uint8(m.NeedBarrierSync)
821         pos += 1
822         // field[1] m.SendReply
823         buf[pos] = uint8(m.SendReply)
824         pos += 1
825         // field[1] m.DataLen
826         o.PutUint32(buf[pos:pos+4], uint32(len(m.Data)))
827         pos += 4
828         // field[1] m.Data
829         for i := 0; i < len(m.Data); i++ {
830                 var x uint8
831                 if i < len(m.Data) {
832                         x = uint8(m.Data[i])
833                 }
834                 buf[pos] = uint8(x)
835                 pos += 1
836         }
837         return buf, nil
838 }
839 func (m *RPCCall) Unmarshal(tmp []byte) error {
840         o := binary.BigEndian
841         _ = o
842         pos := 0
843         _ = pos
844         // field[1] m.Function
845         m.Function = uint64(o.Uint64(tmp[pos : pos+8]))
846         pos += 8
847         // field[1] m.Multicast
848         m.Multicast = uint8(tmp[pos])
849         pos += 1
850         // field[1] m.NeedBarrierSync
851         m.NeedBarrierSync = uint8(tmp[pos])
852         pos += 1
853         // field[1] m.SendReply
854         m.SendReply = uint8(tmp[pos])
855         pos += 1
856         // field[1] m.DataLen
857         m.DataLen = uint32(o.Uint32(tmp[pos : pos+4]))
858         pos += 4
859         // field[1] m.Data
860         m.Data = make([]uint8, m.DataLen)
861         for i := 0; i < len(m.Data); i++ {
862                 m.Data[i] = uint8(tmp[pos])
863                 pos += 1
864         }
865         return nil
866 }
867
868 // RPCCallReply represents VPP binary API message 'rpc_call_reply'.
869 type RPCCallReply struct {
870         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
871 }
872
873 func (m *RPCCallReply) Reset()                        { *m = RPCCallReply{} }
874 func (*RPCCallReply) GetMessageName() string          { return "rpc_call_reply" }
875 func (*RPCCallReply) GetCrcString() string            { return "e8d4e804" }
876 func (*RPCCallReply) GetMessageType() api.MessageType { return api.ReplyMessage }
877
878 func (m *RPCCallReply) Size() int {
879         if m == nil {
880                 return 0
881         }
882         var size int
883         // field[1] m.Retval
884         size += 4
885         return size
886 }
887 func (m *RPCCallReply) Marshal(b []byte) ([]byte, error) {
888         o := binary.BigEndian
889         _ = o
890         pos := 0
891         _ = pos
892         var buf []byte
893         if b == nil {
894                 buf = make([]byte, m.Size())
895         } else {
896                 buf = b
897         }
898         // field[1] m.Retval
899         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
900         pos += 4
901         return buf, nil
902 }
903 func (m *RPCCallReply) Unmarshal(tmp []byte) error {
904         o := binary.BigEndian
905         _ = o
906         pos := 0
907         _ = pos
908         // field[1] m.Retval
909         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
910         pos += 4
911         return nil
912 }
913
914 // RxThreadExit represents VPP binary API message 'rx_thread_exit'.
915 type RxThreadExit struct {
916         Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
917 }
918
919 func (m *RxThreadExit) Reset()                        { *m = RxThreadExit{} }
920 func (*RxThreadExit) GetMessageName() string          { return "rx_thread_exit" }
921 func (*RxThreadExit) GetCrcString() string            { return "c3a3a452" }
922 func (*RxThreadExit) GetMessageType() api.MessageType { return api.OtherMessage }
923
924 func (m *RxThreadExit) Size() int {
925         if m == nil {
926                 return 0
927         }
928         var size int
929         // field[1] m.Dummy
930         size += 1
931         return size
932 }
933 func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) {
934         o := binary.BigEndian
935         _ = o
936         pos := 0
937         _ = pos
938         var buf []byte
939         if b == nil {
940                 buf = make([]byte, m.Size())
941         } else {
942                 buf = b
943         }
944         // field[1] m.Dummy
945         buf[pos] = uint8(m.Dummy)
946         pos += 1
947         return buf, nil
948 }
949 func (m *RxThreadExit) Unmarshal(tmp []byte) error {
950         o := binary.BigEndian
951         _ = o
952         pos := 0
953         _ = pos
954         // field[1] m.Dummy
955         m.Dummy = uint8(tmp[pos])
956         pos += 1
957         return nil
958 }
959
960 // SockInitShm represents VPP binary API message 'sock_init_shm'.
961 type SockInitShm struct {
962         RequestedSize uint32   `binapi:"u32,name=requested_size" json:"requested_size,omitempty"`
963         Nitems        uint8    `binapi:"u8,name=nitems" json:"nitems,omitempty" struc:"sizeof=Configs"`
964         Configs       []uint64 `binapi:"u64[nitems],name=configs" json:"configs,omitempty"`
965 }
966
967 func (m *SockInitShm) Reset()                        { *m = SockInitShm{} }
968 func (*SockInitShm) GetMessageName() string          { return "sock_init_shm" }
969 func (*SockInitShm) GetCrcString() string            { return "51646d92" }
970 func (*SockInitShm) GetMessageType() api.MessageType { return api.RequestMessage }
971
972 func (m *SockInitShm) Size() int {
973         if m == nil {
974                 return 0
975         }
976         var size int
977         // field[1] m.RequestedSize
978         size += 4
979         // field[1] m.Nitems
980         size += 1
981         // field[1] m.Configs
982         size += 8 * len(m.Configs)
983         return size
984 }
985 func (m *SockInitShm) Marshal(b []byte) ([]byte, error) {
986         o := binary.BigEndian
987         _ = o
988         pos := 0
989         _ = pos
990         var buf []byte
991         if b == nil {
992                 buf = make([]byte, m.Size())
993         } else {
994                 buf = b
995         }
996         // field[1] m.RequestedSize
997         o.PutUint32(buf[pos:pos+4], uint32(m.RequestedSize))
998         pos += 4
999         // field[1] m.Nitems
1000         buf[pos] = uint8(len(m.Configs))
1001         pos += 1
1002         // field[1] m.Configs
1003         for i := 0; i < len(m.Configs); i++ {
1004                 var x uint64
1005                 if i < len(m.Configs) {
1006                         x = uint64(m.Configs[i])
1007                 }
1008                 o.PutUint64(buf[pos:pos+8], uint64(x))
1009                 pos += 8
1010         }
1011         return buf, nil
1012 }
1013 func (m *SockInitShm) Unmarshal(tmp []byte) error {
1014         o := binary.BigEndian
1015         _ = o
1016         pos := 0
1017         _ = pos
1018         // field[1] m.RequestedSize
1019         m.RequestedSize = uint32(o.Uint32(tmp[pos : pos+4]))
1020         pos += 4
1021         // field[1] m.Nitems
1022         m.Nitems = uint8(tmp[pos])
1023         pos += 1
1024         // field[1] m.Configs
1025         m.Configs = make([]uint64, m.Nitems)
1026         for i := 0; i < len(m.Configs); i++ {
1027                 m.Configs[i] = uint64(o.Uint64(tmp[pos : pos+8]))
1028                 pos += 8
1029         }
1030         return nil
1031 }
1032
1033 // SockInitShmReply represents VPP binary API message 'sock_init_shm_reply'.
1034 type SockInitShmReply struct {
1035         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1036 }
1037
1038 func (m *SockInitShmReply) Reset()                        { *m = SockInitShmReply{} }
1039 func (*SockInitShmReply) GetMessageName() string          { return "sock_init_shm_reply" }
1040 func (*SockInitShmReply) GetCrcString() string            { return "e8d4e804" }
1041 func (*SockInitShmReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1042
1043 func (m *SockInitShmReply) Size() int {
1044         if m == nil {
1045                 return 0
1046         }
1047         var size int
1048         // field[1] m.Retval
1049         size += 4
1050         return size
1051 }
1052 func (m *SockInitShmReply) Marshal(b []byte) ([]byte, error) {
1053         o := binary.BigEndian
1054         _ = o
1055         pos := 0
1056         _ = pos
1057         var buf []byte
1058         if b == nil {
1059                 buf = make([]byte, m.Size())
1060         } else {
1061                 buf = b
1062         }
1063         // field[1] m.Retval
1064         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1065         pos += 4
1066         return buf, nil
1067 }
1068 func (m *SockInitShmReply) Unmarshal(tmp []byte) error {
1069         o := binary.BigEndian
1070         _ = o
1071         pos := 0
1072         _ = pos
1073         // field[1] m.Retval
1074         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1075         pos += 4
1076         return nil
1077 }
1078
1079 // SockclntCreate represents VPP binary API message 'sockclnt_create'.
1080 type SockclntCreate struct {
1081         Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
1082 }
1083
1084 func (m *SockclntCreate) Reset()                        { *m = SockclntCreate{} }
1085 func (*SockclntCreate) GetMessageName() string          { return "sockclnt_create" }
1086 func (*SockclntCreate) GetCrcString() string            { return "455fb9c4" }
1087 func (*SockclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage }
1088
1089 func (m *SockclntCreate) Size() int {
1090         if m == nil {
1091                 return 0
1092         }
1093         var size int
1094         // field[1] m.Name
1095         size += 64
1096         return size
1097 }
1098 func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) {
1099         o := binary.BigEndian
1100         _ = o
1101         pos := 0
1102         _ = pos
1103         var buf []byte
1104         if b == nil {
1105                 buf = make([]byte, m.Size())
1106         } else {
1107                 buf = b
1108         }
1109         // field[1] m.Name
1110         copy(buf[pos:pos+64], m.Name)
1111         pos += 64
1112         return buf, nil
1113 }
1114 func (m *SockclntCreate) Unmarshal(tmp []byte) error {
1115         o := binary.BigEndian
1116         _ = o
1117         pos := 0
1118         _ = pos
1119         // field[1] m.Name
1120         {
1121                 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1122                 m.Name = codec.DecodeString(tmp[pos : pos+nul])
1123                 pos += 64
1124         }
1125         return nil
1126 }
1127
1128 // SockclntCreateReply represents VPP binary API message 'sockclnt_create_reply'.
1129 type SockclntCreateReply struct {
1130         Response     int32               `binapi:"i32,name=response" json:"response,omitempty"`
1131         Index        uint32              `binapi:"u32,name=index" json:"index,omitempty"`
1132         Count        uint16              `binapi:"u16,name=count" json:"count,omitempty" struc:"sizeof=MessageTable"`
1133         MessageTable []MessageTableEntry `binapi:"message_table_entry[count],name=message_table" json:"message_table,omitempty"`
1134 }
1135
1136 func (m *SockclntCreateReply) Reset()                        { *m = SockclntCreateReply{} }
1137 func (*SockclntCreateReply) GetMessageName() string          { return "sockclnt_create_reply" }
1138 func (*SockclntCreateReply) GetCrcString() string            { return "35166268" }
1139 func (*SockclntCreateReply) GetMessageType() api.MessageType { return api.RequestMessage }
1140
1141 func (m *SockclntCreateReply) Size() int {
1142         if m == nil {
1143                 return 0
1144         }
1145         var size int
1146         // field[1] m.Response
1147         size += 4
1148         // field[1] m.Index
1149         size += 4
1150         // field[1] m.Count
1151         size += 2
1152         // field[1] m.MessageTable
1153         for j1 := 0; j1 < len(m.MessageTable); j1++ {
1154                 var s1 MessageTableEntry
1155                 _ = s1
1156                 if j1 < len(m.MessageTable) {
1157                         s1 = m.MessageTable[j1]
1158                 }
1159                 // field[2] s1.Index
1160                 size += 2
1161                 // field[2] s1.Name
1162                 size += 64
1163         }
1164         return size
1165 }
1166 func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) {
1167         o := binary.BigEndian
1168         _ = o
1169         pos := 0
1170         _ = pos
1171         var buf []byte
1172         if b == nil {
1173                 buf = make([]byte, m.Size())
1174         } else {
1175                 buf = b
1176         }
1177         // field[1] m.Response
1178         o.PutUint32(buf[pos:pos+4], uint32(m.Response))
1179         pos += 4
1180         // field[1] m.Index
1181         o.PutUint32(buf[pos:pos+4], uint32(m.Index))
1182         pos += 4
1183         // field[1] m.Count
1184         o.PutUint16(buf[pos:pos+2], uint16(len(m.MessageTable)))
1185         pos += 2
1186         // field[1] m.MessageTable
1187         for j1 := 0; j1 < len(m.MessageTable); j1++ {
1188                 var v1 MessageTableEntry
1189                 if j1 < len(m.MessageTable) {
1190                         v1 = m.MessageTable[j1]
1191                 }
1192                 // field[2] v1.Index
1193                 o.PutUint16(buf[pos:pos+2], uint16(v1.Index))
1194                 pos += 2
1195                 // field[2] v1.Name
1196                 copy(buf[pos:pos+64], v1.Name)
1197                 pos += 64
1198         }
1199         return buf, nil
1200 }
1201 func (m *SockclntCreateReply) Unmarshal(tmp []byte) error {
1202         o := binary.BigEndian
1203         _ = o
1204         pos := 0
1205         _ = pos
1206         // field[1] m.Response
1207         m.Response = int32(o.Uint32(tmp[pos : pos+4]))
1208         pos += 4
1209         // field[1] m.Index
1210         m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
1211         pos += 4
1212         // field[1] m.Count
1213         m.Count = uint16(o.Uint16(tmp[pos : pos+2]))
1214         pos += 2
1215         // field[1] m.MessageTable
1216         m.MessageTable = make([]MessageTableEntry, int(m.Count))
1217         for j1 := 0; j1 < int(m.Count); j1++ {
1218                 // field[2] m.MessageTable[j1].Index
1219                 m.MessageTable[j1].Index = uint16(o.Uint16(tmp[pos : pos+2]))
1220                 pos += 2
1221                 // field[2] m.MessageTable[j1].Name
1222                 {
1223                         nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1224                         m.MessageTable[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
1225                         pos += 64
1226                 }
1227         }
1228         return nil
1229 }
1230
1231 // SockclntDelete represents VPP binary API message 'sockclnt_delete'.
1232 type SockclntDelete struct {
1233         Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
1234 }
1235
1236 func (m *SockclntDelete) Reset()                        { *m = SockclntDelete{} }
1237 func (*SockclntDelete) GetMessageName() string          { return "sockclnt_delete" }
1238 func (*SockclntDelete) GetCrcString() string            { return "8ac76db6" }
1239 func (*SockclntDelete) GetMessageType() api.MessageType { return api.RequestMessage }
1240
1241 func (m *SockclntDelete) Size() int {
1242         if m == nil {
1243                 return 0
1244         }
1245         var size int
1246         // field[1] m.Index
1247         size += 4
1248         return size
1249 }
1250 func (m *SockclntDelete) Marshal(b []byte) ([]byte, error) {
1251         o := binary.BigEndian
1252         _ = o
1253         pos := 0
1254         _ = pos
1255         var buf []byte
1256         if b == nil {
1257                 buf = make([]byte, m.Size())
1258         } else {
1259                 buf = b
1260         }
1261         // field[1] m.Index
1262         o.PutUint32(buf[pos:pos+4], uint32(m.Index))
1263         pos += 4
1264         return buf, nil
1265 }
1266 func (m *SockclntDelete) Unmarshal(tmp []byte) error {
1267         o := binary.BigEndian
1268         _ = o
1269         pos := 0
1270         _ = pos
1271         // field[1] m.Index
1272         m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
1273         pos += 4
1274         return nil
1275 }
1276
1277 // SockclntDeleteReply represents VPP binary API message 'sockclnt_delete_reply'.
1278 type SockclntDeleteReply struct {
1279         Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
1280 }
1281
1282 func (m *SockclntDeleteReply) Reset()                        { *m = SockclntDeleteReply{} }
1283 func (*SockclntDeleteReply) GetMessageName() string          { return "sockclnt_delete_reply" }
1284 func (*SockclntDeleteReply) GetCrcString() string            { return "8f38b1ee" }
1285 func (*SockclntDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1286
1287 func (m *SockclntDeleteReply) Size() int {
1288         if m == nil {
1289                 return 0
1290         }
1291         var size int
1292         // field[1] m.Response
1293         size += 4
1294         return size
1295 }
1296 func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) {
1297         o := binary.BigEndian
1298         _ = o
1299         pos := 0
1300         _ = pos
1301         var buf []byte
1302         if b == nil {
1303                 buf = make([]byte, m.Size())
1304         } else {
1305                 buf = b
1306         }
1307         // field[1] m.Response
1308         o.PutUint32(buf[pos:pos+4], uint32(m.Response))
1309         pos += 4
1310         return buf, nil
1311 }
1312 func (m *SockclntDeleteReply) Unmarshal(tmp []byte) error {
1313         o := binary.BigEndian
1314         _ = o
1315         pos := 0
1316         _ = pos
1317         // field[1] m.Response
1318         m.Response = int32(o.Uint32(tmp[pos : pos+4]))
1319         pos += 4
1320         return nil
1321 }
1322
1323 // TracePluginMsgIds represents VPP binary API message 'trace_plugin_msg_ids'.
1324 type TracePluginMsgIds struct {
1325         PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty" struc:"[128]byte"`
1326         FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
1327         LastMsgID  uint16 `binapi:"u16,name=last_msg_id" json:"last_msg_id,omitempty"`
1328 }
1329
1330 func (m *TracePluginMsgIds) Reset()                        { *m = TracePluginMsgIds{} }
1331 func (*TracePluginMsgIds) GetMessageName() string          { return "trace_plugin_msg_ids" }
1332 func (*TracePluginMsgIds) GetCrcString() string            { return "f476d3ce" }
1333 func (*TracePluginMsgIds) GetMessageType() api.MessageType { return api.RequestMessage }
1334
1335 func (m *TracePluginMsgIds) Size() int {
1336         if m == nil {
1337                 return 0
1338         }
1339         var size int
1340         // field[1] m.PluginName
1341         size += 128
1342         // field[1] m.FirstMsgID
1343         size += 2
1344         // field[1] m.LastMsgID
1345         size += 2
1346         return size
1347 }
1348 func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) {
1349         o := binary.BigEndian
1350         _ = o
1351         pos := 0
1352         _ = pos
1353         var buf []byte
1354         if b == nil {
1355                 buf = make([]byte, m.Size())
1356         } else {
1357                 buf = b
1358         }
1359         // field[1] m.PluginName
1360         copy(buf[pos:pos+128], m.PluginName)
1361         pos += 128
1362         // field[1] m.FirstMsgID
1363         o.PutUint16(buf[pos:pos+2], uint16(m.FirstMsgID))
1364         pos += 2
1365         // field[1] m.LastMsgID
1366         o.PutUint16(buf[pos:pos+2], uint16(m.LastMsgID))
1367         pos += 2
1368         return buf, nil
1369 }
1370 func (m *TracePluginMsgIds) Unmarshal(tmp []byte) error {
1371         o := binary.BigEndian
1372         _ = o
1373         pos := 0
1374         _ = pos
1375         // field[1] m.PluginName
1376         {
1377                 nul := bytes.Index(tmp[pos:pos+128], []byte{0x00})
1378                 m.PluginName = codec.DecodeString(tmp[pos : pos+nul])
1379                 pos += 128
1380         }
1381         // field[1] m.FirstMsgID
1382         m.FirstMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
1383         pos += 2
1384         // field[1] m.LastMsgID
1385         m.LastMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
1386         pos += 2
1387         return nil
1388 }
1389
1390 func init() { file_memclnt_binapi_init() }
1391 func file_memclnt_binapi_init() {
1392         api.RegisterMessage((*APIVersions)(nil), "memclnt.APIVersions")
1393         api.RegisterMessage((*APIVersionsReply)(nil), "memclnt.APIVersionsReply")
1394         api.RegisterMessage((*GetFirstMsgID)(nil), "memclnt.GetFirstMsgID")
1395         api.RegisterMessage((*GetFirstMsgIDReply)(nil), "memclnt.GetFirstMsgIDReply")
1396         api.RegisterMessage((*MemclntCreate)(nil), "memclnt.MemclntCreate")
1397         api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt.MemclntCreateReply")
1398         api.RegisterMessage((*MemclntDelete)(nil), "memclnt.MemclntDelete")
1399         api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt.MemclntDeleteReply")
1400         api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt.MemclntKeepalive")
1401         api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt.MemclntKeepaliveReply")
1402         api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt.MemclntReadTimeout")
1403         api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt.MemclntRxThreadSuspend")
1404         api.RegisterMessage((*RPCCall)(nil), "memclnt.RPCCall")
1405         api.RegisterMessage((*RPCCallReply)(nil), "memclnt.RPCCallReply")
1406         api.RegisterMessage((*RxThreadExit)(nil), "memclnt.RxThreadExit")
1407         api.RegisterMessage((*SockInitShm)(nil), "memclnt.SockInitShm")
1408         api.RegisterMessage((*SockInitShmReply)(nil), "memclnt.SockInitShmReply")
1409         api.RegisterMessage((*SockclntCreate)(nil), "memclnt.SockclntCreate")
1410         api.RegisterMessage((*SockclntCreateReply)(nil), "memclnt.SockclntCreateReply")
1411         api.RegisterMessage((*SockclntDelete)(nil), "memclnt.SockclntDelete")
1412         api.RegisterMessage((*SockclntDeleteReply)(nil), "memclnt.SockclntDeleteReply")
1413         api.RegisterMessage((*TracePluginMsgIds)(nil), "memclnt.TracePluginMsgIds")
1414 }
1415
1416 // Messages returns list of all messages in this module.
1417 func AllMessages() []api.Message {
1418         return []api.Message{
1419                 (*APIVersions)(nil),
1420                 (*APIVersionsReply)(nil),
1421                 (*GetFirstMsgID)(nil),
1422                 (*GetFirstMsgIDReply)(nil),
1423                 (*MemclntCreate)(nil),
1424                 (*MemclntCreateReply)(nil),
1425                 (*MemclntDelete)(nil),
1426                 (*MemclntDeleteReply)(nil),
1427                 (*MemclntKeepalive)(nil),
1428                 (*MemclntKeepaliveReply)(nil),
1429                 (*MemclntReadTimeout)(nil),
1430                 (*MemclntRxThreadSuspend)(nil),
1431                 (*RPCCall)(nil),
1432                 (*RPCCallReply)(nil),
1433                 (*RxThreadExit)(nil),
1434                 (*SockInitShm)(nil),
1435                 (*SockInitShmReply)(nil),
1436                 (*SockclntCreate)(nil),
1437                 (*SockclntCreateReply)(nil),
1438                 (*SockclntDelete)(nil),
1439                 (*SockclntDeleteReply)(nil),
1440                 (*TracePluginMsgIds)(nil),
1441         }
1442 }
1443
1444 // Reference imports to suppress errors if they are not otherwise used.
1445 var _ = api.RegisterMessage
1446 var _ = codec.DecodeString
1447 var _ = bytes.NewBuffer
1448 var _ = context.Background
1449 var _ = io.Copy
1450 var _ = strconv.Itoa
1451 var _ = strings.Contains
1452 var _ = struc.Pack
1453 var _ = binary.BigEndian
1454 var _ = math.Float32bits
1455 var _ = net.ParseIP
1456 var _ = fmt.Errorf