eth

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

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

type Client struct {
	Info ethernet.Info
	// contains filtered or unexported fields
}

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

AddHeader implements stack.LinkEndpoint.

func (*Client) Attach

func (c *Client) Attach(dispatcher stack.NetworkDispatcher)

func (*Client) Capabilities

func (*Client) Capabilities() stack.LinkEndpointCapabilities

func (*Client) Close

func (c *Client) Close() error

Close closes a Client, releasing any held resources.

func (*Client) DeviceClass

func (c *Client) DeviceClass() network.DeviceClass

func (*Client) Down

func (c *Client) Down() error

Down disables the interface.

func (*Client) Filepath

func (c *Client) Filepath() string

func (*Client) GSOMaxSize

func (*Client) GSOMaxSize() uint32

GSOMaxSize implements stack.GSOEndpoint.

func (*Client) IsAttached

func (c *Client) IsAttached() bool

func (*Client) LinkAddress

func (c *Client) LinkAddress() tcpip.LinkAddress

func (*Client) ListenTX

func (c *Client) ListenTX() error

ListenTX tells the ethernet driver to reflect all transmitted packets back to this ethernet client.

func (*Client) MTU

func (c *Client) MTU() uint32

func (*Client) MaxHeaderLength

func (c *Client) MaxHeaderLength() uint16

func (*Client) RxStats

func (c *Client) RxStats() *fifo.RxStats

func (*Client) SetOnLinkClosed

func (c *Client) SetOnLinkClosed(f func())

func (*Client) SetOnLinkOnlineChanged

func (c *Client) SetOnLinkOnlineChanged(f func(bool))

func (*Client) SetPromiscuousMode

func (c *Client) SetPromiscuousMode(enabled bool) error

func (*Client) SupportedGSO

func (*Client) SupportedGSO() stack.SupportedGSO

SupportedGSO implements stack.GSOEndpoint.

func (*Client) Topopath

func (c *Client) Topopath() string

func (*Client) TxStats

func (c *Client) TxStats() *fifo.TxStats

func (*Client) Up

func (c *Client) Up() error

Up enables the interface.

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 (*Client) WritePackets

func (*Client) WriteRawPacket

func (c *Client) WriteRawPacket(pkt *stack.PacketBuffer) tcpip.Error

type IOBuffer

type IOBuffer struct {
	fifo.MappedVMO
}

func (*IOBuffer) BufferFromEntry

func (iob *IOBuffer) BufferFromEntry(e eth.FifoEntry) Buffer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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