1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.6.0-dev
5 // source: /usr/share/vpp/api/core/memclnt.api.json
7 // Package memclnt contains generated bindings for API file memclnt.api.
16 api "go.fd.io/govpp/api"
17 codec "go.fd.io/govpp/codec"
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
29 VersionCrc = 0x230bb938
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"`
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"`
46 // APIVersions defines message 'api_versions'.
47 type APIVersions struct{}
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
56 func (m *APIVersions) Size() (size int) {
62 func (m *APIVersions) Marshal(b []byte) ([]byte, error) {
64 b = make([]byte, m.Size())
66 buf := codec.NewBuffer(b)
67 return buf.Bytes(), nil
69 func (m *APIVersions) Unmarshal(b []byte) error {
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"`
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
87 func (m *APIVersionsReply) Size() (size int) {
93 for j1 := 0; j1 < len(m.APIVersions); j1++ {
96 if j1 < len(m.APIVersions) {
97 s1 = m.APIVersions[j1]
100 size += 4 // s1.Minor
101 size += 4 // s1.Patch
102 size += 64 // s1.Name
106 func (m *APIVersionsReply) Marshal(b []byte) ([]byte, error) {
108 b = make([]byte, m.Size())
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]
118 buf.EncodeUint32(v0.Major)
119 buf.EncodeUint32(v0.Minor)
120 buf.EncodeUint32(v0.Patch)
121 buf.EncodeString(v0.Name, 64)
123 return buf.Bytes(), nil
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)
139 // ControlPing defines message 'control_ping'.
140 type ControlPing struct{}
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
149 func (m *ControlPing) Size() (size int) {
155 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
157 b = make([]byte, m.Size())
159 buf := codec.NewBuffer(b)
160 return buf.Bytes(), nil
162 func (m *ControlPing) Unmarshal(b []byte) error {
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"`
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
180 func (m *ControlPingReply) Size() (size int) {
184 size += 4 // m.Retval
185 size += 4 // m.ClientIndex
186 size += 4 // m.VpePID
189 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
191 b = make([]byte, m.Size())
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
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()
207 // GetFirstMsgID defines message 'get_first_msg_id'.
208 type GetFirstMsgID struct {
209 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
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
219 func (m *GetFirstMsgID) Size() (size int) {
226 func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) {
228 b = make([]byte, m.Size())
230 buf := codec.NewBuffer(b)
231 buf.EncodeString(m.Name, 64)
232 return buf.Bytes(), nil
234 func (m *GetFirstMsgID) Unmarshal(b []byte) error {
235 buf := codec.NewBuffer(b)
236 m.Name = buf.DecodeString(64)
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"`
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
253 func (m *GetFirstMsgIDReply) Size() (size int) {
257 size += 4 // m.Retval
258 size += 2 // m.FirstMsgID
261 func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) {
263 b = make([]byte, m.Size())
265 buf := codec.NewBuffer(b)
266 buf.EncodeInt32(m.Retval)
267 buf.EncodeUint16(m.FirstMsgID)
268 return buf.Bytes(), nil
270 func (m *GetFirstMsgIDReply) Unmarshal(b []byte) error {
271 buf := codec.NewBuffer(b)
272 m.Retval = buf.DecodeInt32()
273 m.FirstMsgID = buf.DecodeUint16()
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"`
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
292 func (m *MemclntCreate) Size() (size int) {
296 size += 4 // m.CtxQuota
297 size += 8 // m.InputQueue
299 size += 4 * 8 // m.APIVersions
302 func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) {
304 b = make([]byte, m.Size())
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++ {
312 if i < len(m.APIVersions) {
313 x = uint32(m.APIVersions[i])
317 return buf.Bytes(), nil
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()
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"`
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
346 func (m *MemclntCreateReply) Size() (size int) {
350 size += 4 // m.Response
351 size += 8 // m.Handle
353 size += 8 // m.MessageTable
356 func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) {
358 b = make([]byte, m.Size())
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
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()
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"`
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
390 func (m *MemclntDelete) Size() (size int) {
395 size += 8 // m.Handle
396 size += 1 // m.DoCleanup
399 func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) {
401 b = make([]byte, m.Size())
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
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()
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"`
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
430 func (m *MemclntDeleteReply) Size() (size int) {
434 size += 4 // m.Response
435 size += 8 // m.Handle
438 func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) {
440 b = make([]byte, m.Size())
442 buf := codec.NewBuffer(b)
443 buf.EncodeInt32(m.Response)
444 buf.EncodeUint64(m.Handle)
445 return buf.Bytes(), nil
447 func (m *MemclntDeleteReply) Unmarshal(b []byte) error {
448 buf := codec.NewBuffer(b)
449 m.Response = buf.DecodeInt32()
450 m.Handle = buf.DecodeUint64()
454 // MemclntKeepalive defines message 'memclnt_keepalive'.
455 type MemclntKeepalive struct{}
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
464 func (m *MemclntKeepalive) Size() (size int) {
470 func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) {
472 b = make([]byte, m.Size())
474 buf := codec.NewBuffer(b)
475 return buf.Bytes(), nil
477 func (m *MemclntKeepalive) Unmarshal(b []byte) error {
481 // MemclntKeepaliveReply defines message 'memclnt_keepalive_reply'.
482 type MemclntKeepaliveReply struct {
483 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
493 func (m *MemclntKeepaliveReply) Size() (size int) {
497 size += 4 // m.Retval
500 func (m *MemclntKeepaliveReply) Marshal(b []byte) ([]byte, error) {
502 b = make([]byte, m.Size())
504 buf := codec.NewBuffer(b)
505 buf.EncodeInt32(m.Retval)
506 return buf.Bytes(), nil
508 func (m *MemclntKeepaliveReply) Unmarshal(b []byte) error {
509 buf := codec.NewBuffer(b)
510 m.Retval = buf.DecodeInt32()
514 // MemclntReadTimeout defines message 'memclnt_read_timeout'.
515 type MemclntReadTimeout struct {
516 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
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
526 func (m *MemclntReadTimeout) Size() (size int) {
533 func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) {
535 b = make([]byte, m.Size())
537 buf := codec.NewBuffer(b)
538 buf.EncodeUint8(m.Dummy)
539 return buf.Bytes(), nil
541 func (m *MemclntReadTimeout) Unmarshal(b []byte) error {
542 buf := codec.NewBuffer(b)
543 m.Dummy = buf.DecodeUint8()
547 // MemclntRxThreadSuspend defines message 'memclnt_rx_thread_suspend'.
548 type MemclntRxThreadSuspend struct {
549 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
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
559 func (m *MemclntRxThreadSuspend) Size() (size int) {
566 func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) {
568 b = make([]byte, m.Size())
570 buf := codec.NewBuffer(b)
571 buf.EncodeUint8(m.Dummy)
572 return buf.Bytes(), nil
574 func (m *MemclntRxThreadSuspend) Unmarshal(b []byte) error {
575 buf := codec.NewBuffer(b)
576 m.Dummy = buf.DecodeUint8()
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"`
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
597 func (m *RPCCall) Size() (size int) {
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
609 func (m *RPCCall) Marshal(b []byte) ([]byte, error) {
611 b = make([]byte, m.Size())
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
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)))
634 // RPCCallReply defines message 'rpc_call_reply'.
635 type RPCCallReply struct {
636 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
646 func (m *RPCCallReply) Size() (size int) {
650 size += 4 // m.Retval
653 func (m *RPCCallReply) Marshal(b []byte) ([]byte, error) {
655 b = make([]byte, m.Size())
657 buf := codec.NewBuffer(b)
658 buf.EncodeInt32(m.Retval)
659 return buf.Bytes(), nil
661 func (m *RPCCallReply) Unmarshal(b []byte) error {
662 buf := codec.NewBuffer(b)
663 m.Retval = buf.DecodeInt32()
667 // RxThreadExit defines message 'rx_thread_exit'.
668 type RxThreadExit struct {
669 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
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
679 func (m *RxThreadExit) Size() (size int) {
686 func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) {
688 b = make([]byte, m.Size())
690 buf := codec.NewBuffer(b)
691 buf.EncodeUint8(m.Dummy)
692 return buf.Bytes(), nil
694 func (m *RxThreadExit) Unmarshal(b []byte) error {
695 buf := codec.NewBuffer(b)
696 m.Dummy = buf.DecodeUint8()
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"`
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
714 func (m *SockInitShm) Size() (size int) {
718 size += 4 // m.RequestedSize
719 size += 1 // m.Nitems
720 size += 8 * len(m.Configs) // m.Configs
723 func (m *SockInitShm) Marshal(b []byte) ([]byte, error) {
725 b = make([]byte, m.Size())
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++ {
732 if i < len(m.Configs) {
733 x = uint64(m.Configs[i])
737 return buf.Bytes(), nil
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()
750 // SockInitShmReply defines message 'sock_init_shm_reply'.
751 type SockInitShmReply struct {
752 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
762 func (m *SockInitShmReply) Size() (size int) {
766 size += 4 // m.Retval
769 func (m *SockInitShmReply) Marshal(b []byte) ([]byte, error) {
771 b = make([]byte, m.Size())
773 buf := codec.NewBuffer(b)
774 buf.EncodeInt32(m.Retval)
775 return buf.Bytes(), nil
777 func (m *SockInitShmReply) Unmarshal(b []byte) error {
778 buf := codec.NewBuffer(b)
779 m.Retval = buf.DecodeInt32()
783 // SockclntCreate defines message 'sockclnt_create'.
784 type SockclntCreate struct {
785 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
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
795 func (m *SockclntCreate) Size() (size int) {
802 func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) {
804 b = make([]byte, m.Size())
806 buf := codec.NewBuffer(b)
807 buf.EncodeString(m.Name, 64)
808 return buf.Bytes(), nil
810 func (m *SockclntCreate) Unmarshal(b []byte) error {
811 buf := codec.NewBuffer(b)
812 m.Name = buf.DecodeString(64)
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"`
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
831 func (m *SockclntCreateReply) Size() (size int) {
835 size += 4 // m.Response
838 for j1 := 0; j1 < len(m.MessageTable); j1++ {
839 var s1 MessageTableEntry
841 if j1 < len(m.MessageTable) {
842 s1 = m.MessageTable[j1]
844 size += 2 // s1.Index
845 size += 64 // s1.Name
849 func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) {
851 b = make([]byte, m.Size())
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]
862 buf.EncodeUint16(v0.Index)
863 buf.EncodeString(v0.Name, 64)
865 return buf.Bytes(), nil
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)
880 // SockclntDelete defines message 'sockclnt_delete'.
881 type SockclntDelete struct {
882 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
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
892 func (m *SockclntDelete) Size() (size int) {
899 func (m *SockclntDelete) Marshal(b []byte) ([]byte, error) {
901 b = make([]byte, m.Size())
903 buf := codec.NewBuffer(b)
904 buf.EncodeUint32(m.Index)
905 return buf.Bytes(), nil
907 func (m *SockclntDelete) Unmarshal(b []byte) error {
908 buf := codec.NewBuffer(b)
909 m.Index = buf.DecodeUint32()
913 // SockclntDeleteReply defines message 'sockclnt_delete_reply'.
914 type SockclntDeleteReply struct {
915 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
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
925 func (m *SockclntDeleteReply) Size() (size int) {
929 size += 4 // m.Response
932 func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) {
934 b = make([]byte, m.Size())
936 buf := codec.NewBuffer(b)
937 buf.EncodeInt32(m.Response)
938 return buf.Bytes(), nil
940 func (m *SockclntDeleteReply) Unmarshal(b []byte) error {
941 buf := codec.NewBuffer(b)
942 m.Response = buf.DecodeInt32()
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"`
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
960 func (m *TracePluginMsgIds) Size() (size int) {
964 size += 128 // m.PluginName
965 size += 2 // m.FirstMsgID
966 size += 2 // m.LastMsgID
969 func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) {
971 b = make([]byte, m.Size())
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
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()
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")
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),
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),