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