iobased

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package iobased provides the implementation of io.ReadWriter based data-link layer endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	*channel.Endpoint
	// contains filtered or unexported fields
}

Endpoint implements the interface of stack.LinkEndpoint from io.ReadWriter.

func New

func New(rw dev.Device, mtu uint32, offset int) (*Endpoint, error)

New returns stack.LinkEndpoint(.*Endpoint) and error.

func (*Endpoint) Attach

func (e *Endpoint) Attach(dispatcher stack.NetworkDispatcher)

Attach launches the goroutine that reads packets from io.Reader and dispatches them via the provided dispatcher.

func (*Endpoint) Wait

func (e *Endpoint) Wait()

Jump to

Keyboard shortcuts

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