Lines Matching refs:subnet
45 * This function returns the subnet (address&netmask) for the primary network
139 u_long subnet;
158 subnet = ntohl(address) & ntohl(netmask);
194 np = getnetbyaddr(subnet, AF_INET);
199 * shift the subnet way from zeros and try again.
202 u_long short_subnet = subnet;
208 (u_int) subnet, (u_int) short_subnet);
213 if ((subnet & 0xffffff) == 0) {
214 xsnprintf(netNumberBuf, sizeof(netNumberBuf), "%lu", C(subnet >> 24));
215 } else if ((subnet & 0xffff) == 0) {
217 C(subnet >> 24), C(subnet >> 16));
218 } else if ((subnet & 0xff) == 0) {
220 C(subnet >> 24), C(subnet >> 16),
221 C(subnet >> 8));
224 C(subnet >> 24), C(subnet >> 16),
225 C(subnet >> 8), C(subnet));
236 subnet = address & netmask;
237 hp = gethostbyaddr((char *) &subnet, 4, AF_INET);
241 s = inet_dquad(buf, sizeof(buf), subnet);