gvisorgvisor.dev/gvisor/pkg/tcpip/link/packetsocket Index | Files

package packetsocket

import "gvisor.dev/gvisor/pkg/tcpip/link/packetsocket"

Package packetsocket provides a link endpoint that enables delivery of incoming and outgoing packets to any interested packet sockets.

Index

Functions

func New

New creates a new packetsocket link endpoint wrapping a lower link endpoint.

On ingress, the lower link endpoint must only deliver packets that have a link-layer header set if one is required for the link.

Types

type Endpoint

type Endpoint struct {
	nested.Endpoint
}

Endpoint is a link endpoint that enables delivery of incoming and outgoing packets to any interested packet sockets.

+stateify savable

func (*Endpoint) DeliverNetworkPacket

func (e *Endpoint) DeliverNetworkPacket(protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer)

DeliverNetworkPacket implements stack.NetworkDispatcher.

func (*Endpoint) WritePackets

func (e *Endpoint) WritePackets(pkts stack.PacketBufferList) (int, tcpip.Error)

WritePackets implements stack.LinkEndpoint.

Source Files

packetsocket.go

Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
4 hours ago

Tools for package owners.