type net.IP
96 uses
net (current package)
addrselect.go#L343: func commonPrefixLen(a netip.Addr, b IP) (cpl int) {
cgo_unix.go#L237: sa, salen := cgoSockaddr(IP(ip.AsSlice()), ip.Zone())
cgo_unix.go#L286: func cgoSockaddr(ip IP, zone string) (*_C_struct_sockaddr, _C_socklen_t) {
dnsclient_unix.go#L721: addrs = append(addrs, IPAddr{IP: IP(a.A[:])})
dnsclient_unix.go#L736: addrs = append(addrs, IPAddr{IP: IP(aaaa.AAAA[:])})
interface_linux.go#L197: ifa := &IPNet{IP: make(IP, IPv6len), Mask: CIDRMask(int(ifam.Prefixlen), 8*IPv6len)}
interface_linux.go#L267: ifma := &IPAddr{IP: IP{b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15]}}
ip.go#L36: type IP []byte
ip.go#L46: IP IP // network number
ip.go#L52: func IPv4(a, b, c, d byte) IP {
ip.go#L53: p := make(IP, IPv6len)
ip.go#L110: IPv6zero = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
ip.go#L111: IPv6unspecified = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
ip.go#L112: IPv6loopback = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}
ip.go#L113: IPv6interfacelocalallnodes = IP{0xff, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01}
ip.go#L114: IPv6linklocalallnodes = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01}
ip.go#L115: IPv6linklocalallrouters = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02}
ip.go#L120: func (ip IP) IsUnspecified() bool {
ip.go#L125: func (ip IP) IsLoopback() bool {
ip.go#L134: func (ip IP) IsPrivate() bool {
ip.go#L152: func (ip IP) IsMulticast() bool {
ip.go#L161: func (ip IP) IsInterfaceLocalMulticast() bool {
ip.go#L167: func (ip IP) IsLinkLocalMulticast() bool {
ip.go#L176: func (ip IP) IsLinkLocalUnicast() bool {
ip.go#L191: func (ip IP) IsGlobalUnicast() bool {
ip.go#L201: func isZeros(p IP) bool {
ip.go#L212: func (ip IP) To4() IP {
ip.go#L227: func (ip IP) To16() IP {
ip.go#L247: func (ip IP) DefaultMask() IPMask {
ip.go#L271: func (ip IP) Mask(mask IPMask) IP {
ip.go#L282: out := make(IP, n)
ip.go#L295: func (ip IP) String() string {
ip.go#L320: func ipEmptyString(ip IP) string {
ip.go#L330: func (ip IP) MarshalText() ([]byte, error) {
ip.go#L342: func (ip *IP) UnmarshalText(text []byte) error {
ip.go#L359: func (ip IP) Equal(x IP) bool {
ip.go#L372: func (ip IP) matchAddrFamily(x IP) bool {
ip.go#L424: func networkNumberAndMask(n *IPNet) (ip IP, m IPMask) {
ip.go#L448: func (n *IPNet) Contains(ip IP) bool {
ip.go#L494: func ParseIP(s string) IP {
ip.go#L496: return IP(addr[:])
ip.go#L517: func ParseCIDR(s string) (IP, *IPNet, error) {
ip.go#L535: return IP(addr16[:]), &IPNet{IP: IP(addr16[:]).Mask(m), Mask: m}, nil
ip.go#L538: func copyIP(x IP) IP {
ip.go#L539: y := make(IP, len(x))
iprawsock.go#L32: IP IP
ipsock.go#L310: func loopbackIP(net string) IP {
ipsock.go#L314: return IP{127, 0, 0, 1}
ipsock_posix.go#L145: func ipToSockaddrInet4(ip IP, port int) (syscall.SockaddrInet4, error) {
ipsock_posix.go#L158: func ipToSockaddrInet6(ip IP, port int, zone string) (syscall.SockaddrInet6, error) {
ipsock_posix.go#L183: func ipToSockaddr(family int, ip IP, port int, zone string) (syscall.Sockaddr, error) {
lookup.go#L195: func LookupIP(host string) ([]IP, error) {
lookup.go#L200: ips := make([]IP, len(addrs))
lookup.go#L217: func (r *Resolver) LookupIP(ctx context.Context, network, host string) ([]IP, error) {
lookup.go#L236: ips := make([]IP, 0, len(addrs))
lookup.go#L300: return []IPAddr{{IP: IP(ip.AsSlice()).To16(), Zone: ip.Zone()}}, nil
sockopt_posix.go#L23: func ipv4AddrToInterface(ip IP) (*Interface, error) {
sockopt_posix.go#L52: func interfaceToIPv4Addr(ifi *Interface) (IP, error) {
sockoptip_posix.go#L14: func joinIPv4Group(fd *netFD, ifi *Interface, ip IP) error {
sockoptip_posix.go#L40: func joinIPv6Group(fd *netFD, ifi *Interface, ip IP) error {
tcpsock.go#L22: IP IP
udpsock.go#L25: IP IP
udpsock_posix.go#L259: func listenIPv4MulticastUDP(c *UDPConn, ifi *Interface, ip IP) error {
udpsock_posix.go#L274: func listenIPv6MulticastUDP(c *UDPConn, ifi *Interface, ip IP) error {
cgo_socknew.go#L25: func cgoSockaddrInet4(ip IP) * /*line :22:31*/_Ctype_struct_sockaddr /*line :22:48*/ {
cgo_socknew.go#L31: func cgoSockaddrInet6(ip IP, zone int) * /*line :28:41*/_Ctype_struct_sockaddr /*line :28:58*/ {
net/http
socks_bundle.go#L132: a.IP = make(net.IP, net.IPv4len)
socks_bundle.go#L135: a.IP = make(net.IP, net.IPv6len)
socks_bundle.go#L243: IP net.IP
crypto/x509
parser.go#L373: func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string, ipAddresses []net.IP, uris []*url.URL, err error) {
parser.go#L575: ips = append(ips, &net.IPNet{IP: net.IP(ip), Mask: net.IPMask(mask)})
verify.go#L440: func matchIPConstraint(ip net.IP, constraint *net.IPNet) (bool, error) {
verify.go#L653: ip := net.IP(data)
verify.go#L660: return matchIPConstraint(parsedName.(net.IP), constraint.(*net.IPNet))
x509.go#L758: IPAddresses []net.IP
x509.go#L1052: func marshalSANs(dnsNames, emailAddresses []string, ipAddresses []net.IP, uris []*url.URL) (derBytes []byte, err error) {
x509.go#L1814: IPAddresses []net.IP
github.com/gotd/td/session
telethon.go#L70: addr := make(net.IP, 0, 16)
golang.org/x/net/internal/socks
client.go#L126: a.IP = make(net.IP, net.IPv4len)
client.go#L129: a.IP = make(net.IP, net.IPv6len)
socks.go#L87: IP net.IP
golang.org/x/net/proxy
per_host.go#L19: bypassIPs []net.IP
per_host.go#L126: func (p *PerHost) AddIP(ip net.IP) {
vendor/golang.org/x/net/http/httpproxy
proxy.go#L328: match(host, port string, ip net.IP) bool
proxy.go#L334: func (a allMatch) match(host, port string, ip net.IP) bool {
proxy.go#L342: func (m cidrMatch) match(host, port string, ip net.IP) bool {
proxy.go#L347: ip net.IP
proxy.go#L351: func (m ipMatch) match(host, port string, ip net.IP) bool {
proxy.go#L365: func (m domainMatch) match(host, port string, ip net.IP) bool {
|
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |