Home | History | Annotate | Download | only in net

Lines Matching refs:IP

14 // supportsVistaIP reports whether the platform implements new IP
33 // adapterAddresses returns a list of IP adapter and address
34 // structures. The structure contains an IP adapter and flattened
35 // multiple IP addresses including unicast, anycast and multicast
151 l = addrPrefixLen(pfx4, IP(sa.Addr[:]))
153 ifat = append(ifat, &IPNet{IP: IPv4(sa.Addr[0], sa.Addr[1], sa.Addr[2], sa.Addr[3]), Mask: CIDRMask(l, 8*IPv4len)})
158 l = addrPrefixLen(pfx6, IP(sa.Addr[:]))
160 ifa := &IPNet{IP: make(IP, IPv6len), Mask: CIDRMask(l, 8*IPv6len)}
161 copy(ifa.IP, sa.Addr[:])
172 ifat = append(ifat, &IPAddr{IP: IPv4(sa.Addr[0], sa.Addr[1], sa.Addr[2], sa.Addr[3])})
174 ifa := &IPAddr{IP: make(IP, IPv6len)}
175 copy(ifa.IP, sa.Addr[:])
192 pfx := IPNet{IP: IP(sa.Addr[:]), Mask: CIDRMask(int(p.PrefixLength), 8*IPv4len)}
195 pfx := IPNet{IP: IP(sa.Addr[:]), Mask: CIDRMask(int(p.PrefixLength), 8*IPv6len)}
202 // addrPrefixLen returns an appropriate prefix length in bits for ip
209 func addrPrefixLen(pfxs []IPNet, ip IP) int {
213 if !pfxs[i].Contains(ip) {
231 if ip.To4() != nil {
258 ifat = append(ifat, &IPAddr{IP: IPv4(sa.Addr[0], sa.Addr[1], sa.Addr[2], sa.Addr[3])})
260 ifa := &IPAddr{IP: make(IP, IPv6len)}
261 copy(ifa.IP, sa.Addr[:])