memif

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package memif contains generated bindings for API file memif.api.

Contents:

 2 aliases
 8 enums
10 messages

Index

Constants

View Source
const (
	APIFile    = "memif"
	APIVersion = "3.0.0"
	VersionCrc = 0x88dc56c9
)

Variables

View Source
var (
	IfStatusFlags_name = map[uint32]string{
		1: "IF_STATUS_API_FLAG_ADMIN_UP",
		2: "IF_STATUS_API_FLAG_LINK_UP",
	}
	IfStatusFlags_value = map[string]uint32{
		"IF_STATUS_API_FLAG_ADMIN_UP": 1,
		"IF_STATUS_API_FLAG_LINK_UP":  2,
	}
)
View Source
var (
	IfType_name = map[uint32]string{
		1: "IF_API_TYPE_HARDWARE",
		2: "IF_API_TYPE_SUB",
		3: "IF_API_TYPE_P2P",
		4: "IF_API_TYPE_PIPE",
	}
	IfType_value = map[string]uint32{
		"IF_API_TYPE_HARDWARE": 1,
		"IF_API_TYPE_SUB":      2,
		"IF_API_TYPE_P2P":      3,
		"IF_API_TYPE_PIPE":     4,
	}
)
View Source
var (
	LinkDuplex_name = map[uint32]string{
		0: "LINK_DUPLEX_API_UNKNOWN",
		1: "LINK_DUPLEX_API_HALF",
		2: "LINK_DUPLEX_API_FULL",
	}
	LinkDuplex_value = map[string]uint32{
		"LINK_DUPLEX_API_UNKNOWN": 0,
		"LINK_DUPLEX_API_HALF":    1,
		"LINK_DUPLEX_API_FULL":    2,
	}
)
View Source
var (
	MemifMode_name = map[uint32]string{
		0: "MEMIF_MODE_API_ETHERNET",
		1: "MEMIF_MODE_API_IP",
		2: "MEMIF_MODE_API_PUNT_INJECT",
	}
	MemifMode_value = map[string]uint32{
		"MEMIF_MODE_API_ETHERNET":    0,
		"MEMIF_MODE_API_IP":          1,
		"MEMIF_MODE_API_PUNT_INJECT": 2,
	}
)
View Source
var (
	MemifRole_name = map[uint32]string{
		0: "MEMIF_ROLE_API_MASTER",
		1: "MEMIF_ROLE_API_SLAVE",
	}
	MemifRole_value = map[string]uint32{
		"MEMIF_ROLE_API_MASTER": 0,
		"MEMIF_ROLE_API_SLAVE":  1,
	}
)
View Source
var (
	MtuProto_name = map[uint32]string{
		1: "MTU_PROTO_API_L3",
		2: "MTU_PROTO_API_IP4",
		3: "MTU_PROTO_API_IP6",
		4: "MTU_PROTO_API_MPLS",
		5: "MTU_PROTO_API_N",
	}
	MtuProto_value = map[string]uint32{
		"MTU_PROTO_API_L3":   1,
		"MTU_PROTO_API_IP4":  2,
		"MTU_PROTO_API_IP6":  3,
		"MTU_PROTO_API_MPLS": 4,
		"MTU_PROTO_API_N":    5,
	}
)
View Source
var (
	RxMode_name = map[uint32]string{
		0: "RX_MODE_API_UNKNOWN",
		1: "RX_MODE_API_POLLING",
		2: "RX_MODE_API_INTERRUPT",
		3: "RX_MODE_API_ADAPTIVE",
		4: "RX_MODE_API_DEFAULT",
	}
	RxMode_value = map[string]uint32{
		"RX_MODE_API_UNKNOWN":   0,
		"RX_MODE_API_POLLING":   1,
		"RX_MODE_API_INTERRUPT": 2,
		"RX_MODE_API_ADAPTIVE":  3,
		"RX_MODE_API_DEFAULT":   4,
	}
)
View Source
var (
	SubIfFlags_name = map[uint32]string{
		1:   "SUB_IF_API_FLAG_NO_TAGS",
		2:   "SUB_IF_API_FLAG_ONE_TAG",
		4:   "SUB_IF_API_FLAG_TWO_TAGS",
		8:   "SUB_IF_API_FLAG_DOT1AD",
		16:  "SUB_IF_API_FLAG_EXACT_MATCH",
		32:  "SUB_IF_API_FLAG_DEFAULT",
		64:  "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
		128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
		254: "SUB_IF_API_FLAG_MASK_VNET",
		256: "SUB_IF_API_FLAG_DOT1AH",
	}
	SubIfFlags_value = map[string]uint32{
		"SUB_IF_API_FLAG_NO_TAGS":           1,
		"SUB_IF_API_FLAG_ONE_TAG":           2,
		"SUB_IF_API_FLAG_TWO_TAGS":          4,
		"SUB_IF_API_FLAG_DOT1AD":            8,
		"SUB_IF_API_FLAG_EXACT_MATCH":       16,
		"SUB_IF_API_FLAG_DEFAULT":           32,
		"SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
		"SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
		"SUB_IF_API_FLAG_MASK_VNET":         254,
		"SUB_IF_API_FLAG_DOT1AH":            256,
	}
)

