- net_v6_count++;
- sa6 = (struct sockaddr_in6 *)ifap->ifa_addr;
- if (sa6->sin6_addr.__u6_addr.__u6_addr16[0] == ntohs(V6TO4_PREFIX_16)) net_v6to4_count++;
+ config_stats_global.v4_count++;
+ }
+ else
+ {
+ config_stats_global.v6_count++;
+
+ if (net_type == NET_TYPE_LINKLOCAL)
+ {
+ config_stats_global.ll_count++;
+ continue;
+ }
+ else if (net_type == NET_TYPE_ULA)
+ {
+ config_stats_global.ula_count++;
+ if (!strncmp(ifap->ifa_name, "utun", 4)) continue;
+ }
+ if (net_type == NET_TYPE_TEREDO)
+ {
+ config_stats_global.teredo_count++;
+ }
+ else if (net_type == NET_TYPE_6TO4)
+ {
+ config_stats_global.v6to4_count++;
+ }
+ else if (net_type == NET_TYPE_SITELOCAL)
+ {
+ config_stats_global.sl_count++;
+ }
+
+ if (_si_net_type_is_IPv6_globably_reachable_non_transitional(net_type))
+ {
+ config_stats_global.gai_v6_preferred = 1;
+ }