Home | History | Annotate | Download | only in lib

Lines Matching full:is_ipv6

455 static void check_prefix_range(unsigned int prefix, int is_ipv6, int is_lhost)
457 unsigned int base_prefix = is_ipv6 ? BASE_IPV6_PREFIX :
459 unsigned int max_prefix = is_ipv6 ? MAX_IPV6_PREFIX : MAX_IPV4_PREFIX;
461 if (prefix < base_prefix || (is_ipv6 && prefix == 128) ||
462 (!is_ipv6 && prefix == 32))
465 prefix, is_ipv6 ? "IPv6" : "IPv4",
466 is_ipv6 ?
505 static int round_down_prefix(unsigned int prefix, int is_ipv6)
507 unsigned int base_prefix = is_ipv6 ? BASE_IPV6_PREFIX :
564 static void print_vars(int is_ipv6)
566 if (is_ipv6) {
590 int is_ipv6, lprefix, rprefix, tmp;
604 is_ipv6 = !!strchr(lip_str, ':');
605 lprefix = get_prefix(lip_str, is_ipv6);
606 rprefix = get_prefix(rip_str, is_ipv6);
608 if (is_ipv6)
619 if (is_ipv6 != tmp)
623 check_prefix_range(lprefix, is_ipv6, 1);
624 check_prefix_range(rprefix, is_ipv6, 0);
630 if (is_ipv6)
635 print_vars(is_ipv6);