Functions

func AllMessages

func AllMessages() []api.Message

Messages returns list of all messages in this module.

Types

type IfStatusFlags

type IfStatusFlags uint32

IfStatusFlags defines enum 'if_status_flags'.

const (
	IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
	IF_STATUS_API_FLAG_LINK_UP  IfStatusFlags = 2
)

func (IfStatusFlags) String

func (x IfStatusFlags) String() string

type IfType

type IfType uint32

IfType defines enum 'if_type'.

const (
	IF_API_TYPE_HARDWARE IfType = 1
	IF_API_TYPE_SUB      IfType = 2
	IF_API_TYPE_P2P      IfType = 3
	IF_API_TYPE_PIPE     IfType = 4
)

func (IfType) String

func (x IfType) String() string

type InterfaceIndex

type InterfaceIndex uint32

InterfaceIndex defines alias 'interface_index'.

type LinkDuplex

type LinkDuplex uint32

LinkDuplex defines enum 'link_duplex'.

const (
	LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
	LINK_DUPLEX_API_HALF    LinkDuplex = 1
	LINK_DUPLEX_API_FULL    LinkDuplex = 2
)

func (LinkDuplex) String

func (x LinkDuplex) String() string

type MacAddress

type MacAddress [6]uint8

MacAddress defines alias 'mac_address'.

func ParseMacAddress

func ParseMacAddress(s string) (MacAddress, error)

func (*MacAddress) MarshalText

func (x *MacAddress) MarshalText() ([]byte, error)

func (MacAddress) String

func (x MacAddress) String() string

func (MacAddress) ToMAC

func (x MacAddress) ToMAC() net.HardwareAddr

func (*MacAddress) UnmarshalText

func (x *MacAddress) UnmarshalText(text []byte) error

type MemifCreate

type MemifCreate struct {
	Role       MemifRole  `binapi:"memif_role,name=role" json:"role,omitempty"`
	Mode       MemifMode  `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
	RxQueues   uint8      `binapi:"u8,name=rx_queues" json:"rx_queues,omitempty"`
	TxQueues   uint8      `binapi:"u8,name=tx_queues" json:"tx_queues,omitempty"`
	ID         uint32     `binapi:"u32,name=id" json:"id,omitempty"`
	SocketID   uint32     `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
	RingSize   uint32     `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
	BufferSize uint16     `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
	NoZeroCopy bool       `binapi:"bool,name=no_zero_copy" json:"no_zero_copy,omitempty"`
	HwAddr     MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
	Secret     string     `binapi:"string[24],name=secret" json:"secret,omitempty"`
}

MemifCreate defines message 'memif_create'.

func (*MemifCreate) GetCrcString

func (*MemifCreate) GetCrcString() string

func (*MemifCreate) GetMessageName

func (*MemifCreate) GetMessageName() string

func (*MemifCreate) GetMessageType

func (*MemifCreate) GetMessageType() api.MessageType

func (*MemifCreate) Marshal

func (m *MemifCreate) Marshal(b []byte) ([]byte, error)

func (*MemifCreate) Reset

func (m *MemifCreate) Reset()

func (*MemifCreate) Size

func (m *MemifCreate) Size() (size int)

