Lines Matching defs:subnet
43 * This function returns the subnet (address&netmask) for the primary network
137 u_long subnet;
156 subnet = ntohl(address) & ntohl(netmask);
192 np = getnetbyaddr(subnet, AF_INET);
197 * shift the subnet way from zeros and try again.
200 u_long short_subnet = subnet;
206 (u_int) subnet, (u_int) short_subnet);
211 if ((subnet & 0xffffff) == 0) {
212 xsnprintf(netNumberBuf, sizeof(netNumberBuf), "%lu", C(subnet >> 24));
213 } else if ((subnet & 0xffff) == 0) {
215 C(subnet >> 24), C(subnet >> 16));
216 } else if ((subnet & 0xff) == 0) {
218 C(subnet >> 24), C(subnet >> 16),
219 C(subnet >> 8));
222 C(subnet >> 24), C(subnet >> 16),
223 C(subnet >> 8), C(subnet));
234 subnet = address & netmask;
235 hp = gethostbyaddr((char *) &subnet, 4, AF_INET);
239 s = inet_dquad(buf, sizeof(buf), subnet);