packetsocket

package
v0.0.0-...-3e0b53d Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: Apache-2.0, MIT Imports: 3 Imported by: 6

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Jump to

Keyboard shortcuts

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