Lines Matching refs:network
80 "IPV4_LNETWORK: IPv4 network part of IPV4_LHOST\n"
81 "IPV4_RNETWORK: IPv4 network part of IPV4_RHOST\n"
87 "IPV6_LNETWORK: IPv6 network part of IPV6_LHOST\n"
88 "IPV6_RNETWORK: IPv6 network part of IPV6_LHOST\n"
122 struct in_addr network;
124 memset(&network, 0, sizeof(network));
126 network.s_addr = ip->s_addr & mask->s_addr;
127 return network;
130 static int is_in_subnet_ipv4(const struct in_addr *network,
134 (network->s_addr & mask->s_addr);
137 static int is_in_subnet_ipv6(const struct in6_addr *network,
144 (((int *) network)[i] & ((int *) mask)[i]))
215 * For unused network we use
222 struct in_addr mask, network;
226 network = calc_network(ip, &mask);
232 get_in_addr(buf, &network);
234 if (!is_in_subnet_ipv4(ip, &mask, &network))
244 get_in_addr(buf, &network);
246 if (!is_in_subnet_ipv4(ip, &mask, &network))
254 get_in_addr(buf, &network);
256 if (!is_in_subnet_ipv4(ip, &mask, &network))
266 * For unused network we use DEFAULT_IPV6_UNUSED_PART1:DEFAULT_IPV6_UNUSED_PART2
276 struct in6_addr mask, network;
296 get_in6_addr(buf, &network);
298 if (!is_in_subnet_ipv6(ip6, &mask, &network))
309 get_in6_addr(buf, &network);
311 if (!is_in_subnet_ipv6(ip6, &mask, &network))
320 get_in6_addr(buf, &network);
322 if (!is_in_subnet_ipv6(ip6, &mask, &network))