Versions in this module Expand all Collapse all v1 v1.1.7 Apr 1, 2021 Changes in this version + const ForwardingBlacklist + const ForwardingBlacklistRFC + const IPv3len + const IPv4HostMask + const IPv4len + const IPv6HostPrefix + const IPv6len + const TypeIP + const TypeIPv4 + const TypeIPv6 + const TypeUnix + const TypeUnknown + func AscAddress(p1Ptr, p2Ptr *SockAddr) int + func AscIfAddress(p1Ptr, p2Ptr *IfAddr) int + func AscIfDefault(p1Ptr, p2Ptr *IfAddr) int + func AscIfName(p1Ptr, p2Ptr *IfAddr) int + func AscIfNetworkSize(p1Ptr, p2Ptr *IfAddr) int + func AscIfPort(p1Ptr, p2Ptr *IfAddr) int + func AscIfPrivate(p1Ptr, p2Ptr *IfAddr) int + func AscIfType(p1Ptr, p2Ptr *IfAddr) int + func AscNetworkSize(p1Ptr, p2Ptr *SockAddr) int + func AscPort(p1Ptr, p2Ptr *SockAddr) int + func AscPrivate(p1Ptr, p2Ptr *SockAddr) int + func AscType(p1Ptr, p2Ptr *SockAddr) int + func Attr(sa SockAddr, attrName AttrName) (string, error) + func DescIfAddress(p1Ptr, p2Ptr *IfAddr) int + func DescIfDefault(p1Ptr, p2Ptr *IfAddr) int + func DescIfName(p1Ptr, p2Ptr *IfAddr) int + func DescIfNetworkSize(p1Ptr, p2Ptr *IfAddr) int + func DescIfPort(p1Ptr, p2Ptr *IfAddr) int + func DescIfPrivate(p1Ptr, p2Ptr *IfAddr) int + func DescIfType(p1Ptr, p2Ptr *IfAddr) int + func GetInterfaceIP(namedIfRE string) (string, error) + func GetInterfaceIPs(namedIfRE string) (string, error) + func GetPrivateIP() (string, error) + func GetPrivateIPs() (string, error) + func GetPublicIP() (string, error) + func GetPublicIPs() (string, error) + func IPAddrAttr(ip IPAddr, selector AttrName) string + func IPv4AddrAttr(ipv4 IPv4Addr, selector AttrName) string + func IPv6AddrAttr(ipv6 IPv6Addr, selector AttrName) string + func IfAddrAttr(ifAddr IfAddr, attrName AttrName) string + func IfAttr(selectorName string, ifAddr IfAddr) (string, error) + func IfAttrs(selectorName string, ifAddrs IfAddrs) (string, error) + func IfByNetwork(selectorParam string, inputIfAddrs IfAddrs) (IfAddrs, IfAddrs, error) + func IsRFC(rfcNum uint, sa SockAddr) bool + func JoinIfAddrs(selectorName string, joinStr string, inputIfAddrs IfAddrs) (string, error) + func KnownRFCs() map[uint]SockAddrs + func NewRouteInfo() (routeInfo, error) — darwin/amd64, linux/amd64, windows/amd64 + func OrderedAddrBy(cmpFuncs ...CmpAddrFunc) *multiAddrSorter + func OrderedIfAddrBy(cmpFuncs ...CmpIfAddrFunc) *multiIfAddrSorter + func SockAddrAttr(sa SockAddr, selector AttrName) string + func UnixSockAttr(us UnixSock, attrName AttrName) string + func VisitAllRFCs(fn func(rfcNum uint, sockaddrs SockAddrs)) + type AttrName string + func IPAttrs() []AttrName + func IPv4Attrs() []AttrName + func IPv6Attrs() []AttrName + func IfAddrAttrs() []AttrName + func SockAddrAttrs() []AttrName + func UnixSockAttrs() []AttrName + type CmpAddrFunc func(p1, p2 *SockAddr) int + type CmpIfAddrFunc func(p1, p2 *IfAddr) int + type IPAddr interface + AddressBinString func() string + AddressHexString func() string + Cmp func(SockAddr) int + CmpAddress func(SockAddr) int + CmpPort func(SockAddr) int + FirstUsable func() IPAddr + Host func() IPAddr + IPPort func() IPPort + LastUsable func() IPAddr + Maskbits func() int + NetIP func() *net.IP + NetIPMask func() *net.IPMask + NetIPNet func() *net.IPNet + Network func() IPAddr + Octets func() []int + func MustIPAddr(addr string) IPAddr + func NewIPAddr(addr string) (IPAddr, error) + func ToIPAddr(sa SockAddr) *IPAddr + type IPAddrs []IPAddr + func (s IPAddrs) Len() int + func (s IPAddrs) Swap(i, j int) + type IPPort uint16 + type IPPrefixLen byte + type IPv4Addr struct + Address IPv4Address + Mask IPv4Mask + Port IPPort + func MustIPv4Addr(addr string) IPv4Addr + func NewIPv4Addr(ipv4Str string) (IPv4Addr, error) + func ToIPv4Addr(sa SockAddr) *IPv4Addr + func (IPv4Addr) Type() SockAddrType + func (ipv4 IPv4Addr) AddressBinString() string + func (ipv4 IPv4Addr) AddressHexString() string + func (ipv4 IPv4Addr) Broadcast() IPAddr + func (ipv4 IPv4Addr) BroadcastAddress() IPv4Network + func (ipv4 IPv4Addr) CmpAddress(sa SockAddr) int + func (ipv4 IPv4Addr) CmpPort(sa SockAddr) int + func (ipv4 IPv4Addr) CmpRFC(rfcNum uint, sa SockAddr) int + func (ipv4 IPv4Addr) Contains(sa SockAddr) bool + func (ipv4 IPv4Addr) ContainsAddress(x IPv4Address) bool + func (ipv4 IPv4Addr) ContainsNetwork(x IPv4Addr) bool + func (ipv4 IPv4Addr) DialPacketArgs() (network, dialArgs string) + func (ipv4 IPv4Addr) DialStreamArgs() (network, dialArgs string) + func (ipv4 IPv4Addr) Equal(sa SockAddr) bool + func (ipv4 IPv4Addr) FirstUsable() IPAddr + func (ipv4 IPv4Addr) Host() IPAddr + func (ipv4 IPv4Addr) IPPort() IPPort + func (ipv4 IPv4Addr) LastUsable() IPAddr + func (ipv4 IPv4Addr) ListenPacketArgs() (network, listenArgs string) + func (ipv4 IPv4Addr) ListenStreamArgs() (network, listenArgs string) + func (ipv4 IPv4Addr) Maskbits() int + func (ipv4 IPv4Addr) NetIP() *net.IP + func (ipv4 IPv4Addr) NetIPMask() *net.IPMask + func (ipv4 IPv4Addr) NetIPNet() *net.IPNet + func (ipv4 IPv4Addr) Network() IPAddr + func (ipv4 IPv4Addr) NetworkAddress() IPv4Network + func (ipv4 IPv4Addr) Octets() []int + func (ipv4 IPv4Addr) String() string + type IPv4Address uint32 + type IPv4Mask uint32 + type IPv4Network uint32 + type IPv6Addr struct + Address IPv6Address + Mask IPv6Mask + Port IPPort + func MustIPv6Addr(addr string) IPv6Addr + func NewIPv6Addr(ipv6Str string) (IPv6Addr, error) + func ToIPv6Addr(sa SockAddr) *IPv6Addr + func (IPv6Addr) Type() SockAddrType + func (ipv6 IPv6Addr) AddressBinString() string + func (ipv6 IPv6Addr) AddressHexString() string + func (ipv6 IPv6Addr) CmpAddress(sa SockAddr) int + func (ipv6 IPv6Addr) CmpPort(sa SockAddr) int + func (ipv6 IPv6Addr) CmpRFC(rfcNum uint, sa SockAddr) int + func (ipv6 IPv6Addr) Contains(sa SockAddr) bool + func (ipv6 IPv6Addr) ContainsAddress(x IPv6Address) bool + func (ipv6 IPv6Addr) DialPacketArgs() (network, dialArgs string) + func (ipv6 IPv6Addr) DialStreamArgs() (network, dialArgs string) + func (ipv6 IPv6Addr) FirstUsable() IPAddr + func (ipv6 IPv6Addr) Host() IPAddr + func (ipv6 IPv6Addr) IPPort() IPPort + func (ipv6 IPv6Addr) LastUsable() IPAddr + func (ipv6 IPv6Addr) ListenPacketArgs() (network, listenArgs string) + func (ipv6 IPv6Addr) ListenStreamArgs() (network, listenArgs string) + func (ipv6 IPv6Addr) Maskbits() int + func (ipv6 IPv6Addr) NetIP() *net.IP + func (ipv6 IPv6Addr) NetIPMask() *net.IPMask + func (ipv6 IPv6Addr) NetIPNet() *net.IPNet + func (ipv6 IPv6Addr) Network() IPAddr + func (ipv6 IPv6Addr) NetworkAddress() IPv6Network + func (ipv6 IPv6Addr) Octets() []int + func (ipv6 IPv6Addr) String() string + func (ipv6a IPv6Addr) Equal(sa SockAddr) bool + func (x IPv6Addr) ContainsNetwork(y IPv6Addr) bool + type IPv6Address *big.Int + type IPv6Mask *big.Int + type IPv6Network *big.Int + type IfAddr struct + func IfAddrMath(operation, value string, inputIfAddr IfAddr) (IfAddr, error) + func (ifAddr IfAddr) Attr(attrName AttrName) (string, error) + func (ifAddr IfAddr) String() string + type IfAddrs []IfAddr + func ExcludeIfs(selectorName, selectorParam string, inputIfAddrs IfAddrs) (IfAddrs, error) + func FilterIfByType(ifAddrs IfAddrs, type_ SockAddrType) (matchedIfs, excludedIfs IfAddrs) + func GetAllInterfaces() (IfAddrs, error) + func GetDefaultInterfaces() (IfAddrs, error) + func GetPrivateInterfaces() (IfAddrs, error) + func GetPublicInterfaces() (IfAddrs, error) + func IfAddrsMath(operation, value string, inputIfAddrs IfAddrs) (IfAddrs, error) + func IfByAddress(inputRe string, ifAddrs IfAddrs) (matched, remainder IfAddrs, err error) + func IfByFlag(inputFlags string, ifAddrs IfAddrs) (matched, remainder IfAddrs, err error) + func IfByMaskSize(selectorParam string, ifAddrs IfAddrs) (matchedIfs, excludedIfs IfAddrs, err error) + func IfByName(inputRe string, ifAddrs IfAddrs) (matched, remainder IfAddrs, err error) + func IfByPort(inputRe string, ifAddrs IfAddrs) (matchedIfs, excludedIfs IfAddrs, err error) + func IfByRFC(selectorParam string, ifAddrs IfAddrs) (matched, remainder IfAddrs, err error) + func IfByRFCs(selectorParam string, ifAddrs IfAddrs) (matched, remainder IfAddrs, err error) + func IfByType(inputTypes string, ifAddrs IfAddrs) (matched, remainder IfAddrs, err error) + func IncludeIfs(selectorName, selectorParam string, inputIfAddrs IfAddrs) (IfAddrs, error) + func LimitIfAddrs(lim uint, in IfAddrs) (IfAddrs, error) + func OffsetIfAddrs(off int, in IfAddrs) (IfAddrs, error) + func SortIfBy(selectorParam string, inputIfAddrs IfAddrs) (IfAddrs, error) + func UniqueIfAddrsBy(selectorName string, inputIfAddrs IfAddrs) (IfAddrs, error) + func (ifs IfAddrs) Len() int + type RouteInterface interface + GetDefaultInterfaceName func() (string, error) + type SockAddr interface + CmpRFC func(rfcNum uint, sa SockAddr) int + Contains func(SockAddr) bool + DialPacketArgs func() (string, string) + DialStreamArgs func() (string, string) + Equal func(SockAddr) bool + ListenPacketArgs func() (string, string) + ListenStreamArgs func() (string, string) + String func() string + Type func() SockAddrType + func NewSockAddr(s string) (SockAddr, error) + type SockAddrMarshaler struct + func (s *SockAddrMarshaler) MarshalJSON() ([]byte, error) + func (s *SockAddrMarshaler) UnmarshalJSON(in []byte) error + type SockAddrType int + func (sat SockAddrType) String() string + type SockAddrs []SockAddr + func (s SockAddrs) Len() int + func (s SockAddrs) Swap(i, j int) + func (sas SockAddrs) FilterByType(type_ SockAddrType) (matched, excluded SockAddrs) + type SortIPAddrsByBroadMaskLen struct + func (s SortIPAddrsByBroadMaskLen) Less(i, j int) bool + type SortIPAddrsByNetworkSize struct + func (s SortIPAddrsByNetworkSize) Less(i, j int) bool + type SortIPAddrsBySpecificMaskLen struct + func (s SortIPAddrsBySpecificMaskLen) Less(i, j int) bool + type UnixSock struct + func MustUnixSock(addr string) UnixSock + func NewUnixSock(s string) (ret UnixSock, err error) + func ToUnixSock(sa SockAddr) *UnixSock + func (UnixSock) Type() SockAddrType + func (us UnixSock) CmpAddress(sa SockAddr) int + func (us UnixSock) DialPacketArgs() (network, dialArgs string) + func (us UnixSock) DialStreamArgs() (network, dialArgs string) + func (us UnixSock) Equal(sa SockAddr) bool + func (us UnixSock) ListenPacketArgs() (network, dialArgs string) + func (us UnixSock) ListenStreamArgs() (network, dialArgs string) + func (us UnixSock) Path() string + func (us UnixSock) String() string + type UnixSocks []*UnixSock