xdptool

package
v0.0.0-...-793eddf Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(prog *ebpf.Program, device string) error

func Detach

func Detach(device string) error

func LoadElf

func LoadElf(filepath string) (*ebpf.Collection, error)

func XskAttach

func XskAttach(devices []string, queueIDs []int, prog *xdp.Program, options *xdp.SocketOptions) (map[string][]*AfXdpL4Socket, error)

device 1 - N NICQueueの組で Socketを作る

func XskDetach

func XskDetach(xskmap map[string][]*AfXdpL4Socket, queueIDs []int, prog *xdp.Program) error

Types

type AfXdpL4Handler

type AfXdpL4Handler struct {
	AfxdpProg *xdp.Program
	// xskmap    map[string][]*xdp.Socket
	Xskmap map[string][]*AfXdpL4Socket
	// contains filtered or unexported fields
}

func NewAfXdpL4Handler

func NewAfXdpL4Handler(options AfXdpL4HandlerOptions) (*AfXdpL4Handler, error)

func (*AfXdpL4Handler) Close

func (a *AfXdpL4Handler) Close() error

func (*AfXdpL4Handler) Invoke

func (a *AfXdpL4Handler) Invoke(ctx context.Context) (chan []byte, chan []byte)

type AfXdpL4HandlerOptions

type AfXdpL4HandlerOptions struct {
	Port           uint32
	Devices        []string
	QueueIDs       []int
	ProgramOptions *ebpf.CollectionOptions
	SocketOptions  *xdp.SocketOptions
}

type AfXdpL4Socket

type AfXdpL4Socket struct {
	// contains filtered or unexported fields
}

type AfXdpL4Worker

type AfXdpL4Worker func(chan []byte)

Jump to

Keyboard shortcuts

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