Lines Matching defs:subnet
41 * This function returns the subnet (address&netmask) for the primary network
135 u_long subnet;
154 subnet = ntohl(address) & ntohl(netmask);
190 np = getnetbyaddr(subnet, AF_INET);
195 * shift the subnet way from zeros and try again.
198 u_long short_subnet = subnet;
204 (u_int) subnet, (u_int) short_subnet);
209 if ((subnet & 0xffffff) == 0) {
210 xsnprintf(netNumberBuf, sizeof(netNumberBuf), "%lu", C(subnet >> 24));
211 } else if ((subnet & 0xffff) == 0) {
213 C(subnet >> 24), C(subnet >> 16));
214 } else if ((subnet & 0xff) == 0) {
216 C(subnet >> 24), C(subnet >> 16),
217 C(subnet >> 8));
220 C(subnet >> 24), C(subnet >> 16),
221 C(subnet >> 8), C(subnet));
232 subnet = address & netmask;
233 hp = gethostbyaddr((char *) &subnet, 4, AF_INET);
237 s = inet_dquad(buf, sizeof(buf), subnet);