netstack

package
v1.15.16 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: GPL-3.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Net

type Net netTun

func CreateNetTUN

func CreateNetTUN(localAddresses, dnsServers []netip.Addr, mtu int) (tun.Device, *Net, error)

func (*Net) Dial

func (tnet *Net) Dial(network, address string) (net.Conn, error)

func (*Net) DialContext

func (tnet *Net) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*Net) DialContextTCP

func (net *Net) DialContextTCP(ctx context.Context, addr *net.TCPAddr) (*gonet.TCPConn, error)

func (*Net) DialContextTCPAddrPort added in v1.5.10

func (net *Net) DialContextTCPAddrPort(ctx context.Context, addr netip.AddrPort) (*gonet.TCPConn, error)

func (*Net) DialPing added in v1.5.10

func (net *Net) DialPing(laddr, raddr *PingAddr) (*PingConn, error)

func (*Net) DialPingAddr added in v1.5.10

func (net *Net) DialPingAddr(laddr, raddr netip.Addr) (*PingConn, error)

func (*Net) DialTCP

func (net *Net) DialTCP(addr *net.TCPAddr) (*gonet.TCPConn, error)

func (*Net) DialTCPAddrPort added in v1.5.10

func (net *Net) DialTCPAddrPort(addr netip.AddrPort) (*gonet.TCPConn, error)

func (*Net) DialUDP

func (net *Net) DialUDP(laddr, raddr *net.UDPAddr) (*gonet.UDPConn, error)

func (*Net) DialUDPAddrPort added in v1.5.10

func (net *Net) DialUDPAddrPort(laddr, raddr netip.AddrPort) (*gonet.UDPConn, error)

func (*Net) ListenPing added in v1.5.10

func (net *Net) ListenPing(laddr *PingAddr) (*PingConn, error)

func (*Net) ListenPingAddr added in v1.5.10

func (net *Net) ListenPingAddr(laddr netip.Addr) (*PingConn, error)

func (*Net) ListenTCP

func (net *Net) ListenTCP(addr *net.TCPAddr) (*gonet.TCPListener, error)

func (*Net) ListenTCPAddrPort added in v1.5.10

func (net *Net) ListenTCPAddrPort(addr netip.AddrPort) (*gonet.TCPListener, error)

func (*Net) ListenUDP added in v1.5.10

func (net *Net) ListenUDP(laddr *net.UDPAddr) (*gonet.UDPConn, error)

func (*Net) ListenUDPAddrPort added in v1.5.10

func (net *Net) ListenUDPAddrPort(laddr netip.AddrPort) (*gonet.UDPConn, error)

func (*Net) LookupContextHost

func (tnet *Net) LookupContextHost(ctx context.Context, host string) ([]string, error)

func (*Net) LookupHost

func (net *Net) LookupHost(host string) (addrs []string, err error)

type PingAddr added in v1.5.10

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

func PingAddrFromAddr added in v1.5.10

func PingAddrFromAddr(addr netip.Addr) *PingAddr

func (PingAddr) Addr added in v1.5.10

func (ia PingAddr) Addr() netip.Addr

func (PingAddr) Network added in v1.5.10

func (ia PingAddr) Network() string

func (PingAddr) String added in v1.5.10

func (ia PingAddr) String() string

type PingConn added in v1.5.10

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

func (*PingConn) Close added in v1.5.10

func (pc *PingConn) Close() error

func (*PingConn) LocalAddr added in v1.5.10

func (pc *PingConn) LocalAddr() net.Addr

func (*PingConn) Read added in v1.5.10

func (pc *PingConn) Read(p []byte) (n int, err error)

func (*PingConn) ReadFrom added in v1.5.10

func (pc *PingConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)

func (*PingConn) RemoteAddr added in v1.5.10

func (pc *PingConn) RemoteAddr() net.Addr

func (*PingConn) SetDeadline added in v1.5.10

func (pc *PingConn) SetDeadline(t time.Time) error

func (*PingConn) SetReadDeadline added in v1.5.10

func (pc *PingConn) SetReadDeadline(t time.Time) error

func (*PingConn) SetWriteDeadline added in v1.5.10

func (pc *PingConn) SetWriteDeadline(t time.Time) error

func (*PingConn) Write added in v1.5.10

func (pc *PingConn) Write(p []byte) (n int, err error)

func (*PingConn) WriteTo added in v1.5.10

func (pc *PingConn) WriteTo(p []byte, addr net.Addr) (n int, err error)

Jump to

Keyboard shortcuts

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