func (*MemifCreate) Unmarshal

func (m *MemifCreate) Unmarshal(b []byte) error

type MemifCreateReply

type MemifCreateReply struct {
	Retval    int32          `binapi:"i32,name=retval" json:"retval,omitempty"`
	SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}

MemifCreateReply defines message 'memif_create_reply'.

func (*MemifCreateReply) GetCrcString

func (*MemifCreateReply) GetCrcString() string

func (*MemifCreateReply) GetMessageName

func (*MemifCreateReply) GetMessageName() string

func (*MemifCreateReply) GetMessageType

func (*MemifCreateReply) GetMessageType() api.MessageType

func (*MemifCreateReply) Marshal

func (m *MemifCreateReply) Marshal(b []byte) ([]byte, error)

func (*MemifCreateReply) Reset

func (m *MemifCreateReply) Reset()

func (*MemifCreateReply) Size

func (m *MemifCreateReply) Size() (size int)

func (*MemifCreateReply) Unmarshal

func (m *MemifCreateReply) Unmarshal(b []byte) error

type MemifDelete

type MemifDelete struct {
	SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}

MemifDelete defines message 'memif_delete'.

func (*MemifDelete) GetCrcString

func (*MemifDelete) GetCrcString() string

func (*MemifDelete) GetMessageName

func (*MemifDelete) GetMessageName() string

func (*MemifDelete) GetMessageType

func (*MemifDelete) GetMessageType() api.MessageType

func (*MemifDelete) Marshal

func (m *MemifDelete) Marshal(b []byte) ([]byte, error)

func (*MemifDelete) Reset

func (m *MemifDelete) Reset()

func (*MemifDelete) Size

func (m *MemifDelete) Size() (size int)

func (*MemifDelete) Unmarshal

func (m *MemifDelete) Unmarshal(b []byte) error

type MemifDeleteReply

type MemifDeleteReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

MemifDeleteReply defines message 'memif_delete_reply'.

func (*MemifDeleteReply) GetCrcString

func (*MemifDeleteReply) GetCrcString() string

func (*MemifDeleteReply) GetMessageName

func (*MemifDeleteReply) GetMessageName() string

func (*MemifDeleteReply) GetMessageType

func (*MemifDeleteReply) GetMessageType() api.MessageType

func (*MemifDeleteReply) Marshal

func (m *MemifDeleteReply) Marshal(b []byte) ([]byte, error)

func (*MemifDeleteReply) Reset

func (m *MemifDeleteReply) Reset()

func (*MemifDeleteReply) Size

func (m *MemifDeleteReply) Size() (size int)

func (*MemifDeleteReply) Unmarshal

func (m *MemifDeleteReply) Unmarshal(b []byte) error

type MemifDetails

