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