Lines Matching refs:is_ipv6
443 static void check_prefix_range(unsigned int prefix, int is_ipv6, int is_lhost) in check_prefix_range() argument
445 unsigned int base_prefix = is_ipv6 ? BASE_IPV6_PREFIX : in check_prefix_range()
447 unsigned int max_prefix = is_ipv6 ? MAX_IPV6_PREFIX : MAX_IPV4_PREFIX; in check_prefix_range()
449 if (prefix < base_prefix || (is_ipv6 && prefix == 128) || in check_prefix_range()
450 (!is_ipv6 && prefix == 32)) in check_prefix_range()
453 prefix, is_ipv6 ? "IPv6" : "IPv4", in check_prefix_range()
454 is_ipv6 ? in check_prefix_range()
489 static int round_down_prefix(unsigned int prefix, int is_ipv6) in round_down_prefix() argument
491 unsigned int base_prefix = is_ipv6 ? BASE_IPV6_PREFIX : in round_down_prefix()
548 static void print_vars(int is_ipv6) in print_vars() argument
550 if (is_ipv6) { in print_vars()
574 int is_ipv6, lprefix, rprefix, tmp; in main() local
588 is_ipv6 = !!strchr(lip_str, ':'); in main()
589 lprefix = get_prefix(lip_str, is_ipv6); in main()
590 rprefix = get_prefix(rip_str, is_ipv6); in main()
592 if (is_ipv6) in main()
603 if (is_ipv6 != tmp) in main()
607 check_prefix_range(lprefix, is_ipv6, 1); in main()
608 check_prefix_range(rprefix, is_ipv6, 0); in main()
614 if (is_ipv6) in main()
619 print_vars(is_ipv6); in main()