1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/memclnt.api.json
8 Package memclnt contains generated code for VPP API file memclnt.api (2.1.0).
27 api "git.fd.io/govpp.git/api"
28 codec "git.fd.io/govpp.git/codec"
29 struc "github.com/lunixbochs/struc"
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the GoVPP api package it is being compiled against.
34 // A compilation error at this line likely means your copy of the
35 // GoVPP api package needs to be updated.
36 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
39 // ModuleName is the name of this module.
40 ModuleName = "memclnt"
41 // APIVersion is the API version of this module.
43 // VersionCrc is the CRC of this module.
44 VersionCrc = 0x8d3dd881
47 // MessageTableEntry represents VPP binary API type 'message_table_entry'.
48 type MessageTableEntry struct {
49 Index uint16 `binapi:"u16,name=index" json:"index,omitempty"`
50 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
53 func (*MessageTableEntry) GetTypeName() string { return "message_table_entry" }
55 // ModuleVersion represents VPP binary API type 'module_version'.
56 type ModuleVersion struct {
57 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
58 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
59 Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
60 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
63 func (*ModuleVersion) GetTypeName() string { return "module_version" }
65 // APIVersions represents VPP binary API message 'api_versions'.
66 type APIVersions struct{}
68 func (m *APIVersions) Reset() { *m = APIVersions{} }
69 func (*APIVersions) GetMessageName() string { return "api_versions" }
70 func (*APIVersions) GetCrcString() string { return "51077d14" }
71 func (*APIVersions) GetMessageType() api.MessageType { return api.RequestMessage }
73 func (m *APIVersions) Size() int {
80 func (m *APIVersions) Marshal(b []byte) ([]byte, error) {
87 buf = make([]byte, m.Size())
93 func (m *APIVersions) Unmarshal(tmp []byte) error {
101 // APIVersionsReply represents VPP binary API message 'api_versions_reply'.
102 type APIVersionsReply struct {
103 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
104 Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=APIVersions"`
105 APIVersions []ModuleVersion `binapi:"module_version[count],name=api_versions" json:"api_versions,omitempty"`
108 func (m *APIVersionsReply) Reset() { *m = APIVersionsReply{} }
109 func (*APIVersionsReply) GetMessageName() string { return "api_versions_reply" }
110 func (*APIVersionsReply) GetCrcString() string { return "5f0d99d6" }
111 func (*APIVersionsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
113 func (m *APIVersionsReply) Size() int {
122 // field[1] m.APIVersions
123 for j1 := 0; j1 < len(m.APIVersions); j1++ {
126 if j1 < len(m.APIVersions) {
127 s1 = m.APIVersions[j1]
140 func (m *APIVersionsReply) Marshal(b []byte) ([]byte, error) {
141 o := binary.BigEndian
147 buf = make([]byte, m.Size())
152 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
155 o.PutUint32(buf[pos:pos+4], uint32(len(m.APIVersions)))
157 // field[1] m.APIVersions
158 for j1 := 0; j1 < len(m.APIVersions); j1++ {
160 if j1 < len(m.APIVersions) {
161 v1 = m.APIVersions[j1]
164 o.PutUint32(buf[pos:pos+4], uint32(v1.Major))
167 o.PutUint32(buf[pos:pos+4], uint32(v1.Minor))
170 o.PutUint32(buf[pos:pos+4], uint32(v1.Patch))
173 copy(buf[pos:pos+64], v1.Name)
178 func (m *APIVersionsReply) Unmarshal(tmp []byte) error {
179 o := binary.BigEndian
184 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
187 m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
189 // field[1] m.APIVersions
190 m.APIVersions = make([]ModuleVersion, int(m.Count))
191 for j1 := 0; j1 < int(m.Count); j1++ {
192 // field[2] m.APIVersions[j1].Major
193 m.APIVersions[j1].Major = uint32(o.Uint32(tmp[pos : pos+4]))
195 // field[2] m.APIVersions[j1].Minor
196 m.APIVersions[j1].Minor = uint32(o.Uint32(tmp[pos : pos+4]))
198 // field[2] m.APIVersions[j1].Patch
199 m.APIVersions[j1].Patch = uint32(o.Uint32(tmp[pos : pos+4]))
201 // field[2] m.APIVersions[j1].Name
203 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
204 m.APIVersions[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
211 // GetFirstMsgID represents VPP binary API message 'get_first_msg_id'.
212 type GetFirstMsgID struct {
213 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
216 func (m *GetFirstMsgID) Reset() { *m = GetFirstMsgID{} }
217 func (*GetFirstMsgID) GetMessageName() string { return "get_first_msg_id" }
218 func (*GetFirstMsgID) GetCrcString() string { return "ebf79a66" }
219 func (*GetFirstMsgID) GetMessageType() api.MessageType { return api.RequestMessage }
221 func (m *GetFirstMsgID) Size() int {
230 func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) {
231 o := binary.BigEndian
237 buf = make([]byte, m.Size())
242 copy(buf[pos:pos+64], m.Name)
246 func (m *GetFirstMsgID) Unmarshal(tmp []byte) error {
247 o := binary.BigEndian
253 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
254 m.Name = codec.DecodeString(tmp[pos : pos+nul])
260 // GetFirstMsgIDReply represents VPP binary API message 'get_first_msg_id_reply'.
261 type GetFirstMsgIDReply struct {
262 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
263 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
266 func (m *GetFirstMsgIDReply) Reset() { *m = GetFirstMsgIDReply{} }
267 func (*GetFirstMsgIDReply) GetMessageName() string { return "get_first_msg_id_reply" }
268 func (*GetFirstMsgIDReply) GetCrcString() string { return "7d337472" }
269 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType { return api.ReplyMessage }
271 func (m *GetFirstMsgIDReply) Size() int {
278 // field[1] m.FirstMsgID
282 func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) {
283 o := binary.BigEndian
289 buf = make([]byte, m.Size())
294 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
296 // field[1] m.FirstMsgID
297 o.PutUint16(buf[pos:pos+2], uint16(m.FirstMsgID))
301 func (m *GetFirstMsgIDReply) Unmarshal(tmp []byte) error {
302 o := binary.BigEndian
307 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
309 // field[1] m.FirstMsgID
310 m.FirstMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
315 // MemclntCreate represents VPP binary API message 'memclnt_create'.
316 type MemclntCreate struct {
317 CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"`
318 InputQueue uint64 `binapi:"u64,name=input_queue" json:"input_queue,omitempty"`
319 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
320 APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty" struc:"[8]uint32"`
323 func (m *MemclntCreate) Reset() { *m = MemclntCreate{} }
324 func (*MemclntCreate) GetMessageName() string { return "memclnt_create" }
325 func (*MemclntCreate) GetCrcString() string { return "9c5e1c2f" }
326 func (*MemclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage }
328 func (m *MemclntCreate) Size() int {
333 // field[1] m.CtxQuota
335 // field[1] m.InputQueue
339 // field[1] m.APIVersions
343 func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) {
344 o := binary.BigEndian
350 buf = make([]byte, m.Size())
354 // field[1] m.CtxQuota
355 o.PutUint32(buf[pos:pos+4], uint32(m.CtxQuota))
357 // field[1] m.InputQueue
358 o.PutUint64(buf[pos:pos+8], uint64(m.InputQueue))
361 copy(buf[pos:pos+64], m.Name)
363 // field[1] m.APIVersions
364 for i := 0; i < 8; i++ {
366 if i < len(m.APIVersions) {
367 x = uint32(m.APIVersions[i])
369 o.PutUint32(buf[pos:pos+4], uint32(x))
374 func (m *MemclntCreate) Unmarshal(tmp []byte) error {
375 o := binary.BigEndian
379 // field[1] m.CtxQuota
380 m.CtxQuota = int32(o.Uint32(tmp[pos : pos+4]))
382 // field[1] m.InputQueue
383 m.InputQueue = uint64(o.Uint64(tmp[pos : pos+8]))
387 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
388 m.Name = codec.DecodeString(tmp[pos : pos+nul])
391 // field[1] m.APIVersions
392 m.APIVersions = make([]uint32, 8)
393 for i := 0; i < len(m.APIVersions); i++ {
394 m.APIVersions[i] = uint32(o.Uint32(tmp[pos : pos+4]))
400 // MemclntCreateReply represents VPP binary API message 'memclnt_create_reply'.
401 type MemclntCreateReply struct {
402 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
403 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
404 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
405 MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"`
408 func (m *MemclntCreateReply) Reset() { *m = MemclntCreateReply{} }
409 func (*MemclntCreateReply) GetMessageName() string { return "memclnt_create_reply" }
410 func (*MemclntCreateReply) GetCrcString() string { return "42ec4560" }
411 func (*MemclntCreateReply) GetMessageType() api.MessageType { return api.ReplyMessage }
413 func (m *MemclntCreateReply) Size() int {
418 // field[1] m.Response
424 // field[1] m.MessageTable
428 func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) {
429 o := binary.BigEndian
435 buf = make([]byte, m.Size())
439 // field[1] m.Response
440 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
443 o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
446 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
448 // field[1] m.MessageTable
449 o.PutUint64(buf[pos:pos+8], uint64(m.MessageTable))
453 func (m *MemclntCreateReply) Unmarshal(tmp []byte) error {
454 o := binary.BigEndian
458 // field[1] m.Response
459 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
462 m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
465 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
467 // field[1] m.MessageTable
468 m.MessageTable = uint64(o.Uint64(tmp[pos : pos+8]))
473 // MemclntDelete represents VPP binary API message 'memclnt_delete'.
474 type MemclntDelete struct {
475 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
476 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
477 DoCleanup bool `binapi:"bool,name=do_cleanup" json:"do_cleanup,omitempty"`
480 func (m *MemclntDelete) Reset() { *m = MemclntDelete{} }
481 func (*MemclntDelete) GetMessageName() string { return "memclnt_delete" }
482 func (*MemclntDelete) GetCrcString() string { return "7e1c04e3" }
483 func (*MemclntDelete) GetMessageType() api.MessageType { return api.OtherMessage }
485 func (m *MemclntDelete) Size() int {
494 // field[1] m.DoCleanup
498 func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) {
499 o := binary.BigEndian
505 buf = make([]byte, m.Size())
510 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
513 o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
515 // field[1] m.DoCleanup
522 func (m *MemclntDelete) Unmarshal(tmp []byte) error {
523 o := binary.BigEndian
528 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
531 m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
533 // field[1] m.DoCleanup
534 m.DoCleanup = tmp[pos] != 0
539 // MemclntDeleteReply represents VPP binary API message 'memclnt_delete_reply'.
540 type MemclntDeleteReply struct {
541 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
542 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
545 func (m *MemclntDeleteReply) Reset() { *m = MemclntDeleteReply{} }
546 func (*MemclntDeleteReply) GetMessageName() string { return "memclnt_delete_reply" }
547 func (*MemclntDeleteReply) GetCrcString() string { return "3d3b6312" }
548 func (*MemclntDeleteReply) GetMessageType() api.MessageType { return api.OtherMessage }
550 func (m *MemclntDeleteReply) Size() int {
555 // field[1] m.Response
561 func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) {
562 o := binary.BigEndian
568 buf = make([]byte, m.Size())
572 // field[1] m.Response
573 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
576 o.PutUint64(buf[pos:pos+8], uint64(m.Handle))
580 func (m *MemclntDeleteReply) Unmarshal(tmp []byte) error {
581 o := binary.BigEndian
585 // field[1] m.Response
586 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
589 m.Handle = uint64(o.Uint64(tmp[pos : pos+8]))
594 // MemclntKeepalive represents VPP binary API message 'memclnt_keepalive'.
595 type MemclntKeepalive struct{}
597 func (m *MemclntKeepalive) Reset() { *m = MemclntKeepalive{} }
598 func (*MemclntKeepalive) GetMessageName() string { return "memclnt_keepalive" }
599 func (*MemclntKeepalive) GetCrcString() string { return "51077d14" }
600 func (*MemclntKeepalive) GetMessageType() api.MessageType { return api.RequestMessage }
602 func (m *MemclntKeepalive) Size() int {
609 func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) {
610 o := binary.BigEndian
616 buf = make([]byte, m.Size())
622 func (m *MemclntKeepalive) Unmarshal(tmp []byte) error {
623 o := binary.BigEndian
630 // MemclntKeepaliveReply represents VPP binary API message 'memclnt_keepalive_reply'.
631 type MemclntKeepaliveReply struct {
632 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
635 func (m *MemclntKeepaliveReply) Reset() { *m = MemclntKeepaliveReply{} }
636 func (*MemclntKeepaliveReply) GetMessageName() string { return "memclnt_keepalive_reply" }
637 func (*MemclntKeepaliveReply) GetCrcString() string { return "e8d4e804" }
638 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType { return api.ReplyMessage }
640 func (m *MemclntKeepaliveReply) Size() int {
649 func (m *MemclntKeepaliveReply) Marshal(b []byte) ([]byte, error) {
650 o := binary.BigEndian
656 buf = make([]byte, m.Size())
661 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
665 func (m *MemclntKeepaliveReply) Unmarshal(tmp []byte) error {
666 o := binary.BigEndian
671 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
676 // MemclntReadTimeout represents VPP binary API message 'memclnt_read_timeout'.
677 type MemclntReadTimeout struct {
678 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
681 func (m *MemclntReadTimeout) Reset() { *m = MemclntReadTimeout{} }
682 func (*MemclntReadTimeout) GetMessageName() string { return "memclnt_read_timeout" }
683 func (*MemclntReadTimeout) GetCrcString() string { return "c3a3a452" }
684 func (*MemclntReadTimeout) GetMessageType() api.MessageType { return api.OtherMessage }
686 func (m *MemclntReadTimeout) Size() int {
695 func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) {
696 o := binary.BigEndian
702 buf = make([]byte, m.Size())
707 buf[pos] = uint8(m.Dummy)
711 func (m *MemclntReadTimeout) Unmarshal(tmp []byte) error {
712 o := binary.BigEndian
717 m.Dummy = uint8(tmp[pos])
722 // MemclntRxThreadSuspend represents VPP binary API message 'memclnt_rx_thread_suspend'.
723 type MemclntRxThreadSuspend struct {
724 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
727 func (m *MemclntRxThreadSuspend) Reset() { *m = MemclntRxThreadSuspend{} }
728 func (*MemclntRxThreadSuspend) GetMessageName() string { return "memclnt_rx_thread_suspend" }
729 func (*MemclntRxThreadSuspend) GetCrcString() string { return "c3a3a452" }
730 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType { return api.OtherMessage }
732 func (m *MemclntRxThreadSuspend) Size() int {
741 func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) {
742 o := binary.BigEndian
748 buf = make([]byte, m.Size())
753 buf[pos] = uint8(m.Dummy)
757 func (m *MemclntRxThreadSuspend) Unmarshal(tmp []byte) error {
758 o := binary.BigEndian
763 m.Dummy = uint8(tmp[pos])
768 // RPCCall represents VPP binary API message 'rpc_call'.
769 type RPCCall struct {
770 Function uint64 `binapi:"u64,name=function" json:"function,omitempty"`
771 Multicast uint8 `binapi:"u8,name=multicast" json:"multicast,omitempty"`
772 NeedBarrierSync uint8 `binapi:"u8,name=need_barrier_sync" json:"need_barrier_sync,omitempty"`
773 SendReply uint8 `binapi:"u8,name=send_reply" json:"send_reply,omitempty"`
774 DataLen uint32 `binapi:"u32,name=data_len" json:"data_len,omitempty" struc:"sizeof=Data"`
775 Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
778 func (m *RPCCall) Reset() { *m = RPCCall{} }
779 func (*RPCCall) GetMessageName() string { return "rpc_call" }
780 func (*RPCCall) GetCrcString() string { return "7e8a2c95" }
781 func (*RPCCall) GetMessageType() api.MessageType { return api.RequestMessage }
783 func (m *RPCCall) Size() int {
788 // field[1] m.Function
790 // field[1] m.Multicast
792 // field[1] m.NeedBarrierSync
794 // field[1] m.SendReply
796 // field[1] m.DataLen
799 size += 1 * len(m.Data)
802 func (m *RPCCall) Marshal(b []byte) ([]byte, error) {
803 o := binary.BigEndian
809 buf = make([]byte, m.Size())
813 // field[1] m.Function
814 o.PutUint64(buf[pos:pos+8], uint64(m.Function))
816 // field[1] m.Multicast
817 buf[pos] = uint8(m.Multicast)
819 // field[1] m.NeedBarrierSync
820 buf[pos] = uint8(m.NeedBarrierSync)
822 // field[1] m.SendReply
823 buf[pos] = uint8(m.SendReply)
825 // field[1] m.DataLen
826 o.PutUint32(buf[pos:pos+4], uint32(len(m.Data)))
829 for i := 0; i < len(m.Data); i++ {
839 func (m *RPCCall) Unmarshal(tmp []byte) error {
840 o := binary.BigEndian
844 // field[1] m.Function
845 m.Function = uint64(o.Uint64(tmp[pos : pos+8]))
847 // field[1] m.Multicast
848 m.Multicast = uint8(tmp[pos])
850 // field[1] m.NeedBarrierSync
851 m.NeedBarrierSync = uint8(tmp[pos])
853 // field[1] m.SendReply
854 m.SendReply = uint8(tmp[pos])
856 // field[1] m.DataLen
857 m.DataLen = uint32(o.Uint32(tmp[pos : pos+4]))
860 m.Data = make([]uint8, m.DataLen)
861 for i := 0; i < len(m.Data); i++ {
862 m.Data[i] = uint8(tmp[pos])
868 // RPCCallReply represents VPP binary API message 'rpc_call_reply'.
869 type RPCCallReply struct {
870 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
873 func (m *RPCCallReply) Reset() { *m = RPCCallReply{} }
874 func (*RPCCallReply) GetMessageName() string { return "rpc_call_reply" }
875 func (*RPCCallReply) GetCrcString() string { return "e8d4e804" }
876 func (*RPCCallReply) GetMessageType() api.MessageType { return api.ReplyMessage }
878 func (m *RPCCallReply) Size() int {
887 func (m *RPCCallReply) Marshal(b []byte) ([]byte, error) {
888 o := binary.BigEndian
894 buf = make([]byte, m.Size())
899 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
903 func (m *RPCCallReply) Unmarshal(tmp []byte) error {
904 o := binary.BigEndian
909 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
914 // RxThreadExit represents VPP binary API message 'rx_thread_exit'.
915 type RxThreadExit struct {
916 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
919 func (m *RxThreadExit) Reset() { *m = RxThreadExit{} }
920 func (*RxThreadExit) GetMessageName() string { return "rx_thread_exit" }
921 func (*RxThreadExit) GetCrcString() string { return "c3a3a452" }
922 func (*RxThreadExit) GetMessageType() api.MessageType { return api.OtherMessage }
924 func (m *RxThreadExit) Size() int {
933 func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) {
934 o := binary.BigEndian
940 buf = make([]byte, m.Size())
945 buf[pos] = uint8(m.Dummy)
949 func (m *RxThreadExit) Unmarshal(tmp []byte) error {
950 o := binary.BigEndian
955 m.Dummy = uint8(tmp[pos])
960 // SockInitShm represents VPP binary API message 'sock_init_shm'.
961 type SockInitShm struct {
962 RequestedSize uint32 `binapi:"u32,name=requested_size" json:"requested_size,omitempty"`
963 Nitems uint8 `binapi:"u8,name=nitems" json:"nitems,omitempty" struc:"sizeof=Configs"`
964 Configs []uint64 `binapi:"u64[nitems],name=configs" json:"configs,omitempty"`
967 func (m *SockInitShm) Reset() { *m = SockInitShm{} }
968 func (*SockInitShm) GetMessageName() string { return "sock_init_shm" }
969 func (*SockInitShm) GetCrcString() string { return "51646d92" }
970 func (*SockInitShm) GetMessageType() api.MessageType { return api.RequestMessage }
972 func (m *SockInitShm) Size() int {
977 // field[1] m.RequestedSize
981 // field[1] m.Configs
982 size += 8 * len(m.Configs)
985 func (m *SockInitShm) Marshal(b []byte) ([]byte, error) {
986 o := binary.BigEndian
992 buf = make([]byte, m.Size())
996 // field[1] m.RequestedSize
997 o.PutUint32(buf[pos:pos+4], uint32(m.RequestedSize))
1000 buf[pos] = uint8(len(m.Configs))
1002 // field[1] m.Configs
1003 for i := 0; i < len(m.Configs); i++ {
1005 if i < len(m.Configs) {
1006 x = uint64(m.Configs[i])
1008 o.PutUint64(buf[pos:pos+8], uint64(x))
1013 func (m *SockInitShm) Unmarshal(tmp []byte) error {
1014 o := binary.BigEndian
1018 // field[1] m.RequestedSize
1019 m.RequestedSize = uint32(o.Uint32(tmp[pos : pos+4]))
1021 // field[1] m.Nitems
1022 m.Nitems = uint8(tmp[pos])
1024 // field[1] m.Configs
1025 m.Configs = make([]uint64, m.Nitems)
1026 for i := 0; i < len(m.Configs); i++ {
1027 m.Configs[i] = uint64(o.Uint64(tmp[pos : pos+8]))
1033 // SockInitShmReply represents VPP binary API message 'sock_init_shm_reply'.
1034 type SockInitShmReply struct {
1035 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1038 func (m *SockInitShmReply) Reset() { *m = SockInitShmReply{} }
1039 func (*SockInitShmReply) GetMessageName() string { return "sock_init_shm_reply" }
1040 func (*SockInitShmReply) GetCrcString() string { return "e8d4e804" }
1041 func (*SockInitShmReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1043 func (m *SockInitShmReply) Size() int {
1048 // field[1] m.Retval
1052 func (m *SockInitShmReply) Marshal(b []byte) ([]byte, error) {
1053 o := binary.BigEndian
1059 buf = make([]byte, m.Size())
1063 // field[1] m.Retval
1064 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1068 func (m *SockInitShmReply) Unmarshal(tmp []byte) error {
1069 o := binary.BigEndian
1073 // field[1] m.Retval
1074 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1079 // SockclntCreate represents VPP binary API message 'sockclnt_create'.
1080 type SockclntCreate struct {
1081 Name string `binapi:"string[64],name=name" json:"name,omitempty" struc:"[64]byte"`
1084 func (m *SockclntCreate) Reset() { *m = SockclntCreate{} }
1085 func (*SockclntCreate) GetMessageName() string { return "sockclnt_create" }
1086 func (*SockclntCreate) GetCrcString() string { return "455fb9c4" }
1087 func (*SockclntCreate) GetMessageType() api.MessageType { return api.ReplyMessage }
1089 func (m *SockclntCreate) Size() int {
1098 func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) {
1099 o := binary.BigEndian
1105 buf = make([]byte, m.Size())
1110 copy(buf[pos:pos+64], m.Name)
1114 func (m *SockclntCreate) Unmarshal(tmp []byte) error {
1115 o := binary.BigEndian
1121 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1122 m.Name = codec.DecodeString(tmp[pos : pos+nul])
1128 // SockclntCreateReply represents VPP binary API message 'sockclnt_create_reply'.
1129 type SockclntCreateReply struct {
1130 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
1131 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
1132 Count uint16 `binapi:"u16,name=count" json:"count,omitempty" struc:"sizeof=MessageTable"`
1133 MessageTable []MessageTableEntry `binapi:"message_table_entry[count],name=message_table" json:"message_table,omitempty"`
1136 func (m *SockclntCreateReply) Reset() { *m = SockclntCreateReply{} }
1137 func (*SockclntCreateReply) GetMessageName() string { return "sockclnt_create_reply" }
1138 func (*SockclntCreateReply) GetCrcString() string { return "35166268" }
1139 func (*SockclntCreateReply) GetMessageType() api.MessageType { return api.RequestMessage }
1141 func (m *SockclntCreateReply) Size() int {
1146 // field[1] m.Response
1152 // field[1] m.MessageTable
1153 for j1 := 0; j1 < len(m.MessageTable); j1++ {
1154 var s1 MessageTableEntry
1156 if j1 < len(m.MessageTable) {
1157 s1 = m.MessageTable[j1]
1159 // field[2] s1.Index
1166 func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) {
1167 o := binary.BigEndian
1173 buf = make([]byte, m.Size())
1177 // field[1] m.Response
1178 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
1181 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
1184 o.PutUint16(buf[pos:pos+2], uint16(len(m.MessageTable)))
1186 // field[1] m.MessageTable
1187 for j1 := 0; j1 < len(m.MessageTable); j1++ {
1188 var v1 MessageTableEntry
1189 if j1 < len(m.MessageTable) {
1190 v1 = m.MessageTable[j1]
1192 // field[2] v1.Index
1193 o.PutUint16(buf[pos:pos+2], uint16(v1.Index))
1196 copy(buf[pos:pos+64], v1.Name)
1201 func (m *SockclntCreateReply) Unmarshal(tmp []byte) error {
1202 o := binary.BigEndian
1206 // field[1] m.Response
1207 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
1210 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
1213 m.Count = uint16(o.Uint16(tmp[pos : pos+2]))
1215 // field[1] m.MessageTable
1216 m.MessageTable = make([]MessageTableEntry, int(m.Count))
1217 for j1 := 0; j1 < int(m.Count); j1++ {
1218 // field[2] m.MessageTable[j1].Index
1219 m.MessageTable[j1].Index = uint16(o.Uint16(tmp[pos : pos+2]))
1221 // field[2] m.MessageTable[j1].Name
1223 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
1224 m.MessageTable[j1].Name = codec.DecodeString(tmp[pos : pos+nul])
1231 // SockclntDelete represents VPP binary API message 'sockclnt_delete'.
1232 type SockclntDelete struct {
1233 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
1236 func (m *SockclntDelete) Reset() { *m = SockclntDelete{} }
1237 func (*SockclntDelete) GetMessageName() string { return "sockclnt_delete" }
1238 func (*SockclntDelete) GetCrcString() string { return "8ac76db6" }
1239 func (*SockclntDelete) GetMessageType() api.MessageType { return api.RequestMessage }
1241 func (m *SockclntDelete) Size() int {
1250 func (m *SockclntDelete) Marshal(b []byte) ([]byte, error) {
1251 o := binary.BigEndian
1257 buf = make([]byte, m.Size())
1262 o.PutUint32(buf[pos:pos+4], uint32(m.Index))
1266 func (m *SockclntDelete) Unmarshal(tmp []byte) error {
1267 o := binary.BigEndian
1272 m.Index = uint32(o.Uint32(tmp[pos : pos+4]))
1277 // SockclntDeleteReply represents VPP binary API message 'sockclnt_delete_reply'.
1278 type SockclntDeleteReply struct {
1279 Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
1282 func (m *SockclntDeleteReply) Reset() { *m = SockclntDeleteReply{} }
1283 func (*SockclntDeleteReply) GetMessageName() string { return "sockclnt_delete_reply" }
1284 func (*SockclntDeleteReply) GetCrcString() string { return "8f38b1ee" }
1285 func (*SockclntDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1287 func (m *SockclntDeleteReply) Size() int {
1292 // field[1] m.Response
1296 func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) {
1297 o := binary.BigEndian
1303 buf = make([]byte, m.Size())
1307 // field[1] m.Response
1308 o.PutUint32(buf[pos:pos+4], uint32(m.Response))
1312 func (m *SockclntDeleteReply) Unmarshal(tmp []byte) error {
1313 o := binary.BigEndian
1317 // field[1] m.Response
1318 m.Response = int32(o.Uint32(tmp[pos : pos+4]))
1323 // TracePluginMsgIds represents VPP binary API message 'trace_plugin_msg_ids'.
1324 type TracePluginMsgIds struct {
1325 PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty" struc:"[128]byte"`
1326 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
1327 LastMsgID uint16 `binapi:"u16,name=last_msg_id" json:"last_msg_id,omitempty"`
1330 func (m *TracePluginMsgIds) Reset() { *m = TracePluginMsgIds{} }
1331 func (*TracePluginMsgIds) GetMessageName() string { return "trace_plugin_msg_ids" }
1332 func (*TracePluginMsgIds) GetCrcString() string { return "f476d3ce" }
1333 func (*TracePluginMsgIds) GetMessageType() api.MessageType { return api.RequestMessage }
1335 func (m *TracePluginMsgIds) Size() int {
1340 // field[1] m.PluginName
1342 // field[1] m.FirstMsgID
1344 // field[1] m.LastMsgID
1348 func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) {
1349 o := binary.BigEndian
1355 buf = make([]byte, m.Size())
1359 // field[1] m.PluginName
1360 copy(buf[pos:pos+128], m.PluginName)
1362 // field[1] m.FirstMsgID
1363 o.PutUint16(buf[pos:pos+2], uint16(m.FirstMsgID))
1365 // field[1] m.LastMsgID
1366 o.PutUint16(buf[pos:pos+2], uint16(m.LastMsgID))
1370 func (m *TracePluginMsgIds) Unmarshal(tmp []byte) error {
1371 o := binary.BigEndian
1375 // field[1] m.PluginName
1377 nul := bytes.Index(tmp[pos:pos+128], []byte{0x00})
1378 m.PluginName = codec.DecodeString(tmp[pos : pos+nul])
1381 // field[1] m.FirstMsgID
1382 m.FirstMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
1384 // field[1] m.LastMsgID
1385 m.LastMsgID = uint16(o.Uint16(tmp[pos : pos+2]))
1390 func init() { file_memclnt_binapi_init() }
1391 func file_memclnt_binapi_init() {
1392 api.RegisterMessage((*APIVersions)(nil), "memclnt.APIVersions")
1393 api.RegisterMessage((*APIVersionsReply)(nil), "memclnt.APIVersionsReply")
1394 api.RegisterMessage((*GetFirstMsgID)(nil), "memclnt.GetFirstMsgID")
1395 api.RegisterMessage((*GetFirstMsgIDReply)(nil), "memclnt.GetFirstMsgIDReply")
1396 api.RegisterMessage((*MemclntCreate)(nil), "memclnt.MemclntCreate")
1397 api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt.MemclntCreateReply")
1398 api.RegisterMessage((*MemclntDelete)(nil), "memclnt.MemclntDelete")
1399 api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt.MemclntDeleteReply")
1400 api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt.MemclntKeepalive")
1401 api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt.MemclntKeepaliveReply")
1402 api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt.MemclntReadTimeout")
1403 api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt.MemclntRxThreadSuspend")
1404 api.RegisterMessage((*RPCCall)(nil), "memclnt.RPCCall")
1405 api.RegisterMessage((*RPCCallReply)(nil), "memclnt.RPCCallReply")
1406 api.RegisterMessage((*RxThreadExit)(nil), "memclnt.RxThreadExit")
1407 api.RegisterMessage((*SockInitShm)(nil), "memclnt.SockInitShm")
1408 api.RegisterMessage((*SockInitShmReply)(nil), "memclnt.SockInitShmReply")
1409 api.RegisterMessage((*SockclntCreate)(nil), "memclnt.SockclntCreate")
1410 api.RegisterMessage((*SockclntCreateReply)(nil), "memclnt.SockclntCreateReply")
1411 api.RegisterMessage((*SockclntDelete)(nil), "memclnt.SockclntDelete")
1412 api.RegisterMessage((*SockclntDeleteReply)(nil), "memclnt.SockclntDeleteReply")
1413 api.RegisterMessage((*TracePluginMsgIds)(nil), "memclnt.TracePluginMsgIds")
1416 // Messages returns list of all messages in this module.
1417 func AllMessages() []api.Message {
1418 return []api.Message{
1419 (*APIVersions)(nil),
1420 (*APIVersionsReply)(nil),
1421 (*GetFirstMsgID)(nil),
1422 (*GetFirstMsgIDReply)(nil),
1423 (*MemclntCreate)(nil),
1424 (*MemclntCreateReply)(nil),
1425 (*MemclntDelete)(nil),
1426 (*MemclntDeleteReply)(nil),
1427 (*MemclntKeepalive)(nil),
1428 (*MemclntKeepaliveReply)(nil),
1429 (*MemclntReadTimeout)(nil),
1430 (*MemclntRxThreadSuspend)(nil),
1432 (*RPCCallReply)(nil),
1433 (*RxThreadExit)(nil),
1434 (*SockInitShm)(nil),
1435 (*SockInitShmReply)(nil),
1436 (*SockclntCreate)(nil),
1437 (*SockclntCreateReply)(nil),
1438 (*SockclntDelete)(nil),
1439 (*SockclntDeleteReply)(nil),
1440 (*TracePluginMsgIds)(nil),
1444 // Reference imports to suppress errors if they are not otherwise used.
1445 var _ = api.RegisterMessage
1446 var _ = codec.DecodeString
1447 var _ = bytes.NewBuffer
1448 var _ = context.Background
1450 var _ = strconv.Itoa
1451 var _ = strings.Contains
1453 var _ = binary.BigEndian
1454 var _ = math.Float32bits