ipadapter

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Subnet  *YIPNet
	Addr    *YIP
	TunName string `yaml:"tunName"`
	MTU     int
	TxQlen  int
}

type ConfMsg

type ConfMsg struct {
	//MACs         []laneca.Device
	//FlowPolicies []laneca.FlowPolicyConf
	Net net.IPNet
}

type IPAdapter

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

func NewIPAdapter

func NewIPAdapter(confBuf []byte) (*IPAdapter, error)

NewIPAdapter returns a new IPAdapter

func (*IPAdapter) HandshakeComplete

func (adapter *IPAdapter) HandshakeComplete(peer gateway.PeerWriter)

func (*IPAdapter) ProcessCtrlMsg

func (adapter *IPAdapter) ProcessCtrlMsg(msg gateway.Message, remoteIA addr.IA)

func (*IPAdapter) ProcessEgressPkt

func (adapter *IPAdapter) ProcessEgressPkt(buf []byte, getPeerWriter func(string) (gateway.PeerWriter, error))

func (*IPAdapter) ProcessIngressPkt

func (adapter *IPAdapter) ProcessIngressPkt(buf []byte)

func (*IPAdapter) Read

func (adapter *IPAdapter) Read(buf []byte) (int, error)

func (*IPAdapter) String

func (adapter *IPAdapter) String() string

type Router

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

func (*Router) Lookup

func (r *Router) Lookup(addr net.IP) (string, error)

type YIP

type YIP struct {
	*net.IP
}

YIP is a proxy for net.IP to implement a custom Unmarshaler

func (*YIP) UnmarshalYAML

func (ip *YIP) UnmarshalYAML(unmarshal func(interface{}) error) error

type YIPNet

type YIPNet struct {
	*net.IPNet
}

YIPNet is a proxy for net.IPNet to implement a custom Unmarshaler

func (*YIPNet) UnmarshalYAML

func (ipNet *YIPNet) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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