Versions in this module Expand all Collapse all v1 v1.1.0 Oct 9, 2024 v1.0.0 Sep 30, 2024 Changes in this version + var DefaultSocketFlags uint16 + var DefaultSocketOptions = SocketOptions + var DefaultXdpFlags uint32 + type Desc unix.XDPDesc + type Program struct + Program *ebpf.Program + Queues *ebpf.Map + Sockets *ebpf.Map + func LoadProgram(fname, funcname, qidmapname, xskmapname string) (*Program, error) + func NewProgram(maxQueueEntries int) (*Program, error) + func (p *Program) Attach(Ifindex int) error + func (p *Program) Close() error + func (p *Program) Detach(Ifindex int) error + func (p *Program) Register(queueID int, fd int) error + func (p *Program) Unregister(queueID int) error + type Socket struct + func NewSocket(Ifindex int, QueueID int, options *SocketOptions) (xsk *Socket, err error) + func (xsk *Socket) Close() error + func (xsk *Socket) Complete(n int) + func (xsk *Socket) FD() int + func (xsk *Socket) Fill(descs []Desc) int + func (xsk *Socket) GetDescs(n int, rx bool) []Desc + func (xsk *Socket) GetFrame(d Desc) []byte + func (xsk *Socket) NumCompleted() int + func (xsk *Socket) NumFilled() int + func (xsk *Socket) NumFreeFillSlots() int + func (xsk *Socket) NumFreeTxSlots() int + func (xsk *Socket) NumReceived() int + func (xsk *Socket) NumTransmitted() int + func (xsk *Socket) Poll(timeout int) (numReceived int, numCompleted int, err error) + func (xsk *Socket) Receive(num int) []Desc + func (xsk *Socket) Stats() (Stats, error) + func (xsk *Socket) Transmit(descs []Desc) (numSubmitted int) + type SocketOptions struct + CompletionRingNumDescs int + FillRingNumDescs int + FrameSize int + NumFrames int + RxRingNumDescs int + TxRingNumDescs int + type Stats struct + Completed uint64 + Filled uint64 + KernelStats unix.XDPStatistics + Received uint64 + Transmitted uint64