package packet

import "gvisor.dev/gvisor/pkg/tcpip/transport/packet"

Package packet provides the implementation of packet sockets (see packet(7)). Packet sockets allow applications to:

Packet sockets are similar to raw sockets, but provide even more power to users, letting them effectively talk directly to the network device.

Packet sockets skip the input and output iptables chains.

Index

Functions

func NewEndpoint

func NewEndpoint(s *stack.Stack, cooked bool, netProto tcpip.NetworkProtocolNumber, waiterQueue *waiter.Queue) tcpip.Endpoint

NewEndpoint returns a new packet endpoint.

Source Files

endpoint.go endpoint_state.go

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

Tools for package owners.