Documentation ¶
Overview ¶
Package ethernet provides an implementation of an ethernet link endpoint that wraps an inner link endpoint.
Index ¶
- type Endpoint
- func (e *Endpoint) ARPHardwareType() header.ARPHardwareType
- func (*Endpoint) AddHeader(pkt stack.PacketBufferPtr)
- func (e *Endpoint) Capabilities() stack.LinkEndpointCapabilities
- func (e *Endpoint) DeliverNetworkPacket(_ tcpip.NetworkProtocolNumber, pkt stack.PacketBufferPtr)
- func (e *Endpoint) LinkAddress() tcpip.LinkAddress
- func (e *Endpoint) MTU() uint32
- func (e *Endpoint) MaxHeaderLength() uint16
- func (*Endpoint) ParseHeader(pkt stack.PacketBufferPtr) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
Endpoint is an ethernet endpoint.
It adds an ethernet header to packets before sending them out through its inner link endpoint and consumes an ethernet header before sending the packet to the stack.
func New ¶
func New(ep stack.LinkEndpoint) *Endpoint
New returns an ethernet link endpoint that wraps an inner link endpoint.
func (*Endpoint) ARPHardwareType ¶
func (e *Endpoint) ARPHardwareType() header.ARPHardwareType
ARPHardwareType implements stack.LinkEndpoint.
func (*Endpoint) AddHeader ¶
func (*Endpoint) AddHeader(pkt stack.PacketBufferPtr)
AddHeader implements stack.LinkEndpoint.
func (*Endpoint) Capabilities ¶
func (e *Endpoint) Capabilities() stack.LinkEndpointCapabilities
Capabilities implements stack.LinkEndpoint.
func (*Endpoint) DeliverNetworkPacket ¶
func (e *Endpoint) DeliverNetworkPacket(_ tcpip.NetworkProtocolNumber, pkt stack.PacketBufferPtr)
DeliverNetworkPacket implements stack.NetworkDispatcher.
func (*Endpoint) LinkAddress ¶
func (e *Endpoint) LinkAddress() tcpip.LinkAddress
LinkAddress implements stack.LinkEndpoint.
func (*Endpoint) MaxHeaderLength ¶
MaxHeaderLength implements stack.LinkEndpoint.
func (*Endpoint) ParseHeader ¶
func (*Endpoint) ParseHeader(pkt stack.PacketBufferPtr) bool
ParseHeader implements stack.LinkEndpoint.