af_xdp

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: 5 Imported by: 0

Documentation

Overview

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

Contents:

2 enums
4 messages

Index

Constants

View Source
const (
	APIFile    = "af_xdp"
	APIVersion = "0.2.0"
	VersionCrc = 0x31450826
)

Variables

View Source
var (
	AfXdpMode_name = map[uint32]string{
		0: "AF_XDP_API_MODE_AUTO",
		1: "AF_XDP_API_MODE_COPY",
		2: "AF_XDP_API_MODE_ZERO_COPY",
	}
	AfXdpMode_value = map[string]uint32{
		"AF_XDP_API_MODE_AUTO":      0,
		"AF_XDP_API_MODE_COPY":      1,
		"AF_XDP_API_MODE_ZERO_COPY": 2,
	}
)
View Source
var (
	AfXdpFlag_name = map[uint8]string{
		1: "AF_XDP_API_FLAGS_NO_SYSCALL_LOCK",
	}
	AfXdpFlag_value = map[string]uint8{
		"AF_XDP_API_FLAGS_NO_SYSCALL_LOCK": 1,
	}
)

Functions

func AllMessages

func AllMessages() []api.Message

Messages returns list of all messages in this module.

Types

type AfXdpCreate

type AfXdpCreate struct {
	HostIf  string    `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
	Name    string    `binapi:"string[64],name=name" json:"name,omitempty"`
	RxqNum  uint16    `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"`
	RxqSize uint16    `binapi:"u16,name=rxq_size,default=0" json:"rxq_size,omitempty"`
	TxqSize uint16    `binapi:"u16,name=txq_size,default=0" json:"txq_size,omitempty"`
	Mode    AfXdpMode `binapi:"af_xdp_mode,name=mode,default=0" json:"mode,omitempty"`
	Flags   AfXdpFlag `binapi:"af_xdp_flag,name=flags,default=0" json:"flags,omitempty"`
	Prog    string    `binapi:"string[256],name=prog" json:"prog,omitempty"`
}

AfXdpCreate defines message 'af_xdp_create'. InProgress: the message form may change in the future versions

func (*AfXdpCreate) GetCrcString

func (*AfXdpCreate) GetCrcString() string

func (*AfXdpCreate) GetMessageName

func (*AfXdpCreate) GetMessageName() string

func (*AfXdpCreate) GetMessageType

func (*AfXdpCreate) GetMessageType() api.MessageType

func (*AfXdpCreate) Marshal

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

func (*AfXdpCreate) Reset

func (m *AfXdpCreate) Reset()

func (*AfXdpCreate) Size

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

func (*AfXdpCreate) Unmarshal

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

type AfXdpCreateReply

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

AfXdpCreateReply defines message 'af_xdp_create_reply'. InProgress: the message form may change in the future versions

func (*AfXdpCreateReply) GetCrcString

func (*AfXdpCreateReply) GetCrcString() string

func (*AfXdpCreateReply) GetMessageName

func (*AfXdpCreateReply) GetMessageName() string

func (*AfXdpCreateReply) GetMessageType

func (*AfXdpCreateReply) GetMessageType() api.MessageType

func (*AfXdpCreateReply) Marshal

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

func (*AfXdpCreateReply) Reset

func (m *AfXdpCreateReply) Reset()

func (*AfXdpCreateReply) Size

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

func (*AfXdpCreateReply) Unmarshal

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

type AfXdpDelete

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

AfXdpDelete defines message 'af_xdp_delete'. InProgress: the message form may change in the future versions

func (*AfXdpDelete) GetCrcString

func (*AfXdpDelete) GetCrcString() string

func (*AfXdpDelete) GetMessageName

func (*AfXdpDelete) GetMessageName() string

func (*AfXdpDelete) GetMessageType

func (*AfXdpDelete) GetMessageType() api.MessageType

func (*AfXdpDelete) Marshal

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

func (*AfXdpDelete) Reset

func (m *AfXdpDelete) Reset()

func (*AfXdpDelete) Size

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

func (*AfXdpDelete) Unmarshal

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

type AfXdpDeleteReply

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

AfXdpDeleteReply defines message 'af_xdp_delete_reply'. InProgress: the message form may change in the future versions

func (*AfXdpDeleteReply) GetCrcString

func (*AfXdpDeleteReply) GetCrcString() string

func (*AfXdpDeleteReply) GetMessageName

func (*AfXdpDeleteReply) GetMessageName() string

func (*AfXdpDeleteReply) GetMessageType

func (*AfXdpDeleteReply) GetMessageType() api.MessageType

func (*AfXdpDeleteReply) Marshal

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

func (*AfXdpDeleteReply) Reset

func (m *AfXdpDeleteReply) Reset()

func (*AfXdpDeleteReply) Size

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

func (*AfXdpDeleteReply) Unmarshal

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

type AfXdpFlag

type AfXdpFlag uint8

AfXdpFlag defines enum 'af_xdp_flag'.

const (
	AF_XDP_API_FLAGS_NO_SYSCALL_LOCK AfXdpFlag = 1
)

func (AfXdpFlag) String

func (x AfXdpFlag) String() string

type AfXdpMode

type AfXdpMode uint32

AfXdpMode defines enum 'af_xdp_mode'.

const (
	AF_XDP_API_MODE_AUTO      AfXdpMode = 0
	AF_XDP_API_MODE_COPY      AfXdpMode = 1
	AF_XDP_API_MODE_ZERO_COPY AfXdpMode = 2
)

func (AfXdpMode) String

func (x AfXdpMode) String() string

type RPCService

type RPCService interface {
	AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXdpCreateReply, error)
	AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error)
}

RPCService defines RPC service af_xdp.

func NewServiceClient

func NewServiceClient(conn api.Connection) RPCService

Jump to

Keyboard shortcuts

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