Documentation ¶
Index ¶
- type Buffer
- type Client
- func (*Client) ARPHardwareType() header.ARPHardwareType
- func (*Client) AddHeader(_, _ tcpip.LinkAddress, _ tcpip.NetworkProtocolNumber, _ *stack.PacketBuffer)
- func (c *Client) Attach(dispatcher stack.NetworkDispatcher)
- func (*Client) Capabilities() stack.LinkEndpointCapabilities
- func (c *Client) Close() error
- func (c *Client) DeviceClass() network.DeviceClass
- func (c *Client) Down() error
- func (c *Client) Filepath() string
- func (*Client) GSOMaxSize() uint32
- func (c *Client) IsAttached() bool
- func (c *Client) LinkAddress() tcpip.LinkAddress
- func (c *Client) ListenTX() error
- func (c *Client) MTU() uint32
- func (c *Client) MaxHeaderLength() uint16
- func (c *Client) RxStats() *fifo.RxStats
- func (c *Client) SetOnLinkClosed(f func())
- func (c *Client) SetOnLinkOnlineChanged(f func(bool))
- func (c *Client) SetPromiscuousMode(enabled bool) error
- func (*Client) SupportedGSO() stack.SupportedGSO
- func (c *Client) Topopath() string
- func (c *Client) TxStats() *fifo.TxStats
- func (c *Client) Up() error
- func (c *Client) Wait()
- func (c *Client) WritePacket(_ stack.RouteInfo, _ tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) tcpip.Error
- func (c *Client) WritePackets(_ stack.RouteInfo, pkts stack.PacketBufferList, _ tcpip.NetworkProtocolNumber) (int, tcpip.Error)
- func (c *Client) WriteRawPacket(pkt *stack.PacketBuffer) tcpip.Error
- type IOBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer []byte
Buffer is a segment of memory backed by a mapped VMO.
A Buffer must not outlive its VMO's mapping. A Buffer's head must not change (by slicing or appending).
type Client ¶
Client is an ethernet client.
It connects to a zircon ethernet driver using a FIFO-based protocol. The protocol is described in system/fidl/fuchsia-hardware-ethernet/ethernet.fidl.
func NewClient ¶
func NewClient(clientName string, topopath, filepath string, device ethernet.DeviceWithCtx) (*Client, error)
NewClient creates a new ethernet Client.
func (*Client) ARPHardwareType ¶
func (*Client) ARPHardwareType() header.ARPHardwareType
ARPHardwareType implements stack.LinkEndpoint.
func (*Client) AddHeader ¶
func (*Client) AddHeader(_, _ tcpip.LinkAddress, _ tcpip.NetworkProtocolNumber, _ *stack.PacketBuffer)
AddHeader implements stack.LinkEndpoint.
func (*Client) Attach ¶
func (c *Client) Attach(dispatcher stack.NetworkDispatcher)
func (*Client) Capabilities ¶
func (*Client) Capabilities() stack.LinkEndpointCapabilities
func (*Client) DeviceClass ¶
func (c *Client) DeviceClass() network.DeviceClass
func (*Client) GSOMaxSize ¶
GSOMaxSize implements stack.GSOEndpoint.
func (*Client) IsAttached ¶
func (*Client) LinkAddress ¶
func (c *Client) LinkAddress() tcpip.LinkAddress
func (*Client) ListenTX ¶
ListenTX tells the ethernet driver to reflect all transmitted packets back to this ethernet client.
func (*Client) MaxHeaderLength ¶
func (*Client) SetOnLinkClosed ¶
func (c *Client) SetOnLinkClosed(f func())
func (*Client) SetOnLinkOnlineChanged ¶
func (*Client) SetPromiscuousMode ¶
func (*Client) SupportedGSO ¶
func (*Client) SupportedGSO() stack.SupportedGSO
SupportedGSO implements stack.GSOEndpoint.
func (*Client) Wait ¶
func (c *Client) Wait()
Wait implements stack.LinkEndpoint. It blocks until an error in the dispatch goroutine(s) spawned in Attach occurs.
func (*Client) WritePacket ¶
func (c *Client) WritePacket(_ stack.RouteInfo, _ tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) tcpip.Error
func (*Client) WritePackets ¶
func (c *Client) WritePackets(_ stack.RouteInfo, pkts stack.PacketBufferList, _ tcpip.NetworkProtocolNumber) (int, tcpip.Error)
func (*Client) WriteRawPacket ¶
func (c *Client) WriteRawPacket(pkt *stack.PacketBuffer) tcpip.Error