Lines Matching defs:mask
45 const struct in_addr mask,
47 bool IsContiguousSubnet(const struct in_addr mask);
548 IsContiguousSubnet() - verify that a subnet mask no holes in it.
550 bool IsContiguousSubnet(const struct in_addr mask)
555 uint32 hmask = ntohl(mask.s_addr);
559 for (i = 0; i < sizeof(mask.s_addr)*8; i++) {
568 // we get a mask that can be or'd with dwMask to fill in all of
580 // IsValidIPConfig() -- Determine if the given IPAddress, mask, and gateway
584 const struct in_addr mask,
597 if (!IsContiguousSubnet(mask)) {
598 UPNP_TRACE(("Is valid IP Config, mask was not contiguous\n"));
602 if ((address.s_addr & mask.s_addr) != (gateway.s_addr & mask.s_addr)) {
608 if (address.s_addr == (address.s_addr & mask.s_addr)) {
609 UPNP_TRACE(("You can't have an IP address at zero(s) relative to subnet mask\n"));
613 if ( (~mask.s_addr) + (address.s_addr & mask.s_addr) == address.s_addr) {