portmapper

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2018 License: BSD-3-Clause, GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDP_TICK           = 60
	UDP_TIMEOUT        = 5
	UDP_BLOCK_INTERVAL = 500
	UDP_READBUFFER     = 1048576
)

Variables

This section is empty.

Functions

func CreatePortmap

func CreatePortmap(pm PortMap, dialer netutil.Dialer)

func TcpPortmap

func TcpPortmap(pm PortMap, dialer netutil.Dialer) (err error)

Types

type PortMap

type PortMap struct {
	Net string
	Src string
	Dst string
}

type UdpMapperConn

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

func NewUdpMapperConn

func NewUdpMapperConn(upm *UdpPortMapper, sconn *net.UDPConn,
	dconn net.Conn, addr net.Addr, dst string) (umc *UdpMapperConn)

func (*UdpMapperConn) Close

func (umc *UdpMapperConn) Close()

func (*UdpMapperConn) RecvHandler

func (umc *UdpMapperConn) RecvHandler()

func (*UdpMapperConn) Run

func (umc *UdpMapperConn) Run()

func (*UdpMapperConn) SendHandler

func (umc *UdpMapperConn) SendHandler()

type UdpPackage

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

func NewUdpPackage

func NewUdpPackage() (up *UdpPackage)

func (*UdpPackage) Free

func (up *UdpPackage) Free()

type UdpPortMapper

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

func NewUdpPortMapper

func NewUdpPortMapper() (upm *UdpPortMapper)

func (*UdpPortMapper) RemovePorts

func (upm *UdpPortMapper) RemovePorts(addr net.Addr)

func (*UdpPortMapper) UdpPortmap

func (upm *UdpPortMapper) UdpPortmap(pm PortMap, dialer netutil.Dialer) (err error)

Jump to

Keyboard shortcuts

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