ethernet

package
v0.0.0-...-8b36eab Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2016 License: GPL-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Automatically generated by Packet Go code generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEthernet

func IsEthernet(p packet.Packet) bool

Types

type EtherType

type EtherType int
const (
	ETH_T_LLDP EtherType = 35020
)

type Ethernet

type Ethernet struct {
	packet.Packet
}

func NewEthernet

func NewEthernet() Ethernet

func NewEthernetWithBuf

func NewEthernetWithBuf(b []byte) Ethernet

func ToEthernet

func ToEthernet(p packet.Packet) (Ethernet, error)

func (Ethernet) Clone

func (this Ethernet) Clone() (Ethernet, error)

func (Ethernet) DstMac

func (this Ethernet) DstMac() [6]uint8

func (Ethernet) DstMacOffset

func (this Ethernet) DstMacOffset() int

func (*Ethernet) Init

func (this *Ethernet) Init()

func (*Ethernet) SetDstMac

func (this *Ethernet) SetDstMac(d [6]uint8)

func (*Ethernet) SetSrcMac

func (this *Ethernet) SetSrcMac(s [6]uint8)

func (*Ethernet) SetType

func (this *Ethernet) SetType(t uint16)

func (Ethernet) Size

func (this Ethernet) Size() int

func (Ethernet) SrcMac

func (this Ethernet) SrcMac() [6]uint8

func (Ethernet) SrcMacOffset

func (this Ethernet) SrcMacOffset() int

func (Ethernet) Type

func (this Ethernet) Type() uint16

func (Ethernet) TypeOffset

func (this Ethernet) TypeOffset() int

type EthernetConn

type EthernetConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewEthernetConn

func NewEthernetConn(c net.Conn) EthernetConn

func (*EthernetConn) Flush

func (c *EthernetConn) Flush() error

func (*EthernetConn) ReadEthernet

func (c *EthernetConn) ReadEthernet() (Ethernet, error)

func (*EthernetConn) ReadEthernets

func (c *EthernetConn) ReadEthernets(pkts []Ethernet) (int, error)

func (*EthernetConn) WriteEthernet

func (c *EthernetConn) WriteEthernet(pkt Ethernet) error

func (*EthernetConn) WriteEthernets

func (c *EthernetConn) WriteEthernets(pkts []Ethernet) error

Jump to

Keyboard shortcuts

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