Documentation ¶
Overview ¶
Package ethernet provides an implementation of an ethernet link endpoint that wraps an inner link endpoint.
Index ¶
- type Endpoint
- func (*Endpoint) ARPHardwareType() header.ARPHardwareType
- func (*Endpoint) AddHeader(local, remote tcpip.LinkAddress, proto tcpip.NetworkProtocolNumber, ...)
- func (e *Endpoint) Capabilities() stack.LinkEndpointCapabilities
- func (e *Endpoint) DeliverNetworkPacket(_, _ tcpip.LinkAddress, _ tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer)
- func (e *Endpoint) MaxHeaderLength() uint16
- func (e *Endpoint) WritePacket(r stack.RouteInfo, proto tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) tcpip.Error
- func (e *Endpoint) WritePackets(r stack.RouteInfo, pkts stack.PacketBufferList, ...) (int, tcpip.Error)
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 (*Endpoint) ARPHardwareType() header.ARPHardwareType
ARPHardwareType implements stack.LinkEndpoint.
func (*Endpoint) AddHeader ¶
func (*Endpoint) AddHeader(local, remote tcpip.LinkAddress, proto tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer)
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.LinkAddress, _ tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer)
DeliverNetworkPacket implements stack.NetworkDispatcher.
func (*Endpoint) MaxHeaderLength ¶
MaxHeaderLength implements stack.LinkEndpoint.
func (*Endpoint) WritePacket ¶
func (e *Endpoint) WritePacket(r stack.RouteInfo, proto tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) tcpip.Error
WritePacket implements stack.LinkEndpoint.
func (*Endpoint) WritePackets ¶
func (e *Endpoint) WritePackets(r stack.RouteInfo, pkts stack.PacketBufferList, proto tcpip.NetworkProtocolNumber) (int, tcpip.Error)
WritePackets implements stack.LinkEndpoint.