nat

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NatEnoNone = NatEno(iota)
	NatEnoParameter
	NatEnoNotFound
	NatEnoDuplicated
	NatEnoMismatched
	NatEnoScheduler
	NatEnoFromPmpLib
	NatEnoFromUpnpLib
	NatEnoFromSystem
	NatEnoNoNat
	NatEnoNullNat
	NatEnoUnknown
)
View Source
const (
	NATT_NONE = config.NATT_NONE
	NATT_PMP  = config.NATT_PMP
	NATT_UPNP = config.NATT_UPNP
	NATT_ANY  = config.NATT_ANY
)

configuration

View Source
const (
	MinKeepDuration = time.Minute * 20
	MinRefreshDelta = time.Minute * 5
	MaxRefreshDelta = time.Minute * 10
)

refresh the mapping before it's expired

View Source
const (
	NATP_TCP = "tcp"
	NATP_UDP = "udp"
)

map instance

View Source
const NatMgrName = sch.NatMgrName

nat manager

Variables

This section is empty.

Functions

func NatIsResultOk

func NatIsResultOk(eno int) bool

func NatIsStatusOk

func NatIsStatusOk(status int) bool

func NewPmpInterface

func NewPmpInterface(gw net.IP) *pmpCtrlBlock

func NewUpnpInterface

func NewUpnpInterface() *upnpCtrlBlock

Types

type NatEno

type NatEno int

errno

func (NatEno) Errno

func (ne NatEno) Errno() int

func (NatEno) Error

func (ne NatEno) Error() string

type NatManager

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

func NewNatMgr

func NewNatMgr() *NatManager

func (*NatManager) TaskProc4Scheduler

func (natMgr *NatManager) TaskProc4Scheduler(ptn interface{}, msg *sch.SchMessage) sch.SchErrno

type NatMapInstID

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

type NatMapInstance

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

map instance

Jump to

Keyboard shortcuts

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