type MemifDetails struct {
	SwIfIndex  InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
	HwAddr     MacAddress     `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
	ID         uint32         `binapi:"u32,name=id" json:"id,omitempty"`
	Role       MemifRole      `binapi:"memif_role,name=role" json:"role,omitempty"`
	Mode       MemifMode      `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
	ZeroCopy   bool           `binapi:"bool,name=zero_copy" json:"zero_copy,omitempty"`
	SocketID   uint32         `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
	RingSize   uint32         `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
	BufferSize uint16         `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
	Flags      IfStatusFlags  `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
	IfName     string         `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
}

MemifDetails defines message 'memif_details'.

func (*MemifDetails) GetCrcString

func (*MemifDetails) GetCrcString() string

func (*MemifDetails) GetMessageName

func (*MemifDetails) GetMessageName() string

func (*MemifDetails) GetMessageType

func (*MemifDetails) GetMessageType() api.MessageType

func (*MemifDetails) Marshal

func (m *MemifDetails) Marshal(b []byte) ([]byte, error)

func (*MemifDetails) Reset

func (m *MemifDetails) Reset()

func (*MemifDetails) Size

func (m *MemifDetails) Size() (size int)

func (*MemifDetails) Unmarshal

func (m *MemifDetails) Unmarshal(b []byte) error

type MemifDump

type MemifDump struct{}

MemifDump defines message 'memif_dump'.

func (*MemifDump) GetCrcString

func (*MemifDump) GetCrcString() string

func (*MemifDump) GetMessageName

func (*MemifDump) GetMessageName() string

func (*MemifDump) GetMessageType

func (*MemifDump) GetMessageType() api.MessageType

func (*MemifDump) Marshal

func (m *MemifDump) Marshal(b []byte) ([]byte, error)

func (*MemifDump) Reset

func (m *MemifDump) Reset()

func (*MemifDump) Size

func (m *MemifDump) Size() (size int)

func (*MemifDump) Unmarshal

func (m *MemifDump) Unmarshal(b []byte) error

type MemifMode

type MemifMode uint32

MemifMode defines enum 'memif_mode'.

const (
	MEMIF_MODE_API_ETHERNET    MemifMode = 0
	MEMIF_MODE_API_IP          MemifMode = 1
	MEMIF_MODE_API_PUNT_INJECT MemifMode = 2
)

func (MemifMode) String

func (x MemifMode) String() string

type MemifRole

type MemifRole uint32

MemifRole defines enum 'memif_role'.

const (
	MEMIF_ROLE_API_MASTER MemifRole = 0
	MEMIF_ROLE_API_SLAVE  MemifRole = 1
)

func (MemifRole) String

func (x MemifRole) String() string

type MemifSocketFilenameAddDel

type MemifSocketFilenameAddDel struct {
	IsAdd          bool   `binapi:"bool,name=is_add" json:"is_add,omitempty"`
	SocketID       uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
	SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
}

MemifSocketFilenameAddDel defines message 'memif_socket_filename_add_del'.

func (*MemifSocketFilenameAddDel) GetCrcString

func (*MemifSocketFilenameAddDel) GetCrcString() string

func (*MemifSocketFilenameAddDel) GetMessageName

func (*MemifSocketFilenameAddDel) GetMessageName() string

func (*MemifSocketFilenameAddDel) GetMessageType

func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType

func (*MemifSocketFilenameAddDel) Marshal

func (m *MemifSocketFilenameAddDel) Marshal(b []byte) ([]byte, error)

func (*MemifSocketFilenameAddDel) Reset

func (m *MemifSocketFilenameAddDel) Reset()

func (*MemifSocketFilenameAddDel) Size

func (m *MemifSocketFilenameAddDel) Size() (size int)

func (*MemifSocketFilenameAddDel) Unmarshal

func (m *MemifSocketFilenameAddDel) Unmarshal(b []byte) error

type MemifSocketFilenameAddDelReply

type MemifSocketFilenameAddDelReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

MemifSocketFilenameAddDelReply defines message 'memif_socket_filename_add_del_reply'.

func (*MemifSocketFilenameAddDelReply) GetCrcString

func (*MemifSocketFilenameAddDelReply) GetCrcString() string

func (*MemifSocketFilenameAddDelReply) GetMessageName

func (*MemifSocketFilenameAddDelReply) GetMessageName() string

func (*MemifSocketFilenameAddDelReply) GetMessageType

func (*MemifSocketFilenameAddDelReply) Marshal

func (m *MemifSocketFilenameAddDelReply) Marshal(b []byte) ([]byte, error)

func (*MemifSocketFilenameAddDelReply) Reset

func (m *MemifSocketFilenameAddDelReply) Reset()

func (*MemifSocketFilenameAddDelReply) Size

func (m *MemifSocketFilenameAddDelReply) Size() (size int)

func (*MemifSocketFilenameAddDelReply) Unmarshal

func (m *MemifSocketFilenameAddDelReply) Unmarshal(b []byte) error

type MemifSocketFilenameDetails

type MemifSocketFilenameDetails struct {
	SocketID       uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
	SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
}

MemifSocketFilenameDetails defines message 'memif_socket_filename_details'.

func (*MemifSocketFilenameDetails) GetCrcString

func (*MemifSocketFilenameDetails) GetCrcString() string

func (*MemifSocketFilenameDetails) GetMessageName

func (*MemifSocketFilenameDetails) GetMessageName() string

func (*MemifSocketFilenameDetails) GetMessageType

func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType

func (*MemifSocketFilenameDetails) Marshal

func (m *MemifSocketFilenameDetails) Marshal(b []byte) ([]byte, error)

func (*MemifSocketFilenameDetails) Reset

func (m *MemifSocketFilenameDetails) Reset()

func (*MemifSocketFilenameDetails) Size

func (m *MemifSocketFilenameDetails) Size() (size int)

func (*MemifSocketFilenameDetails) Unmarshal

func (m *MemifSocketFilenameDetails) Unmarshal(b []byte) error

type MemifSocketFilenameDump

type MemifSocketFilenameDump struct{}

MemifSocketFilenameDump defines message 'memif_socket_filename_dump'.

func (*MemifSocketFilenameDump) GetCrcString

func (*MemifSocketFilenameDump) GetCrcString() string

func (*MemifSocketFilenameDump) GetMessageName

func (*MemifSocketFilenameDump) GetMessageName() string

func (*MemifSocketFilenameDump) GetMessageType

func (*MemifSocketFilenameDump) GetMessageType() api.MessageType

func (*MemifSocketFilenameDump) Marshal

func (m *MemifSocketFilenameDump) Marshal(b []byte) ([]byte, error)

func (*MemifSocketFilenameDump) Reset

func (m *MemifSocketFilenameDump) Reset()

func (*MemifSocketFilenameDump) Size

func (m *MemifSocketFilenameDump) Size() (size int)

func (*MemifSocketFilenameDump) Unmarshal

func (m *MemifSocketFilenameDump) Unmarshal(b []byte) error

type MtuProto

type MtuProto uint32

MtuProto defines enum 'mtu_proto'.

const (
	MTU_PROTO_API_L3   MtuProto = 1
	MTU_PROTO_API_IP4  MtuProto = 2
	MTU_PROTO_API_IP6  MtuProto = 3
	MTU_PROTO_API_MPLS MtuProto = 4
	MTU_PROTO_API_N    MtuProto = 5
)

func (MtuProto) String

func (x MtuProto) String() string

type RPCService

type RPCService interface {
	MemifCreate(ctx context.Context, in *MemifCreate) (*MemifCreateReply, error)
	MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error)
	MemifDump(ctx context.Context, in *MemifDump) (RPCService_MemifDumpClient, error)
	MemifSocketFilenameAddDel(ctx context.Context, in *MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error)
	MemifSocketFilenameDump(ctx context.Context, in *MemifSocketFilenameDump) (RPCService_MemifSocketFilenameDumpClient, error)
}

RPCService defines RPC service memif.

func NewServiceClient

func NewServiceClient(conn api.Connection) RPCService

type RPCService_MemifDumpClient

type RPCService_MemifDumpClient interface {
	Recv() (*MemifDetails, error)
	api.Stream
}

type RPCService_MemifSocketFilenameDumpClient

type RPCService_MemifSocketFilenameDumpClient interface {
	Recv() (*MemifSocketFilenameDetails, error)
	api.Stream
}

type RxMode

type RxMode uint32

RxMode defines enum 'rx_mode'.

const (
	RX_MODE_API_UNKNOWN   RxMode = 0
	RX_MODE_API_POLLING   RxMode = 1
	RX_MODE_API_INTERRUPT RxMode = 2
	RX_MODE_API_ADAPTIVE  RxMode = 3
	RX_MODE_API_DEFAULT   RxMode = 4
)

func (RxMode) String

func (x RxMode) String() string

type SubIfFlags

type SubIfFlags uint32

SubIfFlags defines enum 'sub_if_flags'.

const (
	SUB_IF_API_FLAG_NO_TAGS           SubIfFlags = 1
	SUB_IF_API_FLAG_ONE_TAG           SubIfFlags = 2
	SUB_IF_API_FLAG_TWO_TAGS          SubIfFlags = 4
	SUB_IF_API_FLAG_DOT1AD            SubIfFlags = 8
	SUB_IF_API_FLAG_EXACT_MATCH       SubIfFlags = 16
	SUB_IF_API_FLAG_DEFAULT           SubIfFlags = 32
	SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
	SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
	SUB_IF_API_FLAG_MASK_VNET         SubIfFlags = 254
	SUB_IF_API_FLAG_DOT1AH            SubIfFlags = 256
)

func (SubIfFlags) String

func (x SubIfFlags) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL