Documentation
¶
Index ¶
- func GetIPFamily(ip net.IP) int
- func GetInterfaceByIP(localIP net.IP) (*net.Interface, error)
- func GetLocalWildcardIP(family int) net.IP
- func GetOutboundAddr(destIP net.IP) (net.IP, error)
- func PickRandomPort() (int, error)
- func RandomSeq() uint32
- func ResolveHostnameToIP(dest string, preferAddressFamily int) (net.IP, error)
- func ReverseLookup(addr string, timeout time.Duration) string
- func SkipIPHeader(packet []byte, af int) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIPFamily ¶
GetIPFamily returns AF_INET (IPv4), AF_INET6 (IPv6), or -1.
func GetInterfaceByIP ¶
GetInterfaceByIP returns interface for given local IP
func GetLocalWildcardIP ¶
GetLocalWildcardIP returns wildcard IP for family
func GetOutboundAddr ¶
GetOutboundAddr returns local IP used to reach dest IP
func PickRandomPort ¶
PickRandomPort returns a random ephemeral port
func ResolveHostnameToIP ¶
ResolveHostnameToIP resolves hostname to preferred IP family (IPv4 or IPv6)
func ReverseLookup ¶
ReverseLookup does reverse DNS lookup with timeout
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.