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/plugins/memif.api.json
8 Package memif contains generated code for VPP binary API defined by memif.api (version 3.0.0).
25 api "git.fd.io/govpp.git/api"
26 codec "git.fd.io/govpp.git/codec"
27 struc "github.com/lunixbochs/struc"
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the GoVPP api package it is being compiled against.
32 // A compilation error at this line likely means your copy of the
33 // GoVPP api package needs to be updated.
34 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
37 // ModuleName is the name of this module.
39 // APIVersion is the API version of this module.
41 // VersionCrc is the CRC of this module.
42 VersionCrc = 0x88dc56c9
45 // IfStatusFlags represents VPP binary API enum 'if_status_flags'.
46 type IfStatusFlags uint32
49 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
50 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
54 IfStatusFlags_name = map[uint32]string{
55 1: "IF_STATUS_API_FLAG_ADMIN_UP",
56 2: "IF_STATUS_API_FLAG_LINK_UP",
58 IfStatusFlags_value = map[string]uint32{
59 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
60 "IF_STATUS_API_FLAG_LINK_UP": 2,
64 func (x IfStatusFlags) String() string {
65 s, ok := IfStatusFlags_name[uint32(x)]
69 return "IfStatusFlags(" + strconv.Itoa(int(x)) + ")"
72 // IfType represents VPP binary API enum 'if_type'.
76 IF_API_TYPE_HARDWARE IfType = 1
77 IF_API_TYPE_SUB IfType = 2
78 IF_API_TYPE_P2P IfType = 3
79 IF_API_TYPE_PIPE IfType = 4
83 IfType_name = map[uint32]string{
84 1: "IF_API_TYPE_HARDWARE",
87 4: "IF_API_TYPE_PIPE",
89 IfType_value = map[string]uint32{
90 "IF_API_TYPE_HARDWARE": 1,
93 "IF_API_TYPE_PIPE": 4,
97 func (x IfType) String() string {
98 s, ok := IfType_name[uint32(x)]
102 return "IfType(" + strconv.Itoa(int(x)) + ")"
105 // LinkDuplex represents VPP binary API enum 'link_duplex'.
106 type LinkDuplex uint32
109 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
110 LINK_DUPLEX_API_HALF LinkDuplex = 1
111 LINK_DUPLEX_API_FULL LinkDuplex = 2
115 LinkDuplex_name = map[uint32]string{
116 0: "LINK_DUPLEX_API_UNKNOWN",
117 1: "LINK_DUPLEX_API_HALF",
118 2: "LINK_DUPLEX_API_FULL",
120 LinkDuplex_value = map[string]uint32{
121 "LINK_DUPLEX_API_UNKNOWN": 0,
122 "LINK_DUPLEX_API_HALF": 1,
123 "LINK_DUPLEX_API_FULL": 2,
127 func (x LinkDuplex) String() string {
128 s, ok := LinkDuplex_name[uint32(x)]
132 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
135 // MemifMode represents VPP binary API enum 'memif_mode'.
136 type MemifMode uint32
139 MEMIF_MODE_API_ETHERNET MemifMode = 0
140 MEMIF_MODE_API_IP MemifMode = 1
141 MEMIF_MODE_API_PUNT_INJECT MemifMode = 2
145 MemifMode_name = map[uint32]string{
146 0: "MEMIF_MODE_API_ETHERNET",
147 1: "MEMIF_MODE_API_IP",
148 2: "MEMIF_MODE_API_PUNT_INJECT",
150 MemifMode_value = map[string]uint32{
151 "MEMIF_MODE_API_ETHERNET": 0,
152 "MEMIF_MODE_API_IP": 1,
153 "MEMIF_MODE_API_PUNT_INJECT": 2,
157 func (x MemifMode) String() string {
158 s, ok := MemifMode_name[uint32(x)]
162 return "MemifMode(" + strconv.Itoa(int(x)) + ")"
165 // MemifRole represents VPP binary API enum 'memif_role'.
166 type MemifRole uint32
169 MEMIF_ROLE_API_MASTER MemifRole = 0
170 MEMIF_ROLE_API_SLAVE MemifRole = 1
174 MemifRole_name = map[uint32]string{
175 0: "MEMIF_ROLE_API_MASTER",
176 1: "MEMIF_ROLE_API_SLAVE",
178 MemifRole_value = map[string]uint32{
179 "MEMIF_ROLE_API_MASTER": 0,
180 "MEMIF_ROLE_API_SLAVE": 1,
184 func (x MemifRole) String() string {
185 s, ok := MemifRole_name[uint32(x)]
189 return "MemifRole(" + strconv.Itoa(int(x)) + ")"
192 // MtuProto represents VPP binary API enum 'mtu_proto'.
196 MTU_PROTO_API_L3 MtuProto = 1
197 MTU_PROTO_API_IP4 MtuProto = 2
198 MTU_PROTO_API_IP6 MtuProto = 3
199 MTU_PROTO_API_MPLS MtuProto = 4
200 MTU_PROTO_API_N MtuProto = 5
204 MtuProto_name = map[uint32]string{
205 1: "MTU_PROTO_API_L3",
206 2: "MTU_PROTO_API_IP4",
207 3: "MTU_PROTO_API_IP6",
208 4: "MTU_PROTO_API_MPLS",
209 5: "MTU_PROTO_API_N",
211 MtuProto_value = map[string]uint32{
212 "MTU_PROTO_API_L3": 1,
213 "MTU_PROTO_API_IP4": 2,
214 "MTU_PROTO_API_IP6": 3,
215 "MTU_PROTO_API_MPLS": 4,
216 "MTU_PROTO_API_N": 5,
220 func (x MtuProto) String() string {
221 s, ok := MtuProto_name[uint32(x)]
225 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
228 // RxMode represents VPP binary API enum 'rx_mode'.
232 RX_MODE_API_UNKNOWN RxMode = 0
233 RX_MODE_API_POLLING RxMode = 1
234 RX_MODE_API_INTERRUPT RxMode = 2
235 RX_MODE_API_ADAPTIVE RxMode = 3
236 RX_MODE_API_DEFAULT RxMode = 4
240 RxMode_name = map[uint32]string{
241 0: "RX_MODE_API_UNKNOWN",
242 1: "RX_MODE_API_POLLING",
243 2: "RX_MODE_API_INTERRUPT",
244 3: "RX_MODE_API_ADAPTIVE",
245 4: "RX_MODE_API_DEFAULT",
247 RxMode_value = map[string]uint32{
248 "RX_MODE_API_UNKNOWN": 0,
249 "RX_MODE_API_POLLING": 1,
250 "RX_MODE_API_INTERRUPT": 2,
251 "RX_MODE_API_ADAPTIVE": 3,
252 "RX_MODE_API_DEFAULT": 4,
256 func (x RxMode) String() string {
257 s, ok := RxMode_name[uint32(x)]
261 return "RxMode(" + strconv.Itoa(int(x)) + ")"
264 // SubIfFlags represents VPP binary API enum 'sub_if_flags'.
265 type SubIfFlags uint32
268 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
269 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
270 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
271 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
272 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
273 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
274 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
275 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
276 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
277 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
281 SubIfFlags_name = map[uint32]string{
282 1: "SUB_IF_API_FLAG_NO_TAGS",
283 2: "SUB_IF_API_FLAG_ONE_TAG",
284 4: "SUB_IF_API_FLAG_TWO_TAGS",
285 8: "SUB_IF_API_FLAG_DOT1AD",
286 16: "SUB_IF_API_FLAG_EXACT_MATCH",
287 32: "SUB_IF_API_FLAG_DEFAULT",
288 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
289 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
290 254: "SUB_IF_API_FLAG_MASK_VNET",
291 256: "SUB_IF_API_FLAG_DOT1AH",
293 SubIfFlags_value = map[string]uint32{
294 "SUB_IF_API_FLAG_NO_TAGS": 1,
295 "SUB_IF_API_FLAG_ONE_TAG": 2,
296 "SUB_IF_API_FLAG_TWO_TAGS": 4,
297 "SUB_IF_API_FLAG_DOT1AD": 8,
298 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
299 "SUB_IF_API_FLAG_DEFAULT": 32,
300 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
301 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
302 "SUB_IF_API_FLAG_MASK_VNET": 254,
303 "SUB_IF_API_FLAG_DOT1AH": 256,
307 func (x SubIfFlags) String() string {
308 s, ok := SubIfFlags_name[uint32(x)]
312 return "SubIfFlags(" + strconv.Itoa(int(x)) + ")"
315 // InterfaceIndex represents VPP binary API alias 'interface_index'.
316 type InterfaceIndex uint32
318 // MacAddress represents VPP binary API alias 'mac_address'.
319 type MacAddress [6]uint8
321 // MemifCreate represents VPP binary API message 'memif_create'.
322 type MemifCreate struct {
323 Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
324 Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
325 RxQueues uint8 `binapi:"u8,name=rx_queues" json:"rx_queues,omitempty"`
326 TxQueues uint8 `binapi:"u8,name=tx_queues" json:"tx_queues,omitempty"`
327 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
328 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
329 RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
330 BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
331 NoZeroCopy bool `binapi:"bool,name=no_zero_copy" json:"no_zero_copy,omitempty"`
332 HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
333 Secret string `binapi:"string[24],name=secret" json:"secret,omitempty" struc:"[24]byte"`
336 func (m *MemifCreate) Reset() { *m = MemifCreate{} }
337 func (*MemifCreate) GetMessageName() string { return "memif_create" }
338 func (*MemifCreate) GetCrcString() string { return "b1b25061" }
339 func (*MemifCreate) GetMessageType() api.MessageType { return api.RequestMessage }
341 func (m *MemifCreate) Size() int {
350 // field[1] m.RxQueues
352 // field[1] m.TxQueues
356 // field[1] m.SocketID
358 // field[1] m.RingSize
360 // field[1] m.BufferSize
362 // field[1] m.NoZeroCopy
370 func (m *MemifCreate) Marshal(b []byte) ([]byte, error) {
371 o := binary.BigEndian
377 buf = make([]byte, m.Size())
382 o.PutUint32(buf[pos:pos+4], uint32(m.Role))
385 o.PutUint32(buf[pos:pos+4], uint32(m.Mode))
387 // field[1] m.RxQueues
388 buf[pos] = uint8(m.RxQueues)
390 // field[1] m.TxQueues
391 buf[pos] = uint8(m.TxQueues)
394 o.PutUint32(buf[pos:pos+4], uint32(m.ID))
396 // field[1] m.SocketID
397 o.PutUint32(buf[pos:pos+4], uint32(m.SocketID))
399 // field[1] m.RingSize
400 o.PutUint32(buf[pos:pos+4], uint32(m.RingSize))
402 // field[1] m.BufferSize
403 o.PutUint16(buf[pos:pos+2], uint16(m.BufferSize))
405 // field[1] m.NoZeroCopy
411 for i := 0; i < 6; i++ {
413 if i < len(m.HwAddr) {
414 x = uint8(m.HwAddr[i])
420 copy(buf[pos:pos+24], m.Secret)
424 func (m *MemifCreate) Unmarshal(tmp []byte) error {
425 o := binary.BigEndian
430 m.Role = MemifRole(o.Uint32(tmp[pos : pos+4]))
433 m.Mode = MemifMode(o.Uint32(tmp[pos : pos+4]))
435 // field[1] m.RxQueues
436 m.RxQueues = uint8(tmp[pos])
438 // field[1] m.TxQueues
439 m.TxQueues = uint8(tmp[pos])
442 m.ID = uint32(o.Uint32(tmp[pos : pos+4]))
444 // field[1] m.SocketID
445 m.SocketID = uint32(o.Uint32(tmp[pos : pos+4]))
447 // field[1] m.RingSize
448 m.RingSize = uint32(o.Uint32(tmp[pos : pos+4]))
450 // field[1] m.BufferSize
451 m.BufferSize = uint16(o.Uint16(tmp[pos : pos+2]))
453 // field[1] m.NoZeroCopy
454 m.NoZeroCopy = tmp[pos] != 0
457 for i := 0; i < len(m.HwAddr); i++ {
458 m.HwAddr[i] = uint8(tmp[pos])
463 nul := bytes.Index(tmp[pos:pos+24], []byte{0x00})
464 m.Secret = codec.DecodeString(tmp[pos : pos+nul])
470 // MemifCreateReply represents VPP binary API message 'memif_create_reply'.
471 type MemifCreateReply struct {
472 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
473 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
476 func (m *MemifCreateReply) Reset() { *m = MemifCreateReply{} }
477 func (*MemifCreateReply) GetMessageName() string { return "memif_create_reply" }
478 func (*MemifCreateReply) GetCrcString() string { return "5383d31f" }
479 func (*MemifCreateReply) GetMessageType() api.MessageType { return api.ReplyMessage }
481 func (m *MemifCreateReply) Size() int {
488 // field[1] m.SwIfIndex
492 func (m *MemifCreateReply) Marshal(b []byte) ([]byte, error) {
493 o := binary.BigEndian
499 buf = make([]byte, m.Size())
504 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
506 // field[1] m.SwIfIndex
507 o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
511 func (m *MemifCreateReply) Unmarshal(tmp []byte) error {
512 o := binary.BigEndian
517 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
519 // field[1] m.SwIfIndex
520 m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
525 // MemifDelete represents VPP binary API message 'memif_delete'.
526 type MemifDelete struct {
527 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
530 func (m *MemifDelete) Reset() { *m = MemifDelete{} }
531 func (*MemifDelete) GetMessageName() string { return "memif_delete" }
532 func (*MemifDelete) GetCrcString() string { return "f9e6675e" }
533 func (*MemifDelete) GetMessageType() api.MessageType { return api.RequestMessage }
535 func (m *MemifDelete) Size() int {
540 // field[1] m.SwIfIndex
544 func (m *MemifDelete) Marshal(b []byte) ([]byte, error) {
545 o := binary.BigEndian
551 buf = make([]byte, m.Size())
555 // field[1] m.SwIfIndex
556 o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
560 func (m *MemifDelete) Unmarshal(tmp []byte) error {
561 o := binary.BigEndian
565 // field[1] m.SwIfIndex
566 m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
571 // MemifDeleteReply represents VPP binary API message 'memif_delete_reply'.
572 type MemifDeleteReply struct {
573 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
576 func (m *MemifDeleteReply) Reset() { *m = MemifDeleteReply{} }
577 func (*MemifDeleteReply) GetMessageName() string { return "memif_delete_reply" }
578 func (*MemifDeleteReply) GetCrcString() string { return "e8d4e804" }
579 func (*MemifDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage }
581 func (m *MemifDeleteReply) Size() int {
590 func (m *MemifDeleteReply) Marshal(b []byte) ([]byte, error) {
591 o := binary.BigEndian
597 buf = make([]byte, m.Size())
602 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
606 func (m *MemifDeleteReply) Unmarshal(tmp []byte) error {
607 o := binary.BigEndian
612 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
617 // MemifDetails represents VPP binary API message 'memif_details'.
618 type MemifDetails struct {
619 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
620 HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
621 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
622 Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
623 Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
624 ZeroCopy bool `binapi:"bool,name=zero_copy" json:"zero_copy,omitempty"`
625 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
626 RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
627 BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
628 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
629 IfName string `binapi:"string[64],name=if_name" json:"if_name,omitempty" struc:"[64]byte"`
632 func (m *MemifDetails) Reset() { *m = MemifDetails{} }
633 func (*MemifDetails) GetMessageName() string { return "memif_details" }
634 func (*MemifDetails) GetCrcString() string { return "d0382c4c" }
635 func (*MemifDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
637 func (m *MemifDetails) Size() int {
642 // field[1] m.SwIfIndex
652 // field[1] m.ZeroCopy
654 // field[1] m.SocketID
656 // field[1] m.RingSize
658 // field[1] m.BufferSize
666 func (m *MemifDetails) Marshal(b []byte) ([]byte, error) {
667 o := binary.BigEndian
673 buf = make([]byte, m.Size())
677 // field[1] m.SwIfIndex
678 o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
681 for i := 0; i < 6; i++ {
683 if i < len(m.HwAddr) {
684 x = uint8(m.HwAddr[i])
690 o.PutUint32(buf[pos:pos+4], uint32(m.ID))
693 o.PutUint32(buf[pos:pos+4], uint32(m.Role))
696 o.PutUint32(buf[pos:pos+4], uint32(m.Mode))
698 // field[1] m.ZeroCopy
703 // field[1] m.SocketID
704 o.PutUint32(buf[pos:pos+4], uint32(m.SocketID))
706 // field[1] m.RingSize
707 o.PutUint32(buf[pos:pos+4], uint32(m.RingSize))
709 // field[1] m.BufferSize
710 o.PutUint16(buf[pos:pos+2], uint16(m.BufferSize))
713 o.PutUint32(buf[pos:pos+4], uint32(m.Flags))
716 copy(buf[pos:pos+64], m.IfName)
720 func (m *MemifDetails) Unmarshal(tmp []byte) error {
721 o := binary.BigEndian
725 // field[1] m.SwIfIndex
726 m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
729 for i := 0; i < len(m.HwAddr); i++ {
730 m.HwAddr[i] = uint8(tmp[pos])
734 m.ID = uint32(o.Uint32(tmp[pos : pos+4]))
737 m.Role = MemifRole(o.Uint32(tmp[pos : pos+4]))
740 m.Mode = MemifMode(o.Uint32(tmp[pos : pos+4]))
742 // field[1] m.ZeroCopy
743 m.ZeroCopy = tmp[pos] != 0
745 // field[1] m.SocketID
746 m.SocketID = uint32(o.Uint32(tmp[pos : pos+4]))
748 // field[1] m.RingSize
749 m.RingSize = uint32(o.Uint32(tmp[pos : pos+4]))
751 // field[1] m.BufferSize
752 m.BufferSize = uint16(o.Uint16(tmp[pos : pos+2]))
755 m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
759 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
760 m.IfName = codec.DecodeString(tmp[pos : pos+nul])
766 // MemifDump represents VPP binary API message 'memif_dump'.
767 type MemifDump struct{}
769 func (m *MemifDump) Reset() { *m = MemifDump{} }
770 func (*MemifDump) GetMessageName() string { return "memif_dump" }
771 func (*MemifDump) GetCrcString() string { return "51077d14" }
772 func (*MemifDump) GetMessageType() api.MessageType { return api.RequestMessage }
774 func (m *MemifDump) Size() int {
781 func (m *MemifDump) Marshal(b []byte) ([]byte, error) {
782 o := binary.BigEndian
788 buf = make([]byte, m.Size())
794 func (m *MemifDump) Unmarshal(tmp []byte) error {
795 o := binary.BigEndian
802 // MemifSocketFilenameAddDel represents VPP binary API message 'memif_socket_filename_add_del'.
803 type MemifSocketFilenameAddDel struct {
804 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
805 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
806 SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty" struc:"[108]byte"`
809 func (m *MemifSocketFilenameAddDel) Reset() { *m = MemifSocketFilenameAddDel{} }
810 func (*MemifSocketFilenameAddDel) GetMessageName() string { return "memif_socket_filename_add_del" }
811 func (*MemifSocketFilenameAddDel) GetCrcString() string { return "a2ce1a10" }
812 func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
814 func (m *MemifSocketFilenameAddDel) Size() int {
821 // field[1] m.SocketID
823 // field[1] m.SocketFilename
827 func (m *MemifSocketFilenameAddDel) Marshal(b []byte) ([]byte, error) {
828 o := binary.BigEndian
834 buf = make([]byte, m.Size())
843 // field[1] m.SocketID
844 o.PutUint32(buf[pos:pos+4], uint32(m.SocketID))
846 // field[1] m.SocketFilename
847 copy(buf[pos:pos+108], m.SocketFilename)
851 func (m *MemifSocketFilenameAddDel) Unmarshal(tmp []byte) error {
852 o := binary.BigEndian
857 m.IsAdd = tmp[pos] != 0
859 // field[1] m.SocketID
860 m.SocketID = uint32(o.Uint32(tmp[pos : pos+4]))
862 // field[1] m.SocketFilename
864 nul := bytes.Index(tmp[pos:pos+108], []byte{0x00})
865 m.SocketFilename = codec.DecodeString(tmp[pos : pos+nul])
871 // MemifSocketFilenameAddDelReply represents VPP binary API message 'memif_socket_filename_add_del_reply'.
872 type MemifSocketFilenameAddDelReply struct {
873 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
876 func (m *MemifSocketFilenameAddDelReply) Reset() { *m = MemifSocketFilenameAddDelReply{} }
877 func (*MemifSocketFilenameAddDelReply) GetMessageName() string {
878 return "memif_socket_filename_add_del_reply"
880 func (*MemifSocketFilenameAddDelReply) GetCrcString() string { return "e8d4e804" }
881 func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
883 func (m *MemifSocketFilenameAddDelReply) Size() int {
892 func (m *MemifSocketFilenameAddDelReply) Marshal(b []byte) ([]byte, error) {
893 o := binary.BigEndian
899 buf = make([]byte, m.Size())
904 o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
908 func (m *MemifSocketFilenameAddDelReply) Unmarshal(tmp []byte) error {
909 o := binary.BigEndian
914 m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
919 // MemifSocketFilenameDetails represents VPP binary API message 'memif_socket_filename_details'.
920 type MemifSocketFilenameDetails struct {
921 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
922 SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty" struc:"[108]byte"`
925 func (m *MemifSocketFilenameDetails) Reset() { *m = MemifSocketFilenameDetails{} }
926 func (*MemifSocketFilenameDetails) GetMessageName() string { return "memif_socket_filename_details" }
927 func (*MemifSocketFilenameDetails) GetCrcString() string { return "7ff326f7" }
928 func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
930 func (m *MemifSocketFilenameDetails) Size() int {
935 // field[1] m.SocketID
937 // field[1] m.SocketFilename
941 func (m *MemifSocketFilenameDetails) Marshal(b []byte) ([]byte, error) {
942 o := binary.BigEndian
948 buf = make([]byte, m.Size())
952 // field[1] m.SocketID
953 o.PutUint32(buf[pos:pos+4], uint32(m.SocketID))
955 // field[1] m.SocketFilename
956 copy(buf[pos:pos+108], m.SocketFilename)
960 func (m *MemifSocketFilenameDetails) Unmarshal(tmp []byte) error {
961 o := binary.BigEndian
965 // field[1] m.SocketID
966 m.SocketID = uint32(o.Uint32(tmp[pos : pos+4]))
968 // field[1] m.SocketFilename
970 nul := bytes.Index(tmp[pos:pos+108], []byte{0x00})
971 m.SocketFilename = codec.DecodeString(tmp[pos : pos+nul])
977 // MemifSocketFilenameDump represents VPP binary API message 'memif_socket_filename_dump'.
978 type MemifSocketFilenameDump struct{}
980 func (m *MemifSocketFilenameDump) Reset() { *m = MemifSocketFilenameDump{} }
981 func (*MemifSocketFilenameDump) GetMessageName() string { return "memif_socket_filename_dump" }
982 func (*MemifSocketFilenameDump) GetCrcString() string { return "51077d14" }
983 func (*MemifSocketFilenameDump) GetMessageType() api.MessageType { return api.RequestMessage }
985 func (m *MemifSocketFilenameDump) Size() int {
992 func (m *MemifSocketFilenameDump) Marshal(b []byte) ([]byte, error) {
993 o := binary.BigEndian
999 buf = make([]byte, m.Size())
1005 func (m *MemifSocketFilenameDump) Unmarshal(tmp []byte) error {
1006 o := binary.BigEndian
1013 func init() { file_memif_binapi_init() }
1014 func file_memif_binapi_init() {
1015 api.RegisterMessage((*MemifCreate)(nil), "memif.MemifCreate")
1016 api.RegisterMessage((*MemifCreateReply)(nil), "memif.MemifCreateReply")
1017 api.RegisterMessage((*MemifDelete)(nil), "memif.MemifDelete")
1018 api.RegisterMessage((*MemifDeleteReply)(nil), "memif.MemifDeleteReply")
1019 api.RegisterMessage((*MemifDetails)(nil), "memif.MemifDetails")
1020 api.RegisterMessage((*MemifDump)(nil), "memif.MemifDump")
1021 api.RegisterMessage((*MemifSocketFilenameAddDel)(nil), "memif.MemifSocketFilenameAddDel")
1022 api.RegisterMessage((*MemifSocketFilenameAddDelReply)(nil), "memif.MemifSocketFilenameAddDelReply")
1023 api.RegisterMessage((*MemifSocketFilenameDetails)(nil), "memif.MemifSocketFilenameDetails")
1024 api.RegisterMessage((*MemifSocketFilenameDump)(nil), "memif.MemifSocketFilenameDump")
1027 // Messages returns list of all messages in this module.
1028 func AllMessages() []api.Message {
1029 return []api.Message{
1030 (*MemifCreate)(nil),
1031 (*MemifCreateReply)(nil),
1032 (*MemifDelete)(nil),
1033 (*MemifDeleteReply)(nil),
1034 (*MemifDetails)(nil),
1036 (*MemifSocketFilenameAddDel)(nil),
1037 (*MemifSocketFilenameAddDelReply)(nil),
1038 (*MemifSocketFilenameDetails)(nil),
1039 (*MemifSocketFilenameDump)(nil),
1043 // Reference imports to suppress errors if they are not otherwise used.
1044 var _ = api.RegisterMessage
1045 var _ = codec.DecodeString
1046 var _ = bytes.NewBuffer
1047 var _ = context.Background
1049 var _ = strconv.Itoa
1051 var _ = binary.BigEndian
1052 var _ = math.Float32bits