type net.IP
114 uses
net (current package)
addrselect.go#L335: func commonPrefixLen(a netip.Addr, b IP) (cpl int) {
cgo_unix.go#L251: sa, salen := cgoSockaddr(IP(ip.AsSlice()), ip.Zone())
cgo_unix.go#L290: func cgoSockaddr(ip IP, zone string) (*_C_struct_sockaddr, _C_socklen_t) {
dnsclient_unix.go#L735: addrs = append(addrs, IPAddr{IP: IP(a.A[:])})
dnsclient_unix.go#L750: addrs = append(addrs, IPAddr{IP: IP(aaaa.AAAA[:])})
interface_linux.go#L182: ifa := &IPNet{IP: make(IP, IPv6len), Mask: CIDRMask(int(ifam.Prefixlen), 8*IPv6len)}
interface_linux.go#L252: 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#L37: type IP []byte
ip.go#L47: IP IP // network number
ip.go#L53: func IPv4(a, b, c, d byte) IP {
ip.go#L54: p := make(IP, IPv6len)
ip.go#L111: IPv6zero = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
ip.go#L112: IPv6unspecified = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
ip.go#L113: IPv6loopback = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}
ip.go#L114: IPv6interfacelocalallnodes = IP{0xff, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01}
ip.go#L115: IPv6linklocalallnodes = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01}
ip.go#L116: IPv6linklocalallrouters = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02}
ip.go#L121: func (ip IP) IsUnspecified() bool {
ip.go#L126: func (ip IP) IsLoopback() bool {
ip.go#L135: func (ip IP) IsPrivate() bool {
ip.go#L153: func (ip IP) IsMulticast() bool {
ip.go#L162: func (ip IP) IsInterfaceLocalMulticast() bool {
ip.go#L168: func (ip IP) IsLinkLocalMulticast() bool {
ip.go#L177: func (ip IP) IsLinkLocalUnicast() bool {
ip.go#L192: func (ip IP) IsGlobalUnicast() bool {
ip.go#L202: func isZeros(p IP) bool {
ip.go#L213: func (ip IP) To4() IP {
ip.go#L228: func (ip IP) To16() IP {
ip.go#L248: func (ip IP) DefaultMask() IPMask {
ip.go#L272: func (ip IP) Mask(mask IPMask) IP {
ip.go#L283: out := make(IP, n)
ip.go#L296: func (ip IP) String() string {
ip.go#L328: func ipEmptyString(ip IP) string {
ip.go#L337: func (ip IP) appendTo(b []byte) []byte {
ip.go#L349: func (ip IP) AppendText(b []byte) ([]byte, error) {
ip.go#L363: func (ip IP) MarshalText() ([]byte, error) {
ip.go#L374: func (ip *IP) UnmarshalText(text []byte) error {
ip.go#L391: func (ip IP) Equal(x IP) bool {
ip.go#L404: func (ip IP) matchAddrFamily(x IP) bool {
ip.go#L456: func networkNumberAndMask(n *IPNet) (ip IP, m IPMask) {
ip.go#L480: func (n *IPNet) Contains(ip IP) bool {
ip.go#L527: func ParseIP(s string) IP {
ip.go#L529: return IP(addr[:])
ip.go#L550: func ParseCIDR(s string) (IP, *IPNet, error) {
ip.go#L567: return IP(addr16[:]), &IPNet{IP: IP(addr16[:]).Mask(m), Mask: m}, nil
ip.go#L570: func copyIP(x IP) IP {
ip.go#L571: y := make(IP, len(x))
iprawsock.go#L43: IP IP
ipsock.go#L322: func loopbackIP(net string) IP {
ipsock.go#L326: return IP{127, 0, 0, 1}
ipsock_posix.go#L170: func ipToSockaddrInet4(ip IP, port int) (syscall.SockaddrInet4, error) {
ipsock_posix.go#L183: func ipToSockaddrInet6(ip IP, port int, zone string) (syscall.SockaddrInet6, error) {
ipsock_posix.go#L219: func ipToSockaddr(family int, ip IP, port int, zone string) (syscall.Sockaddr, error) {
lookup.go#L206: func LookupIP(host string) ([]IP, error) {
lookup.go#L211: ips := make([]IP, len(addrs))
lookup.go#L228: func (r *Resolver) LookupIP(ctx context.Context, network, host string) ([]IP, error) {
lookup.go#L247: ips := make([]IP, 0, len(addrs))
lookup.go#L311: return []IPAddr{{IP: IP(ip.AsSlice()).To16(), Zone: ip.Zone()}}, nil
sockopt_posix.go#L22: func interfaceToIPv4Addr(ifi *Interface) (IP, error) {
sockoptip4_linux.go#L12: func joinIPv4Group(fd *netFD, ifi *Interface, ip IP) error {
sockoptip6_posix.go#L30: func joinIPv6Group(fd *netFD, ifi *Interface, ip IP) error {
tcpsock.go#L22: IP IP
udpsock.go#L22: IP IP
udpsock_posix.go#L267: func listenIPv4MulticastUDP(c *UDPConn, ifi *Interface, ip IP) error {
udpsock_posix.go#L282: 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
constraints.go#L67: type nameConstraintsSet[T *net.IPNet | string, V net.IP | string] struct {
constraints.go#L130: broadcast := make(net.IP, len(b.IP))
constraints.go#L145: func ipBinarySearch(constraint *net.IPNet, target net.IP) int {
constraints.go#L149: func ipMatch(constraint *net.IPNet, target net.IP) bool {
constraints.go#L160: ipv4 *nameConstraintsSet[*net.IPNet, net.IP]
constraints.go#L161: ipv6 *nameConstraintsSet[*net.IPNet, net.IP]
constraints.go#L165: query(net.IP) (*net.IPNet, bool)
constraints.go#L178: var v4c, v6c *nameConstraintsSet[*net.IPNet, net.IP]
constraints.go#L180: v4c = &nameConstraintsSet[*net.IPNet, net.IP]{
constraints.go#L186: v6c = &nameConstraintsSet[*net.IPNet, net.IP]{
constraints.go#L194: func (ipc *ipConstraints) query(ip net.IP) (*net.IPNet, bool) {
constraints.go#L195: var c *nameConstraintsSet[*net.IPNet, net.IP]
constraints.go#L453: func checkConstraints[T string | *net.IPNet, V any, P string | net.IP | parsedURI | rfc2821Mailbox](c constraints[T, V], s V, p P) error {
constraints.go#L468: ip constraints[*net.IPNet, net.IP]
constraints.go#L477: func (cc *chainConstraints) check(dns []string, uris []parsedURI, emails []rfc2821Mailbox, ips []net.IP) error {
constraints.go#L518: ip: constraints[*net.IPNet, net.IP]{"IP address", newIPNetConstraints(c.PermittedIPRanges), newIPNetConstraints(c.ExcludedIPRanges)},
parser.go#L400: func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string, ipAddresses []net.IP, uris []*url.URL, err error) {
parser.go#L617: ips = append(ips, &net.IPNet{IP: net.IP(ip), Mask: net.IPMask(mask)})
x509.go#L785: IPAddresses []net.IP
x509.go#L1154: func marshalSANs(dnsNames, emailAddresses []string, ipAddresses []net.IP, uris []*url.URL) (derBytes []byte, err error) {
x509.go#L1951: 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#L20: bypassIPs []net.IP
per_host.go#L62: ip := net.IP(nip.AsSlice())
per_host.go#L114: p.AddIP(net.IP(nip.AsSlice()))
per_host.go#L128: func (p *PerHost) AddIP(ip net.IP) {
vendor/golang.org/x/net/http/httpproxy
proxy.go#L182: var ip net.IP
proxy.go#L184: ip = net.IP(nip.AsSlice())
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.8.4. (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 @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |