1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/plugins/memif.api.json
7 // Package memif contains generated bindings for API file memif.api.
20 api "git.fd.io/govpp.git/api"
21 codec "git.fd.io/govpp.git/codec"
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
33 VersionCrc = 0x88dc56c9
36 // IfStatusFlags defines enum 'if_status_flags'.
37 type IfStatusFlags uint32
40 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
41 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
45 IfStatusFlags_name = map[uint32]string{
46 1: "IF_STATUS_API_FLAG_ADMIN_UP",
47 2: "IF_STATUS_API_FLAG_LINK_UP",
49 IfStatusFlags_value = map[string]uint32{
50 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
51 "IF_STATUS_API_FLAG_LINK_UP": 2,
55 func (x IfStatusFlags) String() string {
56 s, ok := IfStatusFlags_name[uint32(x)]
60 str := func(n uint32) string {
61 s, ok := IfStatusFlags_name[uint32(n)]
65 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
67 for i := uint32(0); i <= 32; i++ {
82 // IfType defines enum 'if_type'.
86 IF_API_TYPE_HARDWARE IfType = 1
87 IF_API_TYPE_SUB IfType = 2
88 IF_API_TYPE_P2P IfType = 3
89 IF_API_TYPE_PIPE IfType = 4
93 IfType_name = map[uint32]string{
94 1: "IF_API_TYPE_HARDWARE",
97 4: "IF_API_TYPE_PIPE",
99 IfType_value = map[string]uint32{
100 "IF_API_TYPE_HARDWARE": 1,
101 "IF_API_TYPE_SUB": 2,
102 "IF_API_TYPE_P2P": 3,
103 "IF_API_TYPE_PIPE": 4,
107 func (x IfType) String() string {
108 s, ok := IfType_name[uint32(x)]
112 return "IfType(" + strconv.Itoa(int(x)) + ")"
115 // LinkDuplex defines enum 'link_duplex'.
116 type LinkDuplex uint32
119 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
120 LINK_DUPLEX_API_HALF LinkDuplex = 1
121 LINK_DUPLEX_API_FULL LinkDuplex = 2
125 LinkDuplex_name = map[uint32]string{
126 0: "LINK_DUPLEX_API_UNKNOWN",
127 1: "LINK_DUPLEX_API_HALF",
128 2: "LINK_DUPLEX_API_FULL",
130 LinkDuplex_value = map[string]uint32{
131 "LINK_DUPLEX_API_UNKNOWN": 0,
132 "LINK_DUPLEX_API_HALF": 1,
133 "LINK_DUPLEX_API_FULL": 2,
137 func (x LinkDuplex) String() string {
138 s, ok := LinkDuplex_name[uint32(x)]
142 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
145 // MemifMode defines enum 'memif_mode'.
146 type MemifMode uint32
149 MEMIF_MODE_API_ETHERNET MemifMode = 0
150 MEMIF_MODE_API_IP MemifMode = 1
151 MEMIF_MODE_API_PUNT_INJECT MemifMode = 2
155 MemifMode_name = map[uint32]string{
156 0: "MEMIF_MODE_API_ETHERNET",
157 1: "MEMIF_MODE_API_IP",
158 2: "MEMIF_MODE_API_PUNT_INJECT",
160 MemifMode_value = map[string]uint32{
161 "MEMIF_MODE_API_ETHERNET": 0,
162 "MEMIF_MODE_API_IP": 1,
163 "MEMIF_MODE_API_PUNT_INJECT": 2,
167 func (x MemifMode) String() string {
168 s, ok := MemifMode_name[uint32(x)]
172 return "MemifMode(" + strconv.Itoa(int(x)) + ")"
175 // MemifRole defines enum 'memif_role'.
176 type MemifRole uint32
179 MEMIF_ROLE_API_MASTER MemifRole = 0
180 MEMIF_ROLE_API_SLAVE MemifRole = 1
184 MemifRole_name = map[uint32]string{
185 0: "MEMIF_ROLE_API_MASTER",
186 1: "MEMIF_ROLE_API_SLAVE",
188 MemifRole_value = map[string]uint32{
189 "MEMIF_ROLE_API_MASTER": 0,
190 "MEMIF_ROLE_API_SLAVE": 1,
194 func (x MemifRole) String() string {
195 s, ok := MemifRole_name[uint32(x)]
199 return "MemifRole(" + strconv.Itoa(int(x)) + ")"
202 // MtuProto defines enum 'mtu_proto'.
206 MTU_PROTO_API_L3 MtuProto = 1
207 MTU_PROTO_API_IP4 MtuProto = 2
208 MTU_PROTO_API_IP6 MtuProto = 3
209 MTU_PROTO_API_MPLS MtuProto = 4
210 MTU_PROTO_API_N MtuProto = 5
214 MtuProto_name = map[uint32]string{
215 1: "MTU_PROTO_API_L3",
216 2: "MTU_PROTO_API_IP4",
217 3: "MTU_PROTO_API_IP6",
218 4: "MTU_PROTO_API_MPLS",
219 5: "MTU_PROTO_API_N",
221 MtuProto_value = map[string]uint32{
222 "MTU_PROTO_API_L3": 1,
223 "MTU_PROTO_API_IP4": 2,
224 "MTU_PROTO_API_IP6": 3,
225 "MTU_PROTO_API_MPLS": 4,
226 "MTU_PROTO_API_N": 5,
230 func (x MtuProto) String() string {
231 s, ok := MtuProto_name[uint32(x)]
235 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
238 // RxMode defines enum 'rx_mode'.
242 RX_MODE_API_UNKNOWN RxMode = 0
243 RX_MODE_API_POLLING RxMode = 1
244 RX_MODE_API_INTERRUPT RxMode = 2
245 RX_MODE_API_ADAPTIVE RxMode = 3
246 RX_MODE_API_DEFAULT RxMode = 4
250 RxMode_name = map[uint32]string{
251 0: "RX_MODE_API_UNKNOWN",
252 1: "RX_MODE_API_POLLING",
253 2: "RX_MODE_API_INTERRUPT",
254 3: "RX_MODE_API_ADAPTIVE",
255 4: "RX_MODE_API_DEFAULT",
257 RxMode_value = map[string]uint32{
258 "RX_MODE_API_UNKNOWN": 0,
259 "RX_MODE_API_POLLING": 1,
260 "RX_MODE_API_INTERRUPT": 2,
261 "RX_MODE_API_ADAPTIVE": 3,
262 "RX_MODE_API_DEFAULT": 4,
266 func (x RxMode) String() string {
267 s, ok := RxMode_name[uint32(x)]
271 return "RxMode(" + strconv.Itoa(int(x)) + ")"
274 // SubIfFlags defines enum 'sub_if_flags'.
275 type SubIfFlags uint32
278 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
279 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
280 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
281 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
282 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
283 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
284 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
285 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
286 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
287 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
291 SubIfFlags_name = map[uint32]string{
292 1: "SUB_IF_API_FLAG_NO_TAGS",
293 2: "SUB_IF_API_FLAG_ONE_TAG",
294 4: "SUB_IF_API_FLAG_TWO_TAGS",
295 8: "SUB_IF_API_FLAG_DOT1AD",
296 16: "SUB_IF_API_FLAG_EXACT_MATCH",
297 32: "SUB_IF_API_FLAG_DEFAULT",
298 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
299 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
300 254: "SUB_IF_API_FLAG_MASK_VNET",
301 256: "SUB_IF_API_FLAG_DOT1AH",
303 SubIfFlags_value = map[string]uint32{
304 "SUB_IF_API_FLAG_NO_TAGS": 1,
305 "SUB_IF_API_FLAG_ONE_TAG": 2,
306 "SUB_IF_API_FLAG_TWO_TAGS": 4,
307 "SUB_IF_API_FLAG_DOT1AD": 8,
308 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
309 "SUB_IF_API_FLAG_DEFAULT": 32,
310 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
311 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
312 "SUB_IF_API_FLAG_MASK_VNET": 254,
313 "SUB_IF_API_FLAG_DOT1AH": 256,
317 func (x SubIfFlags) String() string {
318 s, ok := SubIfFlags_name[uint32(x)]
322 str := func(n uint32) string {
323 s, ok := SubIfFlags_name[uint32(n)]
327 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
329 for i := uint32(0); i <= 32; i++ {
339 return str(uint32(x))
344 // InterfaceIndex defines alias 'interface_index'.
345 type InterfaceIndex uint32
347 // MacAddress defines alias 'mac_address'.
348 type MacAddress [6]uint8
350 func ParseMacAddress(s string) (MacAddress, error) {
351 var macaddr MacAddress
352 mac, err := net.ParseMAC(s)
356 copy(macaddr[:], mac[:])
360 func (x MacAddress) ToMAC() net.HardwareAddr {
361 return net.HardwareAddr(x[:])
364 func (x MacAddress) String() string {
365 return x.ToMAC().String()
368 func (x *MacAddress) MarshalText() ([]byte, error) {
369 return []byte(x.String()), nil
372 func (x *MacAddress) UnmarshalText(text []byte) error {
373 mac, err := ParseMacAddress(string(text))
381 // MemifCreate defines message 'memif_create'.
382 type MemifCreate struct {
383 Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
384 Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
385 RxQueues uint8 `binapi:"u8,name=rx_queues" json:"rx_queues,omitempty"`
386 TxQueues uint8 `binapi:"u8,name=tx_queues" json:"tx_queues,omitempty"`
387 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
388 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
389 RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
390 BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
391 NoZeroCopy bool `binapi:"bool,name=no_zero_copy" json:"no_zero_copy,omitempty"`
392 HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
393 Secret string `binapi:"string[24],name=secret" json:"secret,omitempty"`
396 func (m *MemifCreate) Reset() { *m = MemifCreate{} }
397 func (*MemifCreate) GetMessageName() string { return "memif_create" }
398 func (*MemifCreate) GetCrcString() string { return "b1b25061" }
399 func (*MemifCreate) GetMessageType() api.MessageType {
400 return api.RequestMessage
403 func (m *MemifCreate) Size() (size int) {
409 size += 1 // m.RxQueues
410 size += 1 // m.TxQueues
412 size += 4 // m.SocketID
413 size += 4 // m.RingSize
414 size += 2 // m.BufferSize
415 size += 1 // m.NoZeroCopy
416 size += 1 * 6 // m.HwAddr
417 size += 24 // m.Secret
420 func (m *MemifCreate) Marshal(b []byte) ([]byte, error) {
422 b = make([]byte, m.Size())
424 buf := codec.NewBuffer(b)
425 buf.EncodeUint32(uint32(m.Role))
426 buf.EncodeUint32(uint32(m.Mode))
427 buf.EncodeUint8(m.RxQueues)
428 buf.EncodeUint8(m.TxQueues)
429 buf.EncodeUint32(m.ID)
430 buf.EncodeUint32(m.SocketID)
431 buf.EncodeUint32(m.RingSize)
432 buf.EncodeUint16(m.BufferSize)
433 buf.EncodeBool(m.NoZeroCopy)
434 buf.EncodeBytes(m.HwAddr[:], 6)
435 buf.EncodeString(m.Secret, 24)
436 return buf.Bytes(), nil
438 func (m *MemifCreate) Unmarshal(b []byte) error {
439 buf := codec.NewBuffer(b)
440 m.Role = MemifRole(buf.DecodeUint32())
441 m.Mode = MemifMode(buf.DecodeUint32())
442 m.RxQueues = buf.DecodeUint8()
443 m.TxQueues = buf.DecodeUint8()
444 m.ID = buf.DecodeUint32()
445 m.SocketID = buf.DecodeUint32()
446 m.RingSize = buf.DecodeUint32()
447 m.BufferSize = buf.DecodeUint16()
448 m.NoZeroCopy = buf.DecodeBool()
449 copy(m.HwAddr[:], buf.DecodeBytes(6))
450 m.Secret = buf.DecodeString(24)
454 // MemifCreateReply defines message 'memif_create_reply'.
455 type MemifCreateReply struct {
456 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
457 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
460 func (m *MemifCreateReply) Reset() { *m = MemifCreateReply{} }
461 func (*MemifCreateReply) GetMessageName() string { return "memif_create_reply" }
462 func (*MemifCreateReply) GetCrcString() string { return "5383d31f" }
463 func (*MemifCreateReply) GetMessageType() api.MessageType {
464 return api.ReplyMessage
467 func (m *MemifCreateReply) Size() (size int) {
471 size += 4 // m.Retval
472 size += 4 // m.SwIfIndex
475 func (m *MemifCreateReply) Marshal(b []byte) ([]byte, error) {
477 b = make([]byte, m.Size())
479 buf := codec.NewBuffer(b)
480 buf.EncodeInt32(m.Retval)
481 buf.EncodeUint32(uint32(m.SwIfIndex))
482 return buf.Bytes(), nil
484 func (m *MemifCreateReply) Unmarshal(b []byte) error {
485 buf := codec.NewBuffer(b)
486 m.Retval = buf.DecodeInt32()
487 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
491 // MemifDelete defines message 'memif_delete'.
492 type MemifDelete struct {
493 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
496 func (m *MemifDelete) Reset() { *m = MemifDelete{} }
497 func (*MemifDelete) GetMessageName() string { return "memif_delete" }
498 func (*MemifDelete) GetCrcString() string { return "f9e6675e" }
499 func (*MemifDelete) GetMessageType() api.MessageType {
500 return api.RequestMessage
503 func (m *MemifDelete) Size() (size int) {
507 size += 4 // m.SwIfIndex
510 func (m *MemifDelete) Marshal(b []byte) ([]byte, error) {
512 b = make([]byte, m.Size())
514 buf := codec.NewBuffer(b)
515 buf.EncodeUint32(uint32(m.SwIfIndex))
516 return buf.Bytes(), nil
518 func (m *MemifDelete) Unmarshal(b []byte) error {
519 buf := codec.NewBuffer(b)
520 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
524 // MemifDeleteReply defines message 'memif_delete_reply'.
525 type MemifDeleteReply struct {
526 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
529 func (m *MemifDeleteReply) Reset() { *m = MemifDeleteReply{} }
530 func (*MemifDeleteReply) GetMessageName() string { return "memif_delete_reply" }
531 func (*MemifDeleteReply) GetCrcString() string { return "e8d4e804" }
532 func (*MemifDeleteReply) GetMessageType() api.MessageType {
533 return api.ReplyMessage
536 func (m *MemifDeleteReply) Size() (size int) {
540 size += 4 // m.Retval
543 func (m *MemifDeleteReply) Marshal(b []byte) ([]byte, error) {
545 b = make([]byte, m.Size())
547 buf := codec.NewBuffer(b)
548 buf.EncodeInt32(m.Retval)
549 return buf.Bytes(), nil
551 func (m *MemifDeleteReply) Unmarshal(b []byte) error {
552 buf := codec.NewBuffer(b)
553 m.Retval = buf.DecodeInt32()
557 // MemifDetails defines message 'memif_details'.
558 type MemifDetails struct {
559 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
560 HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
561 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
562 Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
563 Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
564 ZeroCopy bool `binapi:"bool,name=zero_copy" json:"zero_copy,omitempty"`
565 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
566 RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
567 BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
568 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
569 IfName string `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
572 func (m *MemifDetails) Reset() { *m = MemifDetails{} }
573 func (*MemifDetails) GetMessageName() string { return "memif_details" }
574 func (*MemifDetails) GetCrcString() string { return "d0382c4c" }
575 func (*MemifDetails) GetMessageType() api.MessageType {
576 return api.ReplyMessage
579 func (m *MemifDetails) Size() (size int) {
583 size += 4 // m.SwIfIndex
584 size += 1 * 6 // m.HwAddr
588 size += 1 // m.ZeroCopy
589 size += 4 // m.SocketID
590 size += 4 // m.RingSize
591 size += 2 // m.BufferSize
593 size += 64 // m.IfName
596 func (m *MemifDetails) Marshal(b []byte) ([]byte, error) {
598 b = make([]byte, m.Size())
600 buf := codec.NewBuffer(b)
601 buf.EncodeUint32(uint32(m.SwIfIndex))
602 buf.EncodeBytes(m.HwAddr[:], 6)
603 buf.EncodeUint32(m.ID)
604 buf.EncodeUint32(uint32(m.Role))
605 buf.EncodeUint32(uint32(m.Mode))
606 buf.EncodeBool(m.ZeroCopy)
607 buf.EncodeUint32(m.SocketID)
608 buf.EncodeUint32(m.RingSize)
609 buf.EncodeUint16(m.BufferSize)
610 buf.EncodeUint32(uint32(m.Flags))
611 buf.EncodeString(m.IfName, 64)
612 return buf.Bytes(), nil
614 func (m *MemifDetails) Unmarshal(b []byte) error {
615 buf := codec.NewBuffer(b)
616 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
617 copy(m.HwAddr[:], buf.DecodeBytes(6))
618 m.ID = buf.DecodeUint32()
619 m.Role = MemifRole(buf.DecodeUint32())
620 m.Mode = MemifMode(buf.DecodeUint32())
621 m.ZeroCopy = buf.DecodeBool()
622 m.SocketID = buf.DecodeUint32()
623 m.RingSize = buf.DecodeUint32()
624 m.BufferSize = buf.DecodeUint16()
625 m.Flags = IfStatusFlags(buf.DecodeUint32())
626 m.IfName = buf.DecodeString(64)
630 // MemifDump defines message 'memif_dump'.
631 type MemifDump struct{}
633 func (m *MemifDump) Reset() { *m = MemifDump{} }
634 func (*MemifDump) GetMessageName() string { return "memif_dump" }
635 func (*MemifDump) GetCrcString() string { return "51077d14" }
636 func (*MemifDump) GetMessageType() api.MessageType {
637 return api.RequestMessage
640 func (m *MemifDump) Size() (size int) {
646 func (m *MemifDump) Marshal(b []byte) ([]byte, error) {
648 b = make([]byte, m.Size())
650 buf := codec.NewBuffer(b)
651 return buf.Bytes(), nil
653 func (m *MemifDump) Unmarshal(b []byte) error {
657 // MemifSocketFilenameAddDel defines message 'memif_socket_filename_add_del'.
658 type MemifSocketFilenameAddDel struct {
659 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
660 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
661 SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
664 func (m *MemifSocketFilenameAddDel) Reset() { *m = MemifSocketFilenameAddDel{} }
665 func (*MemifSocketFilenameAddDel) GetMessageName() string { return "memif_socket_filename_add_del" }
666 func (*MemifSocketFilenameAddDel) GetCrcString() string { return "a2ce1a10" }
667 func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType {
668 return api.RequestMessage
671 func (m *MemifSocketFilenameAddDel) Size() (size int) {
676 size += 4 // m.SocketID
677 size += 108 // m.SocketFilename
680 func (m *MemifSocketFilenameAddDel) Marshal(b []byte) ([]byte, error) {
682 b = make([]byte, m.Size())
684 buf := codec.NewBuffer(b)
685 buf.EncodeBool(m.IsAdd)
686 buf.EncodeUint32(m.SocketID)
687 buf.EncodeString(m.SocketFilename, 108)
688 return buf.Bytes(), nil
690 func (m *MemifSocketFilenameAddDel) Unmarshal(b []byte) error {
691 buf := codec.NewBuffer(b)
692 m.IsAdd = buf.DecodeBool()
693 m.SocketID = buf.DecodeUint32()
694 m.SocketFilename = buf.DecodeString(108)
698 // MemifSocketFilenameAddDelReply defines message 'memif_socket_filename_add_del_reply'.
699 type MemifSocketFilenameAddDelReply struct {
700 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
703 func (m *MemifSocketFilenameAddDelReply) Reset() { *m = MemifSocketFilenameAddDelReply{} }
704 func (*MemifSocketFilenameAddDelReply) GetMessageName() string {
705 return "memif_socket_filename_add_del_reply"
707 func (*MemifSocketFilenameAddDelReply) GetCrcString() string { return "e8d4e804" }
708 func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType {
709 return api.ReplyMessage
712 func (m *MemifSocketFilenameAddDelReply) Size() (size int) {
716 size += 4 // m.Retval
719 func (m *MemifSocketFilenameAddDelReply) Marshal(b []byte) ([]byte, error) {
721 b = make([]byte, m.Size())
723 buf := codec.NewBuffer(b)
724 buf.EncodeInt32(m.Retval)
725 return buf.Bytes(), nil
727 func (m *MemifSocketFilenameAddDelReply) Unmarshal(b []byte) error {
728 buf := codec.NewBuffer(b)
729 m.Retval = buf.DecodeInt32()
733 // MemifSocketFilenameDetails defines message 'memif_socket_filename_details'.
734 type MemifSocketFilenameDetails struct {
735 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
736 SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
739 func (m *MemifSocketFilenameDetails) Reset() { *m = MemifSocketFilenameDetails{} }
740 func (*MemifSocketFilenameDetails) GetMessageName() string { return "memif_socket_filename_details" }
741 func (*MemifSocketFilenameDetails) GetCrcString() string { return "7ff326f7" }
742 func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType {
743 return api.ReplyMessage
746 func (m *MemifSocketFilenameDetails) Size() (size int) {
750 size += 4 // m.SocketID
751 size += 108 // m.SocketFilename
754 func (m *MemifSocketFilenameDetails) Marshal(b []byte) ([]byte, error) {
756 b = make([]byte, m.Size())
758 buf := codec.NewBuffer(b)
759 buf.EncodeUint32(m.SocketID)
760 buf.EncodeString(m.SocketFilename, 108)
761 return buf.Bytes(), nil
763 func (m *MemifSocketFilenameDetails) Unmarshal(b []byte) error {
764 buf := codec.NewBuffer(b)
765 m.SocketID = buf.DecodeUint32()
766 m.SocketFilename = buf.DecodeString(108)
770 // MemifSocketFilenameDump defines message 'memif_socket_filename_dump'.
771 type MemifSocketFilenameDump struct{}
773 func (m *MemifSocketFilenameDump) Reset() { *m = MemifSocketFilenameDump{} }
774 func (*MemifSocketFilenameDump) GetMessageName() string { return "memif_socket_filename_dump" }
775 func (*MemifSocketFilenameDump) GetCrcString() string { return "51077d14" }
776 func (*MemifSocketFilenameDump) GetMessageType() api.MessageType {
777 return api.RequestMessage
780 func (m *MemifSocketFilenameDump) Size() (size int) {
786 func (m *MemifSocketFilenameDump) Marshal(b []byte) ([]byte, error) {
788 b = make([]byte, m.Size())
790 buf := codec.NewBuffer(b)
791 return buf.Bytes(), nil
793 func (m *MemifSocketFilenameDump) Unmarshal(b []byte) error {
797 func init() { file_memif_binapi_init() }
798 func file_memif_binapi_init() {
799 api.RegisterMessage((*MemifCreate)(nil), "memif_create_b1b25061")
800 api.RegisterMessage((*MemifCreateReply)(nil), "memif_create_reply_5383d31f")
801 api.RegisterMessage((*MemifDelete)(nil), "memif_delete_f9e6675e")
802 api.RegisterMessage((*MemifDeleteReply)(nil), "memif_delete_reply_e8d4e804")
803 api.RegisterMessage((*MemifDetails)(nil), "memif_details_d0382c4c")
804 api.RegisterMessage((*MemifDump)(nil), "memif_dump_51077d14")
805 api.RegisterMessage((*MemifSocketFilenameAddDel)(nil), "memif_socket_filename_add_del_a2ce1a10")
806 api.RegisterMessage((*MemifSocketFilenameAddDelReply)(nil), "memif_socket_filename_add_del_reply_e8d4e804")
807 api.RegisterMessage((*MemifSocketFilenameDetails)(nil), "memif_socket_filename_details_7ff326f7")
808 api.RegisterMessage((*MemifSocketFilenameDump)(nil), "memif_socket_filename_dump_51077d14")
811 // Messages returns list of all messages in this module.
812 func AllMessages() []api.Message {
813 return []api.Message{
815 (*MemifCreateReply)(nil),
817 (*MemifDeleteReply)(nil),
818 (*MemifDetails)(nil),
820 (*MemifSocketFilenameAddDel)(nil),
821 (*MemifSocketFilenameAddDelReply)(nil),
822 (*MemifSocketFilenameDetails)(nil),
823 (*MemifSocketFilenameDump)(nil),