tunnel

package
v0.0.0-...-2e4d9bc Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultInterface is default TAP device interface name
	DefaultInterface = "tap0"

	// DefaultMtu is default interface device mtu
	DefaultMtu = 1500

	// DefautPort is default port value for remote and local host
	DefautPort = 9669

	// DefaultMask is default ip adress mask
	DefaultMask = 24

	// Sleep time after udp socket error
	SleepErrTime = 100
)

DefautPort is default port value for remote and local host

Variables

This section is empty.

Functions

This section is empty.

Types

type Arp

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

Arp is tunnel arp table receiver which hold tunnels arp map

func (*Arp) String

func (a *Arp) String() (s string)

String return harbare and udp address table in string

type Ethertype

type Ethertype struct {
	ethernet.Ethertype
}

Ethertype redifined to add method Print

func (Ethertype) String

func (t Ethertype) String() (s string)

String Ethertype representation

type Params

type Params struct {
	Intrface  string // interface name
	Mtu       int    // interface mtu
	Laddr     string // interface local address
	Lmask     int    // interface local address mask
	Raddr     string // remote host address
	Rport     int    // remote host port
	Lport     int    // this host port
	ShowHelpF bool   // show help flag
}

Params is application parameters

func (*Params) SetDefault

func (p *Params) SetDefault() *Params

SetDefault set sefault parameters

type Tunnel

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

Tunnel define teonet tunnel data structure

func New

func New(p *Params) (t *Tunnel)

New create new tunnel

func (*Tunnel) Run

func (t *Tunnel) Run()

Run start and process teonet tunnel

Jump to

Keyboard shortcuts

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