Lines Matching refs:network
69 "IPV4_LNETWORK: IPv4 network part of IPV4_LHOST\n"
70 "IPV4_RNETWORK: IPv4 network part of IPV4_RHOST\n"
76 "IPV6_LNETWORK: IPv6 network part of IPV6_LHOST\n"
77 "IPV6_RNETWORK: IPv6 network part of IPV6_LHOST\n"
111 struct in_addr network;
113 memset(&network, 0, sizeof(network));
115 network.s_addr = ip->s_addr & mask->s_addr;
116 return network;
119 static int is_in_subnet_ipv4(const struct in_addr *network,
123 (network->s_addr & mask->s_addr);
126 static int is_in_subnet_ipv6(const struct in6_addr *network,
133 (((int *) network)[i] & ((int *) mask)[i]))
204 * For unused network we use
211 struct in_addr mask, network;
215 network = calc_network(ip, &mask);
221 tst_get_in_addr(buf, &network);
223 if (!is_in_subnet_ipv4(ip, &mask, &network))
233 tst_get_in_addr(buf, &network);
235 if (!is_in_subnet_ipv4(ip, &mask, &network))
243 tst_get_in_addr(buf, &network);
245 if (!is_in_subnet_ipv4(ip, &mask, &network))
255 * For unused network we use DEFAULT_IPV6_UNUSED_PART1:DEFAULT_IPV6_UNUSED_PART2
265 struct in6_addr mask, network;
285 tst_get_in6_addr(buf, &network);
287 if (!is_in_subnet_ipv6(ip6, &mask, &network))
298 tst_get_in6_addr(buf, &network);
300 if (!is_in_subnet_ipv6(ip6, &mask, &network))
309 tst_get_in6_addr(buf, &network);
311 if (!is_in_subnet_ipv6(ip6, &mask, &network))