1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/plugins/memif.api.json
7 // Package memif contains generated bindings for API file memif.api.
17 api "git.fd.io/govpp.git/api"
18 codec "git.fd.io/govpp.git/codec"
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
32 VersionCrc = 0x88dc56c9
35 // IfStatusFlags defines enum 'if_status_flags'.
36 type IfStatusFlags uint32
39 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
40 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
44 IfStatusFlags_name = map[uint32]string{
45 1: "IF_STATUS_API_FLAG_ADMIN_UP",
46 2: "IF_STATUS_API_FLAG_LINK_UP",
48 IfStatusFlags_value = map[string]uint32{
49 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
50 "IF_STATUS_API_FLAG_LINK_UP": 2,
54 func (x IfStatusFlags) String() string {
55 s, ok := IfStatusFlags_name[uint32(x)]
59 str := func(n uint32) string {
60 s, ok := IfStatusFlags_name[uint32(n)]
64 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
66 for i := uint32(0); i <= 32; i++ {
81 // IfType defines enum 'if_type'.
85 IF_API_TYPE_HARDWARE IfType = 1
86 IF_API_TYPE_SUB IfType = 2
87 IF_API_TYPE_P2P IfType = 3
88 IF_API_TYPE_PIPE IfType = 4
92 IfType_name = map[uint32]string{
93 1: "IF_API_TYPE_HARDWARE",
96 4: "IF_API_TYPE_PIPE",
98 IfType_value = map[string]uint32{
99 "IF_API_TYPE_HARDWARE": 1,
100 "IF_API_TYPE_SUB": 2,
101 "IF_API_TYPE_P2P": 3,
102 "IF_API_TYPE_PIPE": 4,
106 func (x IfType) String() string {
107 s, ok := IfType_name[uint32(x)]
111 return "IfType(" + strconv.Itoa(int(x)) + ")"
114 // LinkDuplex defines enum 'link_duplex'.
115 type LinkDuplex uint32
118 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
119 LINK_DUPLEX_API_HALF LinkDuplex = 1
120 LINK_DUPLEX_API_FULL LinkDuplex = 2
124 LinkDuplex_name = map[uint32]string{
125 0: "LINK_DUPLEX_API_UNKNOWN",
126 1: "LINK_DUPLEX_API_HALF",
127 2: "LINK_DUPLEX_API_FULL",
129 LinkDuplex_value = map[string]uint32{
130 "LINK_DUPLEX_API_UNKNOWN": 0,
131 "LINK_DUPLEX_API_HALF": 1,
132 "LINK_DUPLEX_API_FULL": 2,
136 func (x LinkDuplex) String() string {
137 s, ok := LinkDuplex_name[uint32(x)]
141 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
144 // MemifMode defines enum 'memif_mode'.
145 type MemifMode uint32
148 MEMIF_MODE_API_ETHERNET MemifMode = 0
149 MEMIF_MODE_API_IP MemifMode = 1
150 MEMIF_MODE_API_PUNT_INJECT MemifMode = 2
154 MemifMode_name = map[uint32]string{
155 0: "MEMIF_MODE_API_ETHERNET",
156 1: "MEMIF_MODE_API_IP",
157 2: "MEMIF_MODE_API_PUNT_INJECT",
159 MemifMode_value = map[string]uint32{
160 "MEMIF_MODE_API_ETHERNET": 0,
161 "MEMIF_MODE_API_IP": 1,
162 "MEMIF_MODE_API_PUNT_INJECT": 2,
166 func (x MemifMode) String() string {
167 s, ok := MemifMode_name[uint32(x)]
171 return "MemifMode(" + strconv.Itoa(int(x)) + ")"
174 // MemifRole defines enum 'memif_role'.
175 type MemifRole uint32
178 MEMIF_ROLE_API_MASTER MemifRole = 0
179 MEMIF_ROLE_API_SLAVE MemifRole = 1
183 MemifRole_name = map[uint32]string{
184 0: "MEMIF_ROLE_API_MASTER",
185 1: "MEMIF_ROLE_API_SLAVE",
187 MemifRole_value = map[string]uint32{
188 "MEMIF_ROLE_API_MASTER": 0,
189 "MEMIF_ROLE_API_SLAVE": 1,
193 func (x MemifRole) String() string {
194 s, ok := MemifRole_name[uint32(x)]
198 return "MemifRole(" + strconv.Itoa(int(x)) + ")"
201 // MtuProto defines enum 'mtu_proto'.
205 MTU_PROTO_API_L3 MtuProto = 1
206 MTU_PROTO_API_IP4 MtuProto = 2
207 MTU_PROTO_API_IP6 MtuProto = 3
208 MTU_PROTO_API_MPLS MtuProto = 4
209 MTU_PROTO_API_N MtuProto = 5
213 MtuProto_name = map[uint32]string{
214 1: "MTU_PROTO_API_L3",
215 2: "MTU_PROTO_API_IP4",
216 3: "MTU_PROTO_API_IP6",
217 4: "MTU_PROTO_API_MPLS",
218 5: "MTU_PROTO_API_N",
220 MtuProto_value = map[string]uint32{
221 "MTU_PROTO_API_L3": 1,
222 "MTU_PROTO_API_IP4": 2,
223 "MTU_PROTO_API_IP6": 3,
224 "MTU_PROTO_API_MPLS": 4,
225 "MTU_PROTO_API_N": 5,
229 func (x MtuProto) String() string {
230 s, ok := MtuProto_name[uint32(x)]
234 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
237 // RxMode defines enum 'rx_mode'.
241 RX_MODE_API_UNKNOWN RxMode = 0
242 RX_MODE_API_POLLING RxMode = 1
243 RX_MODE_API_INTERRUPT RxMode = 2
244 RX_MODE_API_ADAPTIVE RxMode = 3
245 RX_MODE_API_DEFAULT RxMode = 4
249 RxMode_name = map[uint32]string{
250 0: "RX_MODE_API_UNKNOWN",
251 1: "RX_MODE_API_POLLING",
252 2: "RX_MODE_API_INTERRUPT",
253 3: "RX_MODE_API_ADAPTIVE",
254 4: "RX_MODE_API_DEFAULT",
256 RxMode_value = map[string]uint32{
257 "RX_MODE_API_UNKNOWN": 0,
258 "RX_MODE_API_POLLING": 1,
259 "RX_MODE_API_INTERRUPT": 2,
260 "RX_MODE_API_ADAPTIVE": 3,
261 "RX_MODE_API_DEFAULT": 4,
265 func (x RxMode) String() string {
266 s, ok := RxMode_name[uint32(x)]
270 return "RxMode(" + strconv.Itoa(int(x)) + ")"
273 // SubIfFlags defines enum 'sub_if_flags'.
274 type SubIfFlags uint32
277 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
278 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
279 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
280 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
281 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
282 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
283 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
284 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
285 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
286 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
290 SubIfFlags_name = map[uint32]string{
291 1: "SUB_IF_API_FLAG_NO_TAGS",
292 2: "SUB_IF_API_FLAG_ONE_TAG",
293 4: "SUB_IF_API_FLAG_TWO_TAGS",
294 8: "SUB_IF_API_FLAG_DOT1AD",
295 16: "SUB_IF_API_FLAG_EXACT_MATCH",
296 32: "SUB_IF_API_FLAG_DEFAULT",
297 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
298 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
299 254: "SUB_IF_API_FLAG_MASK_VNET",
300 256: "SUB_IF_API_FLAG_DOT1AH",
302 SubIfFlags_value = map[string]uint32{
303 "SUB_IF_API_FLAG_NO_TAGS": 1,
304 "SUB_IF_API_FLAG_ONE_TAG": 2,
305 "SUB_IF_API_FLAG_TWO_TAGS": 4,
306 "SUB_IF_API_FLAG_DOT1AD": 8,
307 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
308 "SUB_IF_API_FLAG_DEFAULT": 32,
309 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
310 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
311 "SUB_IF_API_FLAG_MASK_VNET": 254,
312 "SUB_IF_API_FLAG_DOT1AH": 256,
316 func (x SubIfFlags) String() string {
317 s, ok := SubIfFlags_name[uint32(x)]
321 str := func(n uint32) string {
322 s, ok := SubIfFlags_name[uint32(n)]
326 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
328 for i := uint32(0); i <= 32; i++ {
338 return str(uint32(x))
343 // InterfaceIndex defines alias 'interface_index'.
344 type InterfaceIndex uint32
346 // MacAddress defines alias 'mac_address'.
347 type MacAddress [6]uint8
349 func ParseMacAddress(s string) (MacAddress, error) {
350 var macaddr MacAddress
351 mac, err := net.ParseMAC(s)
355 copy(macaddr[:], mac[:])
358 func (x MacAddress) ToMAC() net.HardwareAddr {
359 return net.HardwareAddr(x[:])
361 func (x MacAddress) String() string {
362 return x.ToMAC().String()
364 func (x *MacAddress) MarshalText() ([]byte, error) {
365 return []byte(x.String()), nil
367 func (x *MacAddress) UnmarshalText(text []byte) error {
368 mac, err := ParseMacAddress(string(text))
376 // MemifCreate defines message 'memif_create'.
377 type MemifCreate struct {
378 Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
379 Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
380 RxQueues uint8 `binapi:"u8,name=rx_queues" json:"rx_queues,omitempty"`
381 TxQueues uint8 `binapi:"u8,name=tx_queues" json:"tx_queues,omitempty"`
382 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
383 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
384 RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
385 BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
386 NoZeroCopy bool `binapi:"bool,name=no_zero_copy" json:"no_zero_copy,omitempty"`
387 HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
388 Secret string `binapi:"string[24],name=secret" json:"secret,omitempty"`
391 func (m *MemifCreate) Reset() { *m = MemifCreate{} }
392 func (*MemifCreate) GetMessageName() string { return "memif_create" }
393 func (*MemifCreate) GetCrcString() string { return "b1b25061" }
394 func (*MemifCreate) GetMessageType() api.MessageType {
395 return api.RequestMessage
398 func (m *MemifCreate) Size() (size int) {
404 size += 1 // m.RxQueues
405 size += 1 // m.TxQueues
407 size += 4 // m.SocketID
408 size += 4 // m.RingSize
409 size += 2 // m.BufferSize
410 size += 1 // m.NoZeroCopy
411 size += 1 * 6 // m.HwAddr
412 size += 24 // m.Secret
415 func (m *MemifCreate) Marshal(b []byte) ([]byte, error) {
417 b = make([]byte, m.Size())
419 buf := codec.NewBuffer(b)
420 buf.EncodeUint32(uint32(m.Role))
421 buf.EncodeUint32(uint32(m.Mode))
422 buf.EncodeUint8(m.RxQueues)
423 buf.EncodeUint8(m.TxQueues)
424 buf.EncodeUint32(m.ID)
425 buf.EncodeUint32(m.SocketID)
426 buf.EncodeUint32(m.RingSize)
427 buf.EncodeUint16(m.BufferSize)
428 buf.EncodeBool(m.NoZeroCopy)
429 buf.EncodeBytes(m.HwAddr[:], 6)
430 buf.EncodeString(m.Secret, 24)
431 return buf.Bytes(), nil
433 func (m *MemifCreate) Unmarshal(b []byte) error {
434 buf := codec.NewBuffer(b)
435 m.Role = MemifRole(buf.DecodeUint32())
436 m.Mode = MemifMode(buf.DecodeUint32())
437 m.RxQueues = buf.DecodeUint8()
438 m.TxQueues = buf.DecodeUint8()
439 m.ID = buf.DecodeUint32()
440 m.SocketID = buf.DecodeUint32()
441 m.RingSize = buf.DecodeUint32()
442 m.BufferSize = buf.DecodeUint16()
443 m.NoZeroCopy = buf.DecodeBool()
444 copy(m.HwAddr[:], buf.DecodeBytes(6))
445 m.Secret = buf.DecodeString(24)
449 // MemifCreateReply defines message 'memif_create_reply'.
450 type MemifCreateReply struct {
451 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
452 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
455 func (m *MemifCreateReply) Reset() { *m = MemifCreateReply{} }
456 func (*MemifCreateReply) GetMessageName() string { return "memif_create_reply" }
457 func (*MemifCreateReply) GetCrcString() string { return "5383d31f" }
458 func (*MemifCreateReply) GetMessageType() api.MessageType {
459 return api.ReplyMessage
462 func (m *MemifCreateReply) Size() (size int) {
466 size += 4 // m.Retval
467 size += 4 // m.SwIfIndex
470 func (m *MemifCreateReply) Marshal(b []byte) ([]byte, error) {
472 b = make([]byte, m.Size())
474 buf := codec.NewBuffer(b)
475 buf.EncodeInt32(m.Retval)
476 buf.EncodeUint32(uint32(m.SwIfIndex))
477 return buf.Bytes(), nil
479 func (m *MemifCreateReply) Unmarshal(b []byte) error {
480 buf := codec.NewBuffer(b)
481 m.Retval = buf.DecodeInt32()
482 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
486 // MemifDelete defines message 'memif_delete'.
487 type MemifDelete struct {
488 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
491 func (m *MemifDelete) Reset() { *m = MemifDelete{} }
492 func (*MemifDelete) GetMessageName() string { return "memif_delete" }
493 func (*MemifDelete) GetCrcString() string { return "f9e6675e" }
494 func (*MemifDelete) GetMessageType() api.MessageType {
495 return api.RequestMessage
498 func (m *MemifDelete) Size() (size int) {
502 size += 4 // m.SwIfIndex
505 func (m *MemifDelete) Marshal(b []byte) ([]byte, error) {
507 b = make([]byte, m.Size())
509 buf := codec.NewBuffer(b)
510 buf.EncodeUint32(uint32(m.SwIfIndex))
511 return buf.Bytes(), nil
513 func (m *MemifDelete) Unmarshal(b []byte) error {
514 buf := codec.NewBuffer(b)
515 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
519 // MemifDeleteReply defines message 'memif_delete_reply'.
520 type MemifDeleteReply struct {
521 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
524 func (m *MemifDeleteReply) Reset() { *m = MemifDeleteReply{} }
525 func (*MemifDeleteReply) GetMessageName() string { return "memif_delete_reply" }
526 func (*MemifDeleteReply) GetCrcString() string { return "e8d4e804" }
527 func (*MemifDeleteReply) GetMessageType() api.MessageType {
528 return api.ReplyMessage
531 func (m *MemifDeleteReply) Size() (size int) {
535 size += 4 // m.Retval
538 func (m *MemifDeleteReply) Marshal(b []byte) ([]byte, error) {
540 b = make([]byte, m.Size())
542 buf := codec.NewBuffer(b)
543 buf.EncodeInt32(m.Retval)
544 return buf.Bytes(), nil
546 func (m *MemifDeleteReply) Unmarshal(b []byte) error {
547 buf := codec.NewBuffer(b)
548 m.Retval = buf.DecodeInt32()
552 // MemifDetails defines message 'memif_details'.
553 type MemifDetails struct {
554 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
555 HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
556 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
557 Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
558 Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
559 ZeroCopy bool `binapi:"bool,name=zero_copy" json:"zero_copy,omitempty"`
560 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
561 RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
562 BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
563 Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
564 IfName string `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
567 func (m *MemifDetails) Reset() { *m = MemifDetails{} }
568 func (*MemifDetails) GetMessageName() string { return "memif_details" }
569 func (*MemifDetails) GetCrcString() string { return "d0382c4c" }
570 func (*MemifDetails) GetMessageType() api.MessageType {
571 return api.ReplyMessage
574 func (m *MemifDetails) Size() (size int) {
578 size += 4 // m.SwIfIndex
579 size += 1 * 6 // m.HwAddr
583 size += 1 // m.ZeroCopy
584 size += 4 // m.SocketID
585 size += 4 // m.RingSize
586 size += 2 // m.BufferSize
588 size += 64 // m.IfName
591 func (m *MemifDetails) Marshal(b []byte) ([]byte, error) {
593 b = make([]byte, m.Size())
595 buf := codec.NewBuffer(b)
596 buf.EncodeUint32(uint32(m.SwIfIndex))
597 buf.EncodeBytes(m.HwAddr[:], 6)
598 buf.EncodeUint32(m.ID)
599 buf.EncodeUint32(uint32(m.Role))
600 buf.EncodeUint32(uint32(m.Mode))
601 buf.EncodeBool(m.ZeroCopy)
602 buf.EncodeUint32(m.SocketID)
603 buf.EncodeUint32(m.RingSize)
604 buf.EncodeUint16(m.BufferSize)
605 buf.EncodeUint32(uint32(m.Flags))
606 buf.EncodeString(m.IfName, 64)
607 return buf.Bytes(), nil
609 func (m *MemifDetails) Unmarshal(b []byte) error {
610 buf := codec.NewBuffer(b)
611 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
612 copy(m.HwAddr[:], buf.DecodeBytes(6))
613 m.ID = buf.DecodeUint32()
614 m.Role = MemifRole(buf.DecodeUint32())
615 m.Mode = MemifMode(buf.DecodeUint32())
616 m.ZeroCopy = buf.DecodeBool()
617 m.SocketID = buf.DecodeUint32()
618 m.RingSize = buf.DecodeUint32()
619 m.BufferSize = buf.DecodeUint16()
620 m.Flags = IfStatusFlags(buf.DecodeUint32())
621 m.IfName = buf.DecodeString(64)
625 // MemifDump defines message 'memif_dump'.
626 type MemifDump struct{}
628 func (m *MemifDump) Reset() { *m = MemifDump{} }
629 func (*MemifDump) GetMessageName() string { return "memif_dump" }
630 func (*MemifDump) GetCrcString() string { return "51077d14" }
631 func (*MemifDump) GetMessageType() api.MessageType {
632 return api.RequestMessage
635 func (m *MemifDump) Size() (size int) {
641 func (m *MemifDump) Marshal(b []byte) ([]byte, error) {
643 b = make([]byte, m.Size())
645 buf := codec.NewBuffer(b)
646 return buf.Bytes(), nil
648 func (m *MemifDump) Unmarshal(b []byte) error {
652 // MemifSocketFilenameAddDel defines message 'memif_socket_filename_add_del'.
653 type MemifSocketFilenameAddDel struct {
654 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
655 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
656 SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
659 func (m *MemifSocketFilenameAddDel) Reset() { *m = MemifSocketFilenameAddDel{} }
660 func (*MemifSocketFilenameAddDel) GetMessageName() string { return "memif_socket_filename_add_del" }
661 func (*MemifSocketFilenameAddDel) GetCrcString() string { return "a2ce1a10" }
662 func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType {
663 return api.RequestMessage
666 func (m *MemifSocketFilenameAddDel) Size() (size int) {
671 size += 4 // m.SocketID
672 size += 108 // m.SocketFilename
675 func (m *MemifSocketFilenameAddDel) Marshal(b []byte) ([]byte, error) {
677 b = make([]byte, m.Size())
679 buf := codec.NewBuffer(b)
680 buf.EncodeBool(m.IsAdd)
681 buf.EncodeUint32(m.SocketID)
682 buf.EncodeString(m.SocketFilename, 108)
683 return buf.Bytes(), nil
685 func (m *MemifSocketFilenameAddDel) Unmarshal(b []byte) error {
686 buf := codec.NewBuffer(b)
687 m.IsAdd = buf.DecodeBool()
688 m.SocketID = buf.DecodeUint32()
689 m.SocketFilename = buf.DecodeString(108)
693 // MemifSocketFilenameAddDelReply defines message 'memif_socket_filename_add_del_reply'.
694 type MemifSocketFilenameAddDelReply struct {
695 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
698 func (m *MemifSocketFilenameAddDelReply) Reset() { *m = MemifSocketFilenameAddDelReply{} }
699 func (*MemifSocketFilenameAddDelReply) GetMessageName() string {
700 return "memif_socket_filename_add_del_reply"
702 func (*MemifSocketFilenameAddDelReply) GetCrcString() string { return "e8d4e804" }
703 func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType {
704 return api.ReplyMessage
707 func (m *MemifSocketFilenameAddDelReply) Size() (size int) {
711 size += 4 // m.Retval
714 func (m *MemifSocketFilenameAddDelReply) Marshal(b []byte) ([]byte, error) {
716 b = make([]byte, m.Size())
718 buf := codec.NewBuffer(b)
719 buf.EncodeInt32(m.Retval)
720 return buf.Bytes(), nil
722 func (m *MemifSocketFilenameAddDelReply) Unmarshal(b []byte) error {
723 buf := codec.NewBuffer(b)
724 m.Retval = buf.DecodeInt32()
728 // MemifSocketFilenameDetails defines message 'memif_socket_filename_details'.
729 type MemifSocketFilenameDetails struct {
730 SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
731 SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
734 func (m *MemifSocketFilenameDetails) Reset() { *m = MemifSocketFilenameDetails{} }
735 func (*MemifSocketFilenameDetails) GetMessageName() string { return "memif_socket_filename_details" }
736 func (*MemifSocketFilenameDetails) GetCrcString() string { return "7ff326f7" }
737 func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType {
738 return api.ReplyMessage
741 func (m *MemifSocketFilenameDetails) Size() (size int) {
745 size += 4 // m.SocketID
746 size += 108 // m.SocketFilename
749 func (m *MemifSocketFilenameDetails) Marshal(b []byte) ([]byte, error) {
751 b = make([]byte, m.Size())
753 buf := codec.NewBuffer(b)
754 buf.EncodeUint32(m.SocketID)
755 buf.EncodeString(m.SocketFilename, 108)
756 return buf.Bytes(), nil
758 func (m *MemifSocketFilenameDetails) Unmarshal(b []byte) error {
759 buf := codec.NewBuffer(b)
760 m.SocketID = buf.DecodeUint32()
761 m.SocketFilename = buf.DecodeString(108)
765 // MemifSocketFilenameDump defines message 'memif_socket_filename_dump'.
766 type MemifSocketFilenameDump struct{}
768 func (m *MemifSocketFilenameDump) Reset() { *m = MemifSocketFilenameDump{} }
769 func (*MemifSocketFilenameDump) GetMessageName() string { return "memif_socket_filename_dump" }
770 func (*MemifSocketFilenameDump) GetCrcString() string { return "51077d14" }
771 func (*MemifSocketFilenameDump) GetMessageType() api.MessageType {
772 return api.RequestMessage
775 func (m *MemifSocketFilenameDump) Size() (size int) {
781 func (m *MemifSocketFilenameDump) Marshal(b []byte) ([]byte, error) {
783 b = make([]byte, m.Size())
785 buf := codec.NewBuffer(b)
786 return buf.Bytes(), nil
788 func (m *MemifSocketFilenameDump) Unmarshal(b []byte) error {
792 func init() { file_memif_binapi_init() }
793 func file_memif_binapi_init() {
794 api.RegisterMessage((*MemifCreate)(nil), "memif_create_b1b25061")
795 api.RegisterMessage((*MemifCreateReply)(nil), "memif_create_reply_5383d31f")
796 api.RegisterMessage((*MemifDelete)(nil), "memif_delete_f9e6675e")
797 api.RegisterMessage((*MemifDeleteReply)(nil), "memif_delete_reply_e8d4e804")
798 api.RegisterMessage((*MemifDetails)(nil), "memif_details_d0382c4c")
799 api.RegisterMessage((*MemifDump)(nil), "memif_dump_51077d14")
800 api.RegisterMessage((*MemifSocketFilenameAddDel)(nil), "memif_socket_filename_add_del_a2ce1a10")
801 api.RegisterMessage((*MemifSocketFilenameAddDelReply)(nil), "memif_socket_filename_add_del_reply_e8d4e804")
802 api.RegisterMessage((*MemifSocketFilenameDetails)(nil), "memif_socket_filename_details_7ff326f7")
803 api.RegisterMessage((*MemifSocketFilenameDump)(nil), "memif_socket_filename_dump_51077d14")
806 // Messages returns list of all messages in this module.
807 func AllMessages() []api.Message {
808 return []api.Message{
810 (*MemifCreateReply)(nil),
812 (*MemifDeleteReply)(nil),
813 (*MemifDetails)(nil),
815 (*MemifSocketFilenameAddDel)(nil),
816 (*MemifSocketFilenameAddDelReply)(nil),
817 (*MemifSocketFilenameDetails)(nil),
818 (*MemifSocketFilenameDump)(nil),