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