reader

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFirstInterface

func GetFirstInterface() (name string, ip string)

func GetInterfaceNameByIp

func GetInterfaceNameByIp(checkAddr net.IP) string

func GetIp

func GetIp(iface *net.Interface) string

Types

type InputReader

type InputReader interface {
	Read(data []byte) (int, RAWData, error)
}

type RAWData

type RAWData struct {
	Data      []byte
	SrcPort   uint16
	DestPort  uint16
	LocalAddr string
	SrcAddr   string
	DestAddr  string
	Seq       uint32
}

type RAWInput

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

func NewRAWInput

func NewRAWInput(host string, port string) (i *RAWInput)

func (*RAWInput) Read

func (i *RAWInput) Read(data []byte) (int, RAWData, error)

func (*RAWInput) String

func (i *RAWInput) String() string

Jump to

Keyboard shortcuts

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