Improve binapi generator
[govpp.git] / 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 // Package memclnt contains generated bindings for API file memclnt.api.
8 //
9 // Contents:
10 //   2 structs
11 //  22 messages
12 //
13 package memclnt
14
15 import (
16         api "git.fd.io/govpp.git/api"
17         codec "git.fd.io/govpp.git/codec"
18 )
19
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
25
26 const (
27         APIFile    = "memclnt"
28         APIVersion = "2.1.0"
29         VersionCrc = 0x8d3dd881
30 )
31
32 // MessageTableEntry defines type 'message_table_entry'.
33 type MessageTableEntry struct {
34         Index uint16 `binapi:"u16,name=index" json:"index,omitempty"`
35         Name  string `binapi:"string[64],name=name" json:"name,omitempty"`
36 }
37
38 // ModuleVersion defines type 'module_version'.
39 type ModuleVersion struct {
40         Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
41         Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
42         Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
43         Name  string `binapi:"string[64],name=name" json:"name,omitempty"`
44 }
45
46 // APIVersions defines message 'api_versions'.
47 type APIVersions struct{}
48
49 func (m *APIVersions) Reset()               { *m = APIVersions{} }
50 func (*APIVersions) GetMessageName() string { return "api_versions" }
51 func (*APIVersions) GetCrcString() string   { return "51077d14" }
52 func (*APIVersions) GetMessageType() api.MessageType {
53         return api.RequestMessage
54 }
55
56 func (m *APIVersions) Size() int {
57         if m == nil {
58                 return 0
59         }
60         var size int
61         return size
62 }
63 func (m *APIVersions) Marshal(b []byte) ([]byte, error) {
64         var buf *codec.Buffer
65         if b == nil {
66                 buf = codec.NewBuffer(make([]byte, m.Size()))
67         } else {
68                 buf = codec.NewBuffer(b)
69         }
70         return buf.Bytes(), nil
71 }
72 func (m *APIVersions) Unmarshal(b []byte) error {
73         return nil
74 }
75
76 // APIVersionsReply defines message 'api_versions_reply'.
77 type APIVersionsReply struct {
78         Retval      int32           `binapi:"i32,name=retval" json:"retval,omitempty"`
79         Count       uint32          `binapi:"u32,name=count" json:"-"`
80         APIVersions []ModuleVersion `binapi:"module_version[count],name=api_versions" json:"api_versions,omitempty"`
81 }
82
83 func (m *APIVersionsReply) Reset()               { *m = APIVersionsReply{} }
84 func (*APIVersionsReply) GetMessageName() string { return "api_versions_reply" }
85 func (*APIVersionsReply) GetCrcString() string   { return "5f0d99d6" }
86 func (*APIVersionsReply) GetMessageType() api.MessageType {
87         return api.ReplyMessage
88 }
89
90 func (m *APIVersionsReply) Size() int {
91         if m == nil {
92                 return 0
93         }
94         var size int
95         size += 4 // m.Retval
96         size += 4 // m.Count
97         for j1 := 0; j1 < len(m.APIVersions); j1++ {
98                 var s1 ModuleVersion
99                 _ = s1
100                 if j1 < len(m.APIVersions) {
101                         s1 = m.APIVersions[j1]
102                 }
103                 size += 4  // s1.Major
104                 size += 4  // s1.Minor
105                 size += 4  // s1.Patch
106                 size += 64 // s1.Name
107         }
108         return size
109 }
110 func (m *APIVersionsReply) Marshal(b []byte) ([]byte, error) {
111         var buf *codec.Buffer
112         if b == nil {
113                 buf = codec.NewBuffer(make([]byte, m.Size()))
114         } else {
115                 buf = codec.NewBuffer(b)
116         }
117         buf.EncodeUint32(uint32(m.Retval))
118         buf.EncodeUint32(uint32(len(m.APIVersions)))
119         for j0 := 0; j0 < len(m.APIVersions); j0++ {
120                 var v0 ModuleVersion
121                 if j0 < len(m.APIVersions) {
122                         v0 = m.APIVersions[j0]
123                 }
124                 buf.EncodeUint32(uint32(v0.Major))
125                 buf.EncodeUint32(uint32(v0.Minor))
126                 buf.EncodeUint32(uint32(v0.Patch))
127                 buf.EncodeString(v0.Name, 64)
128         }
129         return buf.Bytes(), nil
130 }
131 func (m *APIVersionsReply) Unmarshal(b []byte) error {
132         buf := codec.NewBuffer(b)
133         m.Retval = int32(buf.DecodeUint32())
134         m.Count = buf.DecodeUint32()
135         m.APIVersions = make([]ModuleVersion, int(m.Count))
136         for j0 := 0; j0 < len(m.APIVersions); j0++ {
137                 m.APIVersions[j0].Major = buf.DecodeUint32()
138                 m.APIVersions[j0].Minor = buf.DecodeUint32()
139                 m.APIVersions[j0].Patch = buf.DecodeUint32()
140                 m.APIVersions[j0].Name = buf.DecodeString(64)
141         }
142         return nil
143 }
144
145 // GetFirstMsgID defines message 'get_first_msg_id'.
146 type GetFirstMsgID struct {
147         Name string `binapi:"string[64],name=name" json:"name,omitempty"`
148 }
149
150 func (m *GetFirstMsgID) Reset()               { *m = GetFirstMsgID{} }
151 func (*GetFirstMsgID) GetMessageName() string { return "get_first_msg_id" }
152 func (*GetFirstMsgID) GetCrcString() string   { return "ebf79a66" }
153 func (*GetFirstMsgID) GetMessageType() api.MessageType {
154         return api.RequestMessage
155 }
156
157 func (m *GetFirstMsgID) Size() int {
158         if m == nil {
159                 return 0
160         }
161         var size int
162         size += 64 // m.Name
163         return size
164 }
165 func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) {
166         var buf *codec.Buffer
167         if b == nil {
168                 buf = codec.NewBuffer(make([]byte, m.Size()))
169         } else {
170                 buf = codec.NewBuffer(b)
171         }
172         buf.EncodeString(m.Name, 64)
173         return buf.Bytes(), nil
174 }
175 func (m *GetFirstMsgID) Unmarshal(b []byte) error {
176         buf := codec.NewBuffer(b)
177         m.Name = buf.DecodeString(64)
178         return nil
179 }
180
181 // GetFirstMsgIDReply defines message 'get_first_msg_id_reply'.
182 type GetFirstMsgIDReply struct {
183         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
184         FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
185 }
186
187 func (m *GetFirstMsgIDReply) Reset()               { *m = GetFirstMsgIDReply{} }
188 func (*GetFirstMsgIDReply) GetMessageName() string { return "get_first_msg_id_reply" }
189 func (*GetFirstMsgIDReply) GetCrcString() string   { return "7d337472" }
190 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType {
191         return api.ReplyMessage
192 }
193
194 func (m *GetFirstMsgIDReply) Size() int {
195         if m == nil {
196                 return 0
197         }
198         var size int
199         size += 4 // m.Retval
200         size += 2 // m.FirstMsgID
201         return size
202 }
203 func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) {
204         var buf *codec.Buffer
205         if b == nil {
206                 buf = codec.NewBuffer(make([]byte, m.Size()))
207         } else {
208                 buf = codec.NewBuffer(b)
209         }
210         buf.EncodeUint32(uint32(m.Retval))
211         buf.EncodeUint16(uint16(m.FirstMsgID))
212         return buf.Bytes(), nil
213 }
214 func (m *GetFirstMsgIDReply) Unmarshal(b []byte) error {
215         buf := codec.NewBuffer(b)
216         m.Retval = int32(buf.DecodeUint32())
217         m.FirstMsgID = buf.DecodeUint16()
218         return nil
219 }
220
221 // MemclntCreate defines message 'memclnt_create'.
222 type MemclntCreate struct {
223         CtxQuota    int32    `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"`
224         InputQueue  uint64   `binapi:"u64,name=input_queue" json:"input_queue,omitempty"`
225         Name        string   `binapi:"string[64],name=name" json:"name,omitempty"`
226         APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty"`
227 }
228
229 func (m *MemclntCreate) Reset()               { *m = MemclntCreate{} }
230 func (*MemclntCreate) GetMessageName() string { return "memclnt_create" }
231 func (*MemclntCreate) GetCrcString() string   { return "9c5e1c2f" }
232 func (*MemclntCreate) GetMessageType() api.MessageType {
233         return api.ReplyMessage
234 }
235
236 func (m *MemclntCreate) Size() int {
237         if m == nil {
238                 return 0
239         }
240         var size int
241         size += 4     // m.CtxQuota
242         size += 8     // m.InputQueue
243         size += 64    // m.Name
244         size += 4 * 8 // m.APIVersions
245         return size
246 }
247 func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) {
248         var buf *codec.Buffer
249         if b == nil {
250                 buf = codec.NewBuffer(make([]byte, m.Size()))
251         } else {
252                 buf = codec.NewBuffer(b)
253         }
254         buf.EncodeUint32(uint32(m.CtxQuota))
255         buf.EncodeUint64(uint64(m.InputQueue))
256         buf.EncodeString(m.Name, 64)
257         for i := 0; i < 8; i++ {
258                 var x uint32
259                 if i < len(m.APIVersions) {
260                         x = uint32(m.APIVersions[i])
261                 }
262                 buf.EncodeUint32(uint32(x))
263         }
264         return buf.Bytes(), nil
265 }
266 func (m *MemclntCreate) Unmarshal(b []byte) error {
267         buf := codec.NewBuffer(b)
268         m.CtxQuota = int32(buf.DecodeUint32())
269         m.InputQueue = buf.DecodeUint64()
270         m.Name = buf.DecodeString(64)
271         m.APIVersions = make([]uint32, 8)
272         for i := 0; i < len(m.APIVersions); i++ {
273                 m.APIVersions[i] = buf.DecodeUint32()
274         }
275         return nil
276 }
277
278 // MemclntCreateReply defines message 'memclnt_create_reply'.
279 type MemclntCreateReply struct {
280         Response     int32  `binapi:"i32,name=response" json:"response,omitempty"`
281         Handle       uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
282         Index        uint32 `binapi:"u32,name=index" json:"index,omitempty"`
283         MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"`
284 }
285
286 func (m *MemclntCreateReply) Reset()               { *m = MemclntCreateReply{} }
287 func (*MemclntCreateReply) GetMessageName() string { return "memclnt_create_reply" }
288 func (*MemclntCreateReply) GetCrcString() string   { return "42ec4560" }
289 func (*MemclntCreateReply) GetMessageType() api.MessageType {
290         return api.ReplyMessage
291 }
292
293 func (m *MemclntCreateReply) Size() int {
294         if m == nil {
295                 return 0
296         }
297         var size int
298         size += 4 // m.Response
299         size += 8 // m.Handle
300         size += 4 // m.Index
301         size += 8 // m.MessageTable
302         return size
303 }
304 func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) {
305         var buf *codec.Buffer
306         if b == nil {
307                 buf = codec.NewBuffer(make([]byte, m.Size()))
308         } else {
309                 buf = codec.NewBuffer(b)
310         }
311         buf.EncodeUint32(uint32(m.Response))
312         buf.EncodeUint64(uint64(m.Handle))
313         buf.EncodeUint32(uint32(m.Index))
314         buf.EncodeUint64(uint64(m.MessageTable))
315         return buf.Bytes(), nil
316 }
317 func (m *MemclntCreateReply) Unmarshal(b []byte) error {
318         buf := codec.NewBuffer(b)
319         m.Response = int32(buf.DecodeUint32())
320         m.Handle = buf.DecodeUint64()
321         m.Index = buf.DecodeUint32()
322         m.MessageTable = buf.DecodeUint64()
323         return nil
324 }
325
326 // MemclntDelete defines message 'memclnt_delete'.
327 type MemclntDelete struct {
328         Index     uint32 `binapi:"u32,name=index" json:"index,omitempty"`
329         Handle    uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
330         DoCleanup bool   `binapi:"bool,name=do_cleanup" json:"do_cleanup,omitempty"`
331 }
332
333 func (m *MemclntDelete) Reset()               { *m = MemclntDelete{} }
334 func (*MemclntDelete) GetMessageName() string { return "memclnt_delete" }
335 func (*MemclntDelete) GetCrcString() string   { return "7e1c04e3" }
336 func (*MemclntDelete) GetMessageType() api.MessageType {
337         return api.OtherMessage
338 }
339
340 func (m *MemclntDelete) Size() int {
341         if m == nil {
342                 return 0
343         }
344         var size int
345         size += 4 // m.Index
346         size += 8 // m.Handle
347         size += 1 // m.DoCleanup
348         return size
349 }
350 func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) {
351         var buf *codec.Buffer
352         if b == nil {
353                 buf = codec.NewBuffer(make([]byte, m.Size()))
354         } else {
355                 buf = codec.NewBuffer(b)
356         }
357         buf.EncodeUint32(uint32(m.Index))
358         buf.EncodeUint64(uint64(m.Handle))
359         buf.EncodeBool(m.DoCleanup)
360         return buf.Bytes(), nil
361 }
362 func (m *MemclntDelete) Unmarshal(b []byte) error {
363         buf := codec.NewBuffer(b)
364         m.Index = buf.DecodeUint32()
365         m.Handle = buf.DecodeUint64()
366         m.DoCleanup = buf.DecodeBool()
367         return nil
368 }
369
370 // MemclntDeleteReply defines message 'memclnt_delete_reply'.
371 type MemclntDeleteReply struct {
372         Response int32  `binapi:"i32,name=response" json:"response,omitempty"`
373         Handle   uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
374 }
375
376 func (m *MemclntDeleteReply) Reset()               { *m = MemclntDeleteReply{} }
377 func (*MemclntDeleteReply) GetMessageName() string { return "memclnt_delete_reply" }
378 func (*MemclntDeleteReply) GetCrcString() string   { return "3d3b6312" }
379 func (*MemclntDeleteReply) GetMessageType() api.MessageType {
380         return api.OtherMessage
381 }
382
383 func (m *MemclntDeleteReply) Size() int {
384         if m == nil {
385                 return 0
386         }
387         var size int
388         size += 4 // m.Response
389         size += 8 // m.Handle
390         return size
391 }
392 func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) {
393         var buf *codec.Buffer
394         if b == nil {
395                 buf = codec.NewBuffer(make([]byte, m.Size()))
396         } else {
397                 buf = codec.NewBuffer(b)
398         }
399         buf.EncodeUint32(uint32(m.Response))
400         buf.EncodeUint64(uint64(m.Handle))
401         return buf.Bytes(), nil
402 }
403 func (m *MemclntDeleteReply) Unmarshal(b []byte) error {
404         buf := codec.NewBuffer(b)
405         m.Response = int32(buf.DecodeUint32())
406         m.Handle = buf.DecodeUint64()
407         return nil
408 }
409
410 // MemclntKeepalive defines message 'memclnt_keepalive'.
411 type MemclntKeepalive struct{}
412
413 func (m *MemclntKeepalive) Reset()               { *m = MemclntKeepalive{} }
414 func (*MemclntKeepalive) GetMessageName() string { return "memclnt_keepalive" }
415 func (*MemclntKeepalive) GetCrcString() string   { return "51077d14" }
416 func (*MemclntKeepalive) GetMessageType() api.MessageType {
417         return api.RequestMessage
418 }
419
420 func (m *MemclntKeepalive) Size() int {
421         if m == nil {
422                 return 0
423         }
424         var size int
425         return size
426 }
427 func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) {
428         var buf *codec.Buffer
429         if b == nil {
430                 buf = codec.NewBuffer(make([]byte, m.Size()))
431         } else {
432                 buf = codec.NewBuffer(b)
433         }
434         return buf.Bytes(), nil
435 }
436 func (m *MemclntKeepalive) Unmarshal(b []byte) error {
437         return nil
438 }
439
440 // MemclntKeepaliveReply defines message 'memclnt_keepalive_reply'.
441 type MemclntKeepaliveReply struct {
442         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
443 }
444
445 func (m *MemclntKeepaliveReply) Reset()               { *m = MemclntKeepaliveReply{} }
446 func (*MemclntKeepaliveReply) GetMessageName() string { return "memclnt_keepalive_reply" }
447 func (*MemclntKeepaliveReply) GetCrcString() string   { return "e8d4e804" }
448 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType {
449         return api.ReplyMessage
450 }
451
452 func (m *MemclntKeepaliveReply) Size() int {
453         if m == nil {
454                 return 0
455         }
456         var size int
457         size += 4 // m.Retval
458         return size
459 }
460 func (m *MemclntKeepaliveReply) Marshal(b []byte) ([]byte, error) {
461         var buf *codec.Buffer
462         if b == nil {
463                 buf = codec.NewBuffer(make([]byte, m.Size()))
464         } else {
465                 buf = codec.NewBuffer(b)
466         }
467         buf.EncodeUint32(uint32(m.Retval))
468         return buf.Bytes(), nil
469 }
470 func (m *MemclntKeepaliveReply) Unmarshal(b []byte) error {
471         buf := codec.NewBuffer(b)
472         m.Retval = int32(buf.DecodeUint32())
473         return nil
474 }
475
476 // MemclntReadTimeout defines message 'memclnt_read_timeout'.
477 type MemclntReadTimeout struct {
478         Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
479 }
480
481 func (m *MemclntReadTimeout) Reset()               { *m = MemclntReadTimeout{} }
482 func (*MemclntReadTimeout) GetMessageName() string { return "memclnt_read_timeout" }
483 func (*MemclntReadTimeout) GetCrcString() string   { return "c3a3a452" }
484 func (*MemclntReadTimeout) GetMessageType() api.MessageType {
485         return api.OtherMessage
486 }
487
488 func (m *MemclntReadTimeout) Size() int {
489         if m == nil {
490                 return 0
491         }
492         var size int
493         size += 1 // m.Dummy
494         return size
495 }
496 func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) {
497         var buf *codec.Buffer
498         if b == nil {
499                 buf = codec.NewBuffer(make([]byte, m.Size()))
500         } else {
501                 buf = codec.NewBuffer(b)
502         }
503         buf.EncodeUint8(uint8(m.Dummy))
504         return buf.Bytes(), nil
505 }
506 func (m *MemclntReadTimeout) Unmarshal(b []byte) error {
507         buf := codec.NewBuffer(b)
508         m.Dummy = buf.DecodeUint8()
509         return nil
510 }
511
512 // MemclntRxThreadSuspend defines message 'memclnt_rx_thread_suspend'.
513 type MemclntRxThreadSuspend struct {
514         Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
515 }
516
517 func (m *MemclntRxThreadSuspend) Reset()               { *m = MemclntRxThreadSuspend{} }
518 func (*MemclntRxThreadSuspend) GetMessageName() string { return "memclnt_rx_thread_suspend" }
519 func (*MemclntRxThreadSuspend) GetCrcString() string   { return "c3a3a452" }
520 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType {
521         return api.OtherMessage
522 }
523
524 func (m *MemclntRxThreadSuspend) Size() int {
525         if m == nil {
526                 return 0
527         }
528         var size int
529         size += 1 // m.Dummy
530         return size
531 }
532 func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) {
533         var buf *codec.Buffer
534         if b == nil {
535                 buf = codec.NewBuffer(make([]byte, m.Size()))
536         } else {
537                 buf = codec.NewBuffer(b)
538         }
539         buf.EncodeUint8(uint8(m.Dummy))
540         return buf.Bytes(), nil
541 }
542 func (m *MemclntRxThreadSuspend) Unmarshal(b []byte) error {
543         buf := codec.NewBuffer(b)
544         m.Dummy = buf.DecodeUint8()
545         return nil
546 }
547
548 // RPCCall defines message 'rpc_call'.
549 type RPCCall struct {
550         Function        uint64 `binapi:"u64,name=function" json:"function,omitempty"`
551         Multicast       uint8  `binapi:"u8,name=multicast" json:"multicast,omitempty"`
552         NeedBarrierSync uint8  `binapi:"u8,name=need_barrier_sync" json:"need_barrier_sync,omitempty"`
553         SendReply       uint8  `binapi:"u8,name=send_reply" json:"send_reply,omitempty"`
554         DataLen         uint32 `binapi:"u32,name=data_len" json:"-"`
555         Data            []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
556 }
557
558 func (m *RPCCall) Reset()               { *m = RPCCall{} }
559 func (*RPCCall) GetMessageName() string { return "rpc_call" }
560 func (*RPCCall) GetCrcString() string   { return "7e8a2c95" }
561 func (*RPCCall) GetMessageType() api.MessageType {
562         return api.RequestMessage
563 }
564
565 func (m *RPCCall) Size() int {
566         if m == nil {
567                 return 0
568         }
569         var size int
570         size += 8               // m.Function
571         size += 1               // m.Multicast
572         size += 1               // m.NeedBarrierSync
573         size += 1               // m.SendReply
574         size += 4               // m.DataLen
575         size += 1 * len(m.Data) // m.Data
576         return size
577 }
578 func (m *RPCCall) Marshal(b []byte) ([]byte, error) {
579         var buf *codec.Buffer
580         if b == nil {
581                 buf = codec.NewBuffer(make([]byte, m.Size()))
582         } else {
583                 buf = codec.NewBuffer(b)
584         }
585         buf.EncodeUint64(uint64(m.Function))
586         buf.EncodeUint8(uint8(m.Multicast))
587         buf.EncodeUint8(uint8(m.NeedBarrierSync))
588         buf.EncodeUint8(uint8(m.SendReply))
589         buf.EncodeUint32(uint32(len(m.Data)))
590         buf.EncodeBytes(m.Data[:], 0)
591         return buf.Bytes(), nil
592 }
593 func (m *RPCCall) Unmarshal(b []byte) error {
594         buf := codec.NewBuffer(b)
595         m.Function = buf.DecodeUint64()
596         m.Multicast = buf.DecodeUint8()
597         m.NeedBarrierSync = buf.DecodeUint8()
598         m.SendReply = buf.DecodeUint8()
599         m.DataLen = buf.DecodeUint32()
600         copy(m.Data[:], buf.DecodeBytes(0))
601         return nil
602 }
603
604 // RPCCallReply defines message 'rpc_call_reply'.
605 type RPCCallReply struct {
606         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
607 }
608
609 func (m *RPCCallReply) Reset()               { *m = RPCCallReply{} }
610 func (*RPCCallReply) GetMessageName() string { return "rpc_call_reply" }
611 func (*RPCCallReply) GetCrcString() string   { return "e8d4e804" }
612 func (*RPCCallReply) GetMessageType() api.MessageType {
613         return api.ReplyMessage
614 }
615
616 func (m *RPCCallReply) Size() int {
617         if m == nil {
618                 return 0
619         }
620         var size int
621         size += 4 // m.Retval
622         return size
623 }
624 func (m *RPCCallReply) Marshal(b []byte) ([]byte, error) {
625         var buf *codec.Buffer
626         if b == nil {
627                 buf = codec.NewBuffer(make([]byte, m.Size()))
628         } else {
629                 buf = codec.NewBuffer(b)
630         }
631         buf.EncodeUint32(uint32(m.Retval))
632         return buf.Bytes(), nil
633 }
634 func (m *RPCCallReply) Unmarshal(b []byte) error {
635         buf := codec.NewBuffer(b)
636         m.Retval = int32(buf.DecodeUint32())
637         return nil
638 }
639
640 // RxThreadExit defines message 'rx_thread_exit'.
641 type RxThreadExit struct {
642         Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
643 }
644
645 func (m *RxThreadExit) Reset()               { *m = RxThreadExit{} }
646 func (*RxThreadExit) GetMessageName() string { return "rx_thread_exit" }
647 func (*RxThreadExit) GetCrcString() string   { return "c3a3a452" }
648 func (*RxThreadExit) GetMessageType() api.MessageType {
649         return api.OtherMessage
650 }
651
652 func (m *RxThreadExit) Size() int {
653         if m == nil {
654                 return 0
655         }
656         var size int
657         size += 1 // m.Dummy
658         return size
659 }
660 func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) {
661         var buf *codec.Buffer
662         if b == nil {
663                 buf = codec.NewBuffer(make([]byte, m.Size()))
664         } else {
665                 buf = codec.NewBuffer(b)
666         }
667         buf.EncodeUint8(uint8(m.Dummy))
668         return buf.Bytes(), nil
669 }
670 func (m *RxThreadExit) Unmarshal(b []byte) error {
671         buf := codec.NewBuffer(b)
672         m.Dummy = buf.DecodeUint8()
673         return nil
674 }
675
676 // SockInitShm defines message 'sock_init_shm'.
677 type SockInitShm struct {
678         RequestedSize uint32   `binapi:"u32,name=requested_size" json:"requested_size,omitempty"`
679         Nitems        uint8    `binapi:"u8,name=nitems" json:"-"`
680         Configs       []uint64 `binapi:"u64[nitems],name=configs" json:"configs,omitempty"`
681 }
682
683 func (m *SockInitShm) Reset()               { *m = SockInitShm{} }
684 func (*SockInitShm) GetMessageName() string { return "sock_init_shm" }
685 func (*SockInitShm) GetCrcString() string   { return "51646d92" }
686 func (*SockInitShm) GetMessageType() api.MessageType {
687         return api.RequestMessage
688 }
689
690 func (m *SockInitShm) Size() int {
691         if m == nil {
692                 return 0
693         }
694         var size int
695         size += 4                  // m.RequestedSize
696         size += 1                  // m.Nitems
697         size += 8 * len(m.Configs) // m.Configs
698         return size
699 }
700 func (m *SockInitShm) Marshal(b []byte) ([]byte, error) {
701         var buf *codec.Buffer
702         if b == nil {
703                 buf = codec.NewBuffer(make([]byte, m.Size()))
704         } else {
705                 buf = codec.NewBuffer(b)
706         }
707         buf.EncodeUint32(uint32(m.RequestedSize))
708         buf.EncodeUint8(uint8(len(m.Configs)))
709         for i := 0; i < len(m.Configs); i++ {
710                 var x uint64
711                 if i < len(m.Configs) {
712                         x = uint64(m.Configs[i])
713                 }
714                 buf.EncodeUint64(uint64(x))
715         }
716         return buf.Bytes(), nil
717 }
718 func (m *SockInitShm) Unmarshal(b []byte) error {
719         buf := codec.NewBuffer(b)
720         m.RequestedSize = buf.DecodeUint32()
721         m.Nitems = buf.DecodeUint8()
722         m.Configs = make([]uint64, m.Nitems)
723         for i := 0; i < len(m.Configs); i++ {
724                 m.Configs[i] = buf.DecodeUint64()
725         }
726         return nil
727 }
728
729 // SockInitShmReply defines message 'sock_init_shm_reply'.
730 type SockInitShmReply struct {
731         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
732 }
733
734 func (m *SockInitShmReply) Reset()               { *m = SockInitShmReply{} }
735 func (*SockInitShmReply) GetMessageName() string { return "sock_init_shm_reply" }
736 func (*SockInitShmReply) GetCrcString() string   { return "e8d4e804" }
737 func (*SockInitShmReply) GetMessageType() api.MessageType {
738         return api.ReplyMessage
739 }
740
741 func (m *SockInitShmReply) Size() int {
742         if m == nil {
743                 return 0
744         }
745         var size int
746         size += 4 // m.Retval
747         return size
748 }
749 func (m *SockInitShmReply) Marshal(b []byte) ([]byte, error) {
750         var buf *codec.Buffer
751         if b == nil {
752                 buf = codec.NewBuffer(make([]byte, m.Size()))
753         } else {
754                 buf = codec.NewBuffer(b)
755         }
756         buf.EncodeUint32(uint32(m.Retval))
757         return buf.Bytes(), nil
758 }
759 func (m *SockInitShmReply) Unmarshal(b []byte) error {
760         buf := codec.NewBuffer(b)
761         m.Retval = int32(buf.DecodeUint32())
762         return nil
763 }
764
765 // SockclntCreate defines message 'sockclnt_create'.
766 type SockclntCreate struct {
767         Name string `binapi:"string[64],name=name" json:"name,omitempty"`
768 }
769
770 func (m *SockclntCreate) Reset()               { *m = SockclntCreate{} }
771 func (*SockclntCreate) GetMessageName() string { return "sockclnt_create" }
772 func (*SockclntCreate) GetCrcString() string   { return "455fb9c4" }
773 func (*SockclntCreate) GetMessageType() api.MessageType {
774         return api.ReplyMessage
775 }
776
777 func (m *SockclntCreate) Size() int {
778         if m == nil {
779                 return 0
780         }
781         var size int
782         size += 64 // m.Name
783         return size
784 }
785 func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) {
786         var buf *codec.Buffer
787         if b == nil {
788                 buf = codec.NewBuffer(make([]byte, m.Size()))
789         } else {
790                 buf = codec.NewBuffer(b)
791         }
792         buf.EncodeString(m.Name, 64)
793         return buf.Bytes(), nil
794 }
795 func (m *SockclntCreate) Unmarshal(b []byte) error {
796         buf := codec.NewBuffer(b)
797         m.Name = buf.DecodeString(64)
798         return nil
799 }
800
801 // SockclntCreateReply defines message 'sockclnt_create_reply'.
802 type SockclntCreateReply struct {
803         Response     int32               `binapi:"i32,name=response" json:"response,omitempty"`
804         Index        uint32              `binapi:"u32,name=index" json:"index,omitempty"`
805         Count        uint16              `binapi:"u16,name=count" json:"-"`
806         MessageTable []MessageTableEntry `binapi:"message_table_entry[count],name=message_table" json:"message_table,omitempty"`
807 }
808
809 func (m *SockclntCreateReply) Reset()               { *m = SockclntCreateReply{} }
810 func (*SockclntCreateReply) GetMessageName() string { return "sockclnt_create_reply" }
811 func (*SockclntCreateReply) GetCrcString() string   { return "35166268" }
812 func (*SockclntCreateReply) GetMessageType() api.MessageType {
813         return api.RequestMessage
814 }
815
816 func (m *SockclntCreateReply) Size() int {
817         if m == nil {
818                 return 0
819         }
820         var size int
821         size += 4 // m.Response
822         size += 4 // m.Index
823         size += 2 // m.Count
824         for j1 := 0; j1 < len(m.MessageTable); j1++ {
825                 var s1 MessageTableEntry
826                 _ = s1
827                 if j1 < len(m.MessageTable) {
828                         s1 = m.MessageTable[j1]
829                 }
830                 size += 2  // s1.Index
831                 size += 64 // s1.Name
832         }
833         return size
834 }
835 func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) {
836         var buf *codec.Buffer
837         if b == nil {
838                 buf = codec.NewBuffer(make([]byte, m.Size()))
839         } else {
840                 buf = codec.NewBuffer(b)
841         }
842         buf.EncodeUint32(uint32(m.Response))
843         buf.EncodeUint32(uint32(m.Index))
844         buf.EncodeUint16(uint16(len(m.MessageTable)))
845         for j0 := 0; j0 < len(m.MessageTable); j0++ {
846                 var v0 MessageTableEntry
847                 if j0 < len(m.MessageTable) {
848                         v0 = m.MessageTable[j0]
849                 }
850                 buf.EncodeUint16(uint16(v0.Index))
851                 buf.EncodeString(v0.Name, 64)
852         }
853         return buf.Bytes(), nil
854 }
855 func (m *SockclntCreateReply) Unmarshal(b []byte) error {
856         buf := codec.NewBuffer(b)
857         m.Response = int32(buf.DecodeUint32())
858         m.Index = buf.DecodeUint32()
859         m.Count = buf.DecodeUint16()
860         m.MessageTable = make([]MessageTableEntry, int(m.Count))
861         for j0 := 0; j0 < len(m.MessageTable); j0++ {
862                 m.MessageTable[j0].Index = buf.DecodeUint16()
863                 m.MessageTable[j0].Name = buf.DecodeString(64)
864         }
865         return nil
866 }
867
868 // SockclntDelete defines message 'sockclnt_delete'.
869 type SockclntDelete struct {
870         Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
871 }
872
873 func (m *SockclntDelete) Reset()               { *m = SockclntDelete{} }
874 func (*SockclntDelete) GetMessageName() string { return "sockclnt_delete" }
875 func (*SockclntDelete) GetCrcString() string   { return "8ac76db6" }
876 func (*SockclntDelete) GetMessageType() api.MessageType {
877         return api.RequestMessage
878 }
879
880 func (m *SockclntDelete) Size() int {
881         if m == nil {
882                 return 0
883         }
884         var size int
885         size += 4 // m.Index
886         return size
887 }
888 func (m *SockclntDelete) Marshal(b []byte) ([]byte, error) {
889         var buf *codec.Buffer
890         if b == nil {
891                 buf = codec.NewBuffer(make([]byte, m.Size()))
892         } else {
893                 buf = codec.NewBuffer(b)
894         }
895         buf.EncodeUint32(uint32(m.Index))
896         return buf.Bytes(), nil
897 }
898 func (m *SockclntDelete) Unmarshal(b []byte) error {
899         buf := codec.NewBuffer(b)
900         m.Index = buf.DecodeUint32()
901         return nil
902 }
903
904 // SockclntDeleteReply defines message 'sockclnt_delete_reply'.
905 type SockclntDeleteReply struct {
906         Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
907 }
908
909 func (m *SockclntDeleteReply) Reset()               { *m = SockclntDeleteReply{} }
910 func (*SockclntDeleteReply) GetMessageName() string { return "sockclnt_delete_reply" }
911 func (*SockclntDeleteReply) GetCrcString() string   { return "8f38b1ee" }
912 func (*SockclntDeleteReply) GetMessageType() api.MessageType {
913         return api.ReplyMessage
914 }
915
916 func (m *SockclntDeleteReply) Size() int {
917         if m == nil {
918                 return 0
919         }
920         var size int
921         size += 4 // m.Response
922         return size
923 }
924 func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) {
925         var buf *codec.Buffer
926         if b == nil {
927                 buf = codec.NewBuffer(make([]byte, m.Size()))
928         } else {
929                 buf = codec.NewBuffer(b)
930         }
931         buf.EncodeUint32(uint32(m.Response))
932         return buf.Bytes(), nil
933 }
934 func (m *SockclntDeleteReply) Unmarshal(b []byte) error {
935         buf := codec.NewBuffer(b)
936         m.Response = int32(buf.DecodeUint32())
937         return nil
938 }
939
940 // TracePluginMsgIds defines message 'trace_plugin_msg_ids'.
941 type TracePluginMsgIds struct {
942         PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty"`
943         FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
944         LastMsgID  uint16 `binapi:"u16,name=last_msg_id" json:"last_msg_id,omitempty"`
945 }
946
947 func (m *TracePluginMsgIds) Reset()               { *m = TracePluginMsgIds{} }
948 func (*TracePluginMsgIds) GetMessageName() string { return "trace_plugin_msg_ids" }
949 func (*TracePluginMsgIds) GetCrcString() string   { return "f476d3ce" }
950 func (*TracePluginMsgIds) GetMessageType() api.MessageType {
951         return api.RequestMessage
952 }
953
954 func (m *TracePluginMsgIds) Size() int {
955         if m == nil {
956                 return 0
957         }
958         var size int
959         size += 128 // m.PluginName
960         size += 2   // m.FirstMsgID
961         size += 2   // m.LastMsgID
962         return size
963 }
964 func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) {
965         var buf *codec.Buffer
966         if b == nil {
967                 buf = codec.NewBuffer(make([]byte, m.Size()))
968         } else {
969                 buf = codec.NewBuffer(b)
970         }
971         buf.EncodeString(m.PluginName, 128)
972         buf.EncodeUint16(uint16(m.FirstMsgID))
973         buf.EncodeUint16(uint16(m.LastMsgID))
974         return buf.Bytes(), nil
975 }
976 func (m *TracePluginMsgIds) Unmarshal(b []byte) error {
977         buf := codec.NewBuffer(b)
978         m.PluginName = buf.DecodeString(128)
979         m.FirstMsgID = buf.DecodeUint16()
980         m.LastMsgID = buf.DecodeUint16()
981         return nil
982 }
983
984 func init() { file_memclnt_binapi_init() }
985 func file_memclnt_binapi_init() {
986         api.RegisterMessage((*APIVersions)(nil), "api_versions_51077d14")
987         api.RegisterMessage((*APIVersionsReply)(nil), "api_versions_reply_5f0d99d6")
988         api.RegisterMessage((*GetFirstMsgID)(nil), "get_first_msg_id_ebf79a66")
989         api.RegisterMessage((*GetFirstMsgIDReply)(nil), "get_first_msg_id_reply_7d337472")
990         api.RegisterMessage((*MemclntCreate)(nil), "memclnt_create_9c5e1c2f")
991         api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt_create_reply_42ec4560")
992         api.RegisterMessage((*MemclntDelete)(nil), "memclnt_delete_7e1c04e3")
993         api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt_delete_reply_3d3b6312")
994         api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt_keepalive_51077d14")
995         api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt_keepalive_reply_e8d4e804")
996         api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt_read_timeout_c3a3a452")
997         api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt_rx_thread_suspend_c3a3a452")
998         api.RegisterMessage((*RPCCall)(nil), "rpc_call_7e8a2c95")
999         api.RegisterMessage((*RPCCallReply)(nil), "rpc_call_reply_e8d4e804")
1000         api.RegisterMessage((*RxThreadExit)(nil), "rx_thread_exit_c3a3a452")
1001         api.RegisterMessage((*SockInitShm)(nil), "sock_init_shm_51646d92")
1002         api.RegisterMessage((*SockInitShmReply)(nil), "sock_init_shm_reply_e8d4e804")
1003         api.RegisterMessage((*SockclntCreate)(nil), "sockclnt_create_455fb9c4")
1004         api.RegisterMessage((*SockclntCreateReply)(nil), "sockclnt_create_reply_35166268")
1005         api.RegisterMessage((*SockclntDelete)(nil), "sockclnt_delete_8ac76db6")
1006         api.RegisterMessage((*SockclntDeleteReply)(nil), "sockclnt_delete_reply_8f38b1ee")
1007         api.RegisterMessage((*TracePluginMsgIds)(nil), "trace_plugin_msg_ids_f476d3ce")
1008 }
1009
1010 // Messages returns list of all messages in this module.
1011 func AllMessages() []api.Message {
1012         return []api.Message{
1013                 (*APIVersions)(nil),
1014                 (*APIVersionsReply)(nil),
1015                 (*GetFirstMsgID)(nil),
1016                 (*GetFirstMsgIDReply)(nil),
1017                 (*MemclntCreate)(nil),
1018                 (*MemclntCreateReply)(nil),
1019                 (*MemclntDelete)(nil),
1020                 (*MemclntDeleteReply)(nil),
1021                 (*MemclntKeepalive)(nil),
1022                 (*MemclntKeepaliveReply)(nil),
1023                 (*MemclntReadTimeout)(nil),
1024                 (*MemclntRxThreadSuspend)(nil),
1025                 (*RPCCall)(nil),
1026                 (*RPCCallReply)(nil),
1027                 (*RxThreadExit)(nil),
1028                 (*SockInitShm)(nil),
1029                 (*SockInitShmReply)(nil),
1030                 (*SockclntCreate)(nil),
1031                 (*SockclntCreateReply)(nil),
1032                 (*SockclntDelete)(nil),
1033                 (*SockclntDeleteReply)(nil),
1034                 (*TracePluginMsgIds)(nil),
1035         }
1036 }