1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
4 // VPP: 20.01-45~g7a071e370~b63
5 // source: /usr/share/vpp/api/core/memclnt.api.json
8 Package memclnt contains generated code for VPP binary API defined by memclnt.api (version 2.1.0).
24 api "git.fd.io/govpp.git/api"
25 codec "git.fd.io/govpp.git/codec"
26 struc "github.com/lunixbochs/struc"
29 // This is a compile-time assertion to ensure that this generated file
30 // is compatible with the GoVPP api package it is being compiled against.
31 // A compilation error at this line likely means your copy of the
32 // GoVPP api package needs to be updated.
33 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
36 // ModuleName is the name of this module.
37 ModuleName = "memclnt"
38 // APIVersion is the API version of this module.
40 // VersionCrc is the CRC of this module.
41 VersionCrc = 0x8d3dd881
44 // MessageTableEntry represents VPP binary API type 'message_table_entry'.
45 type MessageTableEntry struct {
46 Index uint16 `binapi:"u16,name=index" json:"index,omitempty"`
47 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
50 func (*MessageTableEntry) GetTypeName() string { return "message_table_entry" }
52 // ModuleVersion represents VPP binary API type 'module_version'.
53 type ModuleVersion struct {
54 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
55 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
56 Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
57 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
60 func (*ModuleVersion) GetTypeName() string { return "module_version" }
62 // APIVersions represents VPP binary API message 'api_versions'.
63 type APIVersions struct{}
65 func (m *APIVersions) Reset() { *m = APIVersions{} }
66 func (*APIVersions) GetMessageName() string { return "api_versions" }
67 func (*APIVersions) GetCrcString() string { return "51077d14" }
68 func (*APIVersions) GetMessageType() api.MessageType { return api.RequestMessage }
70 func (m *APIVersions) Size() int {
77 func (m *APIVersions) Marshal(b []byte) ([]byte, error) {
84 buf = make([]byte, m.Size())
90 func (m *APIVersions) Unmarshal(tmp []byte) error {
98 // APIVersionsReply represents VPP binary API message 'api_versions_reply'.
99 type APIVersionsReply struct {
100 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
101 Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=APIVersions"`
102 APIVersions []ModuleVersion `binapi:"module_version[count],name=api_versions" json:"api_versions,omitempty"`
105 func (m *APIVersionsReply) Reset() { *m = APIVersionsReply{} }
106 func (*APIVersionsReply) GetMessageName() string { return "api_versions_reply" }
107 func (*APIVersionsReply) GetCrcString() string { return "5f0d99d6" }
108 func (*APIVersionsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
110 func (m *APIVersionsReply) Size() int {
119 // field[1] m.APIVersions
120 for j1 := 0; j1 < len(m.APIVersions); j1++ {
123 if j1 < len(m.APIVersions) {
124 s1 = m.APIVersions[j1]
137 func (m *APIVersionsReply) Marshal(b []byte) ([]byte, error) {
138 o := binary.BigEndian
144 buf = make([]byte, m.Size())
149 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
152 o.PutUint32(buf[pos:pos+4], uint32(len(m.APIVersions)))
154 // field[1] m.APIVersions
155 for j1 := 0; j1 < len(m.APIVersions); j1++ {
157 if j1 < len(m.APIVersions) {
158 v1 = m.APIVersions[j1]
161 o.PutUint32(buf[pos:pos+4], uint32(v1.Major))
164 o.PutUint32(buf[pos:pos+4], uint32(v1.Minor))
167 o.PutUint32(buf[pos:pos+4], uint32(v1.Patch))
170 copy(buf[pos:pos+64], v1.Name)
175 func (m *APIVersionsReply) Unmarshal(tmp []byte) error {
176 o := binary.BigEndian
181 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
184 m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
186 // field[1] m.APIVersions
187 m.APIVersions = make([]ModuleVersion, int(m.Count))
188 for j1 := 0; j1 < int(m.Count); j1++ {
189 // field[2] m.APIVersions[j1].Major
190 m.APIVersions[j1].Major = uint32(o.Uint32(tmp[pos : pos+4]))
192 // field[2] m.APIVersions[j1].Minor
193 m.APIVersions[j1].Minor = uint32(o.Uint32(tmp[pos : pos+4]))
195 // field[2] m.APIVersions[j1].Patch
196 m.APIVersions[j1].Patch = uint32(o.Uint32(tmp[pos : pos+4]))
198 // field[2] m.APIVersions[j1].Name
200 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
201 m.APIVersions[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
208 // GetFirstMsgID represents VPP binary API message 'get_first_msg_id'.
209 type GetFirstMsgID struct {
210 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
213 func (m *GetFirstMsgID) Reset() { *m = GetFirstMsgID{} }
214 func (*GetFirstMsgID) GetMessageName() string { return "get_first_msg_id" }
215 func (*GetFirstMsgID) GetCrcString() string { return "ebf79a66" }
216 func (*GetFirstMsgID) GetMessageType() api.MessageType { return api.RequestMessage }
218 func (m *GetFirstMsgID) Size() int {
227 func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) {
228 o := binary.BigEndian
234 buf = make([]byte, m.Size())
239 copy(buf[pos:pos+64], m.Name)
243 func (m *GetFirstMsgID) Unmarshal(tmp []byte) error {
244 o := binary.BigEndian
250 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
251 m.Name = codec.DecodeString(tmp[pos : pos+nul])
257 // GetFirstMsgIDReply represents VPP binary API message 'get_first_msg_id_reply'.
258 type GetFirstMsgIDReply struct {
259 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
260 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
263 func (m *GetFirstMsgIDReply) Reset() { *m = GetFirstMsgIDReply{} }
264 func (*GetFirstMsgIDReply) GetMessageName() string { return "get_first_msg_id_reply" }
265 func (*GetFirstMsgIDReply) GetCrcString() string { return "7d337472" }
266 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType { return api.ReplyMessage }
268 func (m *GetFirstMsgIDReply) Size() int {
275 // field[1] m.FirstMsgID
279 func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) {
280 o := binary.BigEndian
286 buf = make([]byte, m.Size())
291 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
293 // field[1] m.FirstMsgID
294 o.PutUint16(buf[pos:pos+2], uint16(m.FirstMsgID))
298 func (m *GetFirstMsgIDReply) Unmarshal(tmp []byte) error {
299 o := binary.BigEndian
304 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
306 // field[1] m.FirstMsgID
307 m.FirstMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
312 // MemclntCreate represents VPP binary API message 'memclnt_create'.
313 type MemclntCreate struct {
314 CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"`
315 InputQueue uint64 `binapi:"u64,name=input_queue" json:"input_queue,omitempty"`
316 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
317 APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty" struc:"[8]uint32"`
320 func (m *MemclntCreate) Reset() { *m = MemclntCreate{} }
321 func (*MemclntCreate) GetMessageName() string { return "memclnt_create" }
322 func (*MemclntCreate) GetCrcString() string { return "9c5e1c2f" }
323 func (*MemclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage }
325 func (m *MemclntCreate) Size() int {
330 // field[1] m.CtxQuota
332 // field[1] m.InputQueue
336 // field[1] m.APIVersions
340 func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) {
341 o := binary.BigEndian
347 buf = make([]byte, m.Size())
351 // field[1] m.CtxQuota
352 o.PutUint32(buf[pos:pos+4], uint32(m.CtxQuota))
354 // field[1] m.InputQueue
355 o.PutUint64(buf[pos:pos+8], uint64(m.InputQueue))
358 copy(buf[pos:pos+64], m.Name)
360 // field[1] m.APIVersions
361 for i := 0; i < 8; i++ {
363 if i < len(m.APIVersions) {
364 x = uint32(m.APIVersions[i])
366 o.PutUint32(buf[pos:pos+4], uint32(x))
371 func (m *MemclntCreate) Unmarshal(tmp []byte) error {
372 o := binary.BigEndian
376 // field[1] m.CtxQuota
377 m.CtxQuota = int32(o.Uint32(tmp[pos : pos+4]))
379 // field[1] m.InputQueue
380 m.InputQueue = uint64(o.Uint64(tmp[pos : pos+8]))
384 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
385 m.Name = codec.DecodeString(tmp[pos : pos+nul])
388 // field[1] m.APIVersions
389 m.APIVersions = make([]uint32, 8)
390 for i := 0; i < len(m.APIVersions); i++ {
391 m.APIVersions[i] = uint32(o.Uint32(tmp[pos : pos+4]))
397 // MemclntCreateReply represents VPP binary API message 'memclnt_create_reply'.
398 type MemclntCreateReply struct {
399 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
400 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
401 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
402 MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"`
405 func (m *MemclntCreateReply) Reset() { *m = MemclntCreateReply{} }
406 func (*MemclntCreateReply) GetMessageName() string { return "memclnt_create_reply" }
407 func (*MemclntCreateReply) GetCrcString() string { return "42ec4560" }
408 func (*MemclntCreateReply) GetMessageType() api.MessageType { return api.ReplyMessage }
410 func (m *MemclntCreateReply) Size() int {
415 // field[1] m.Response
421 // field[1] m.MessageTable
425 func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) {
426 o := binary.BigEndian
432 buf = make([]byte, m.Size())
436 // field[1] m.Response
437 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
440 o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
443 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
445 // field[1] m.MessageTable
446 o.PutUint64(buf[pos:pos+8], uint64(m.MessageTable))
450 func (m *MemclntCreateReply) Unmarshal(tmp []byte) error {
451 o := binary.BigEndian
455 // field[1] m.Response
456 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
459 m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
462 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
464 // field[1] m.MessageTable
465 m.MessageTable = uint64(o.Uint64(tmp[pos : pos+8]))
470 // MemclntDelete represents VPP binary API message 'memclnt_delete'.
471 type MemclntDelete struct {
472 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
473 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
474 DoCleanup bool `binapi:"bool,name=do_cleanup" json:"do_cleanup,omitempty"`
477 func (m *MemclntDelete) Reset() { *m = MemclntDelete{} }
478 func (*MemclntDelete) GetMessageName() string { return "memclnt_delete" }
479 func (*MemclntDelete) GetCrcString() string { return "7e1c04e3" }
480 func (*MemclntDelete) GetMessageType() api.MessageType { return api.OtherMessage }
482 func (m *MemclntDelete) Size() int {
491 // field[1] m.DoCleanup
495 func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) {
496 o := binary.BigEndian
502 buf = make([]byte, m.Size())
507 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
510 o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
512 // field[1] m.DoCleanup
519 func (m *MemclntDelete) Unmarshal(tmp []byte) error {
520 o := binary.BigEndian
525 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
528 m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
530 // field[1] m.DoCleanup
531 m.DoCleanup = tmp[pos] != 0
536 // MemclntDeleteReply represents VPP binary API message 'memclnt_delete_reply'.
537 type MemclntDeleteReply struct {
538 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
539 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
542 func (m *MemclntDeleteReply) Reset() { *m = MemclntDeleteReply{} }
543 func (*MemclntDeleteReply) GetMessageName() string { return "memclnt_delete_reply" }
544 func (*MemclntDeleteReply) GetCrcString() string { return "3d3b6312" }
545 func (*MemclntDeleteReply) GetMessageType() api.MessageType { return api.OtherMessage }
547 func (m *MemclntDeleteReply) Size() int {
552 // field[1] m.Response
558 func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) {
559 o := binary.BigEndian
565 buf = make([]byte, m.Size())
569 // field[1] m.Response
570 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
573 o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
577 func (m *MemclntDeleteReply) Unmarshal(tmp []byte) error {
578 o := binary.BigEndian
582 // field[1] m.Response
583 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
586 m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
591 // MemclntKeepalive represents VPP binary API message 'memclnt_keepalive'.
592 type MemclntKeepalive struct{}
594 func (m *MemclntKeepalive) Reset() { *m = MemclntKeepalive{} }
595 func (*MemclntKeepalive) GetMessageName() string { return "memclnt_keepalive" }
596 func (*MemclntKeepalive) GetCrcString() string { return "51077d14" }
597 func (*MemclntKeepalive) GetMessageType() api.MessageType { return api.RequestMessage }
599 func (m *MemclntKeepalive) Size() int {
606 func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) {
607 o := binary.BigEndian
613 buf = make([]byte, m.Size())
619 func (m *MemclntKeepalive) Unmarshal(tmp []byte) error {
620 o := binary.BigEndian
627 // MemclntKeepaliveReply represents VPP binary API message 'memclnt_keepalive_reply'.
628 type MemclntKeepaliveReply struct {
629 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
632 func (m *MemclntKeepaliveReply) Reset() { *m = MemclntKeepaliveReply{} }
633 func (*MemclntKeepaliveReply) GetMessageName() string { return "memclnt_keepalive_reply" }
634 func (*MemclntKeepaliveReply) GetCrcString() string { return "e8d4e804" }
635 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType { return api.ReplyMessage }
637 func (m *MemclntKeepaliveReply) Size() int {
646 func (m *MemclntKeepaliveReply) Marshal(b []byte) ([]byte, error) {
647 o := binary.BigEndian
653 buf = make([]byte, m.Size())
658 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
662 func (m *MemclntKeepaliveReply) Unmarshal(tmp []byte) error {
663 o := binary.BigEndian
668 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
673 // MemclntReadTimeout represents VPP binary API message 'memclnt_read_timeout'.
674 type MemclntReadTimeout struct {
675 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
678 func (m *MemclntReadTimeout) Reset() { *m = MemclntReadTimeout{} }
679 func (*MemclntReadTimeout) GetMessageName() string { return "memclnt_read_timeout" }
680 func (*MemclntReadTimeout) GetCrcString() string { return "c3a3a452" }
681 func (*MemclntReadTimeout) GetMessageType() api.MessageType { return api.OtherMessage }
683 func (m *MemclntReadTimeout) Size() int {
692 func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) {
693 o := binary.BigEndian
699 buf = make([]byte, m.Size())
704 buf[pos] = uint8(m.Dummy)
708 func (m *MemclntReadTimeout) Unmarshal(tmp []byte) error {
709 o := binary.BigEndian
714 m.Dummy = uint8(tmp[pos])
719 // MemclntRxThreadSuspend represents VPP binary API message 'memclnt_rx_thread_suspend'.
720 type MemclntRxThreadSuspend struct {
721 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
724 func (m *MemclntRxThreadSuspend) Reset() { *m = MemclntRxThreadSuspend{} }
725 func (*MemclntRxThreadSuspend) GetMessageName() string { return "memclnt_rx_thread_suspend" }
726 func (*MemclntRxThreadSuspend) GetCrcString() string { return "c3a3a452" }
727 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType { return api.OtherMessage }
729 func (m *MemclntRxThreadSuspend) Size() int {
738 func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) {
739 o := binary.BigEndian
745 buf = make([]byte, m.Size())
750 buf[pos] = uint8(m.Dummy)
754 func (m *MemclntRxThreadSuspend) Unmarshal(tmp []byte) error {
755 o := binary.BigEndian
760 m.Dummy = uint8(tmp[pos])
765 // RPCCall represents VPP binary API message 'rpc_call'.
766 type RPCCall struct {
767 Function uint64 `binapi:"u64,name=function" json:"function,omitempty"`
768 Multicast uint8 `binapi:"u8,name=multicast" json:"multicast,omitempty"`
769 NeedBarrierSync uint8 `binapi:"u8,name=need_barrier_sync" json:"need_barrier_sync,omitempty"`
770 SendReply uint8 `binapi:"u8,name=send_reply" json:"send_reply,omitempty"`
771 DataLen uint32 `binapi:"u32,name=data_len" json:"data_len,omitempty" struc:"sizeof=Data"`
772 Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
775 func (m *RPCCall) Reset() { *m = RPCCall{} }
776 func (*RPCCall) GetMessageName() string { return "rpc_call" }
777 func (*RPCCall) GetCrcString() string { return "7e8a2c95" }
778 func (*RPCCall) GetMessageType() api.MessageType { return api.RequestMessage }
780 func (m *RPCCall) Size() int {
785 // field[1] m.Function
787 // field[1] m.Multicast
789 // field[1] m.NeedBarrierSync
791 // field[1] m.SendReply
793 // field[1] m.DataLen
796 size += 1 * len(m.Data)
799 func (m *RPCCall) Marshal(b []byte) ([]byte, error) {
800 o := binary.BigEndian
806 buf = make([]byte, m.Size())
810 // field[1] m.Function
811 o.PutUint64(buf[pos:pos+8], uint64(m.Function))
813 // field[1] m.Multicast
814 buf[pos] = uint8(m.Multicast)
816 // field[1] m.NeedBarrierSync
817 buf[pos] = uint8(m.NeedBarrierSync)
819 // field[1] m.SendReply
820 buf[pos] = uint8(m.SendReply)
822 // field[1] m.DataLen
823 o.PutUint32(buf[pos:pos+4], uint32(len(m.Data)))
826 for i := 0; i < len(m.Data); i++ {
836 func (m *RPCCall) Unmarshal(tmp []byte) error {
837 o := binary.BigEndian
841 // field[1] m.Function
842 m.Function = uint64(o.Uint64(tmp[pos : pos+8]))
844 // field[1] m.Multicast
845 m.Multicast = uint8(tmp[pos])
847 // field[1] m.NeedBarrierSync
848 m.NeedBarrierSync = uint8(tmp[pos])
850 // field[1] m.SendReply
851 m.SendReply = uint8(tmp[pos])
853 // field[1] m.DataLen
854 m.DataLen = uint32(o.Uint32(tmp[pos : pos+4]))
857 m.Data = make([]uint8, m.DataLen)
858 for i := 0; i < len(m.Data); i++ {
859 m.Data[i] = uint8(tmp[pos])
865 // RPCCallReply represents VPP binary API message 'rpc_call_reply'.
866 type RPCCallReply struct {
867 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
870 func (m *RPCCallReply) Reset() { *m = RPCCallReply{} }
871 func (*RPCCallReply) GetMessageName() string { return "rpc_call_reply" }
872 func (*RPCCallReply) GetCrcString() string { return "e8d4e804" }
873 func (*RPCCallReply) GetMessageType() api.MessageType { return api.ReplyMessage }
875 func (m *RPCCallReply) Size() int {
884 func (m *RPCCallReply) Marshal(b []byte) ([]byte, error) {
885 o := binary.BigEndian
891 buf = make([]byte, m.Size())
896 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
900 func (m *RPCCallReply) Unmarshal(tmp []byte) error {
901 o := binary.BigEndian
906 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
911 // RxThreadExit represents VPP binary API message 'rx_thread_exit'.
912 type RxThreadExit struct {
913 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
916 func (m *RxThreadExit) Reset() { *m = RxThreadExit{} }
917 func (*RxThreadExit) GetMessageName() string { return "rx_thread_exit" }
918 func (*RxThreadExit) GetCrcString() string { return "c3a3a452" }
919 func (*RxThreadExit) GetMessageType() api.MessageType { return api.OtherMessage }
921 func (m *RxThreadExit) Size() int {
930 func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) {
931 o := binary.BigEndian
937 buf = make([]byte, m.Size())
942 buf[pos] = uint8(m.Dummy)
946 func (m *RxThreadExit) Unmarshal(tmp []byte) error {
947 o := binary.BigEndian
952 m.Dummy = uint8(tmp[pos])
957 // SockInitShm represents VPP binary API message 'sock_init_shm'.
958 type SockInitShm struct {
959 RequestedSize uint32 `binapi:"u32,name=requested_size" json:"requested_size,omitempty"`
960 Nitems uint8 `binapi:"u8,name=nitems" json:"nitems,omitempty" struc:"sizeof=Configs"`
961 Configs []uint64 `binapi:"u64[nitems],name=configs" json:"configs,omitempty"`
964 func (m *SockInitShm) Reset() { *m = SockInitShm{} }
965 func (*SockInitShm) GetMessageName() string { return "sock_init_shm" }
966 func (*SockInitShm) GetCrcString() string { return "51646d92" }
967 func (*SockInitShm) GetMessageType() api.MessageType { return api.RequestMessage }
969 func (m *SockInitShm) Size() int {
974 // field[1] m.RequestedSize
978 // field[1] m.Configs
979 size += 8 * len(m.Configs)
982 func (m *SockInitShm) Marshal(b []byte) ([]byte, error) {
983 o := binary.BigEndian
989 buf = make([]byte, m.Size())
993 // field[1] m.RequestedSize
994 o.PutUint32(buf[pos:pos+4], uint32(m.RequestedSize))
997 buf[pos] = uint8(len(m.Configs))
999 // field[1] m.Configs
1000 for i := 0; i < len(m.Configs); i++ {
1002 if i < len(m.Configs) {
1003 x = uint64(m.Configs[i])
1005 o.PutUint64(buf[pos:pos+8], uint64(x))
1010 func (m *SockInitShm) Unmarshal(tmp []byte) error {
1011 o := binary.BigEndian
1015 // field[1] m.RequestedSize
1016 m.RequestedSize = uint32(o.Uint32(tmp[pos : pos+4]))
1018 // field[1] m.Nitems
1019 m.Nitems = uint8(tmp[pos])
1021 // field[1] m.Configs
1022 m.Configs = make([]uint64, m.Nitems)
1023 for i := 0; i < len(m.Configs); i++ {
1024 m.Configs[i] = uint64(o.Uint64(tmp[pos : pos+8]))
1030 // SockInitShmReply represents VPP binary API message 'sock_init_shm_reply'.
1031 type SockInitShmReply struct {
1032 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1035 func (m *SockInitShmReply) Reset() { *m = SockInitShmReply{} }
1036 func (*SockInitShmReply) GetMessageName() string { return "sock_init_shm_reply" }
1037 func (*SockInitShmReply) GetCrcString() string { return "e8d4e804" }
1038 func (*SockInitShmReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1040 func (m *SockInitShmReply) Size() int {
1045 // field[1] m.Retval
1049 func (m *SockInitShmReply) Marshal(b []byte) ([]byte, error) {
1050 o := binary.BigEndian
1056 buf = make([]byte, m.Size())
1060 // field[1] m.Retval
1061 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1065 func (m *SockInitShmReply) Unmarshal(tmp []byte) error {
1066 o := binary.BigEndian
1070 // field[1] m.Retval
1071 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1076 // SockclntCreate represents VPP binary API message 'sockclnt_create'.
1077 type SockclntCreate struct {
1078 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
1081 func (m *SockclntCreate) Reset() { *m = SockclntCreate{} }
1082 func (*SockclntCreate) GetMessageName() string { return "sockclnt_create" }
1083 func (*SockclntCreate) GetCrcString() string { return "455fb9c4" }
1084 func (*SockclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage }
1086 func (m *SockclntCreate) Size() int {
1095 func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) {
1096 o := binary.BigEndian
1102 buf = make([]byte, m.Size())
1107 copy(buf[pos:pos+64], m.Name)
1111 func (m *SockclntCreate) Unmarshal(tmp []byte) error {
1112 o := binary.BigEndian
1118 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1119 m.Name = codec.DecodeString(tmp[pos : pos+nul])
1125 // SockclntCreateReply represents VPP binary API message 'sockclnt_create_reply'.
1126 type SockclntCreateReply struct {
1127 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
1128 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
1129 Count uint16 `binapi:"u16,name=count" json:"count,omitempty" struc:"sizeof=MessageTable"`
1130 MessageTable []MessageTableEntry `binapi:"message_table_entry[count],name=message_table" json:"message_table,omitempty"`
1133 func (m *SockclntCreateReply) Reset() { *m = SockclntCreateReply{} }
1134 func (*SockclntCreateReply) GetMessageName() string { return "sockclnt_create_reply" }
1135 func (*SockclntCreateReply) GetCrcString() string { return "35166268" }
1136 func (*SockclntCreateReply) GetMessageType() api.MessageType { return api.RequestMessage }
1138 func (m *SockclntCreateReply) Size() int {
1143 // field[1] m.Response
1149 // field[1] m.MessageTable
1150 for j1 := 0; j1 < len(m.MessageTable); j1++ {
1151 var s1 MessageTableEntry
1153 if j1 < len(m.MessageTable) {
1154 s1 = m.MessageTable[j1]
1156 // field[2] s1.Index
1163 func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) {
1164 o := binary.BigEndian
1170 buf = make([]byte, m.Size())
1174 // field[1] m.Response
1175 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
1178 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
1181 o.PutUint16(buf[pos:pos+2], uint16(len(m.MessageTable)))
1183 // field[1] m.MessageTable
1184 for j1 := 0; j1 < len(m.MessageTable); j1++ {
1185 var v1 MessageTableEntry
1186 if j1 < len(m.MessageTable) {
1187 v1 = m.MessageTable[j1]
1189 // field[2] v1.Index
1190 o.PutUint16(buf[pos:pos+2], uint16(v1.Index))
1193 copy(buf[pos:pos+64], v1.Name)
1198 func (m *SockclntCreateReply) Unmarshal(tmp []byte) error {
1199 o := binary.BigEndian
1203 // field[1] m.Response
1204 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
1207 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
1210 m.Count = uint16(o.Uint16(tmp[pos : pos+2]))
1212 // field[1] m.MessageTable
1213 m.MessageTable = make([]MessageTableEntry, int(m.Count))
1214 for j1 := 0; j1 < int(m.Count); j1++ {
1215 // field[2] m.MessageTable[j1].Index
1216 m.MessageTable[j1].Index = uint16(o.Uint16(tmp[pos : pos+2]))
1218 // field[2] m.MessageTable[j1].Name
1220 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1221 m.MessageTable[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
1228 // SockclntDelete represents VPP binary API message 'sockclnt_delete'.
1229 type SockclntDelete struct {
1230 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
1233 func (m *SockclntDelete) Reset() { *m = SockclntDelete{} }
1234 func (*SockclntDelete) GetMessageName() string { return "sockclnt_delete" }
1235 func (*SockclntDelete) GetCrcString() string { return "8ac76db6" }
1236 func (*SockclntDelete) GetMessageType() api.MessageType { return api.RequestMessage }
1238 func (m *SockclntDelete) Size() int {
1247 func (m *SockclntDelete) Marshal(b []byte) ([]byte, error) {
1248 o := binary.BigEndian
1254 buf = make([]byte, m.Size())
1259 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
1263 func (m *SockclntDelete) Unmarshal(tmp []byte) error {
1264 o := binary.BigEndian
1269 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
1274 // SockclntDeleteReply represents VPP binary API message 'sockclnt_delete_reply'.
1275 type SockclntDeleteReply struct {
1276 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
1279 func (m *SockclntDeleteReply) Reset() { *m = SockclntDeleteReply{} }
1280 func (*SockclntDeleteReply) GetMessageName() string { return "sockclnt_delete_reply" }
1281 func (*SockclntDeleteReply) GetCrcString() string { return "8f38b1ee" }
1282 func (*SockclntDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1284 func (m *SockclntDeleteReply) Size() int {
1289 // field[1] m.Response
1293 func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) {
1294 o := binary.BigEndian
1300 buf = make([]byte, m.Size())
1304 // field[1] m.Response
1305 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
1309 func (m *SockclntDeleteReply) Unmarshal(tmp []byte) error {
1310 o := binary.BigEndian
1314 // field[1] m.Response
1315 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
1320 // TracePluginMsgIds represents VPP binary API message 'trace_plugin_msg_ids'.
1321 type TracePluginMsgIds struct {
1322 PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty" struc:"[128]byte"`
1323 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
1324 LastMsgID uint16 `binapi:"u16,name=last_msg_id" json:"last_msg_id,omitempty"`
1327 func (m *TracePluginMsgIds) Reset() { *m = TracePluginMsgIds{} }
1328 func (*TracePluginMsgIds) GetMessageName() string { return "trace_plugin_msg_ids" }
1329 func (*TracePluginMsgIds) GetCrcString() string { return "f476d3ce" }
1330 func (*TracePluginMsgIds) GetMessageType() api.MessageType { return api.RequestMessage }
1332 func (m *TracePluginMsgIds) Size() int {
1337 // field[1] m.PluginName
1339 // field[1] m.FirstMsgID
1341 // field[1] m.LastMsgID
1345 func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) {
1346 o := binary.BigEndian
1352 buf = make([]byte, m.Size())
1356 // field[1] m.PluginName
1357 copy(buf[pos:pos+128], m.PluginName)
1359 // field[1] m.FirstMsgID
1360 o.PutUint16(buf[pos:pos+2], uint16(m.FirstMsgID))
1362 // field[1] m.LastMsgID
1363 o.PutUint16(buf[pos:pos+2], uint16(m.LastMsgID))
1367 func (m *TracePluginMsgIds) Unmarshal(tmp []byte) error {
1368 o := binary.BigEndian
1372 // field[1] m.PluginName
1374 nul := bytes.Index(tmp[pos:pos+128], []byte{0x00})
1375 m.PluginName = codec.DecodeString(tmp[pos : pos+nul])
1378 // field[1] m.FirstMsgID
1379 m.FirstMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
1381 // field[1] m.LastMsgID
1382 m.LastMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
1387 func init() { file_memclnt_binapi_init() }
1388 func file_memclnt_binapi_init() {
1389 api.RegisterMessage((*APIVersions)(nil), "memclnt.APIVersions")
1390 api.RegisterMessage((*APIVersionsReply)(nil), "memclnt.APIVersionsReply")
1391 api.RegisterMessage((*GetFirstMsgID)(nil), "memclnt.GetFirstMsgID")
1392 api.RegisterMessage((*GetFirstMsgIDReply)(nil), "memclnt.GetFirstMsgIDReply")
1393 api.RegisterMessage((*MemclntCreate)(nil), "memclnt.MemclntCreate")
1394 api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt.MemclntCreateReply")
1395 api.RegisterMessage((*MemclntDelete)(nil), "memclnt.MemclntDelete")
1396 api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt.MemclntDeleteReply")
1397 api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt.MemclntKeepalive")
1398 api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt.MemclntKeepaliveReply")
1399 api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt.MemclntReadTimeout")
1400 api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt.MemclntRxThreadSuspend")
1401 api.RegisterMessage((*RPCCall)(nil), "memclnt.RPCCall")
1402 api.RegisterMessage((*RPCCallReply)(nil), "memclnt.RPCCallReply")
1403 api.RegisterMessage((*RxThreadExit)(nil), "memclnt.RxThreadExit")
1404 api.RegisterMessage((*SockInitShm)(nil), "memclnt.SockInitShm")
1405 api.RegisterMessage((*SockInitShmReply)(nil), "memclnt.SockInitShmReply")
1406 api.RegisterMessage((*SockclntCreate)(nil), "memclnt.SockclntCreate")
1407 api.RegisterMessage((*SockclntCreateReply)(nil), "memclnt.SockclntCreateReply")
1408 api.RegisterMessage((*SockclntDelete)(nil), "memclnt.SockclntDelete")
1409 api.RegisterMessage((*SockclntDeleteReply)(nil), "memclnt.SockclntDeleteReply")
1410 api.RegisterMessage((*TracePluginMsgIds)(nil), "memclnt.TracePluginMsgIds")
1413 // Messages returns list of all messages in this module.
1414 func AllMessages() []api.Message {
1415 return []api.Message{
1416 (*APIVersions)(nil),
1417 (*APIVersionsReply)(nil),
1418 (*GetFirstMsgID)(nil),
1419 (*GetFirstMsgIDReply)(nil),
1420 (*MemclntCreate)(nil),
1421 (*MemclntCreateReply)(nil),
1422 (*MemclntDelete)(nil),
1423 (*MemclntDeleteReply)(nil),
1424 (*MemclntKeepalive)(nil),
1425 (*MemclntKeepaliveReply)(nil),
1426 (*MemclntReadTimeout)(nil),
1427 (*MemclntRxThreadSuspend)(nil),
1429 (*RPCCallReply)(nil),
1430 (*RxThreadExit)(nil),
1431 (*SockInitShm)(nil),
1432 (*SockInitShmReply)(nil),
1433 (*SockclntCreate)(nil),
1434 (*SockclntCreateReply)(nil),
1435 (*SockclntDelete)(nil),
1436 (*SockclntDeleteReply)(nil),
1437 (*TracePluginMsgIds)(nil),
1441 // Reference imports to suppress errors if they are not otherwise used.
1442 var _ = api.RegisterMessage
1443 var _ = codec.DecodeString
1444 var _ = bytes.NewBuffer
1445 var _ = context.Background
1447 var _ = strconv.Itoa
1449 var _ = binary.BigEndian
1450 var _ = math.Float32bits