iface

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iface

type Iface struct {
	// contains filtered or unexported fields
}

func New

func New(name, ip string, mtu int) *Iface

func (*Iface) AddSysRoute

func (i *Iface) AddSysRoute(ip *net.IP)

func (*Iface) Name

func (i *Iface) Name() string

func (*Iface) Read

func (i *Iface) Read(pkt PacketIP) (int, error)

func (*Iface) Start

func (i *Iface) Start() error

func (*Iface) Write

func (i *Iface) Write(pkt PacketIP) (int, error)

type PacketIP

type PacketIP []byte

func NewPacketIP

func NewPacketIP(size int) PacketIP

func (PacketIP) GetDestinationIP

func (p PacketIP) GetDestinationIP() net.IP

func (PacketIP) GetSourceIP

func (p PacketIP) GetSourceIP() net.IP

Jump to

Keyboard shortcuts

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