ethernet

package
v0.0.0-...-7c4f090 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RawLen  = 0
	ICMPLen = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	DMAC      []byte
	SMAC      []byte
	EtherType uint16
	// contains filtered or unexported fields
}

type Packet

type Packet []byte

func NewPacket

func NewPacket(protocol, typeLen int, dest net.IP) Packet

type Reader

type Reader struct {
	io.Reader
	// contains filtered or unexported fields
}

func NewRead

func NewRead(bufSize int) Reader

func (Reader) Read

func (r Reader) Read(p []byte) (n int, err error)

type Writer

type Writer struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(addr []byte, port, bufSize int, dest net.IP) Writer

func (Writer) Write

func (w Writer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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