Lines Matching refs:net_unused
223 char buf[128], net_unused[128]; in get_ipv4_net16_unused() local
228 sprintf(net_unused, "%d.%d", DEFAULT_IPV4_UNUSED_PART1, in get_ipv4_net16_unused()
230 sprintf(buf, "%s.0.0", net_unused); in get_ipv4_net16_unused()
235 return strdup(net_unused); in get_ipv4_net16_unused()
240 sprintf(net_unused, "%d.%d", DEFAULT_IPV4_UNUSED_PART1, in get_ipv4_net16_unused()
242 sprintf(buf, "%s.0.0", net_unused); in get_ipv4_net16_unused()
247 return strdup(net_unused); in get_ipv4_net16_unused()
250 sprintf(net_unused, "%d.%d", (rand() % 128) + (((ip->s_addr) & 0xff) in get_ipv4_net16_unused()
252 sprintf(buf, "%s.0.0", net_unused); in get_ipv4_net16_unused()
257 return strdup(net_unused); in get_ipv4_net16_unused()
277 char buf[128], net_unused[128]; in get_ipv6_net32_unused() local
292 sprintf(net_unused, "%x:%x", 256 * DEFAULT_IPV6_UNUSED_PART1, in get_ipv6_net32_unused()
294 sprintf(buf, "%s::", net_unused); in get_ipv6_net32_unused()
299 return strdup(net_unused); in get_ipv6_net32_unused()
304 sprintf(net_unused, "%x:%x", 256 * DEFAULT_IPV6_UNUSED_PART1 + in get_ipv6_net32_unused()
307 sprintf(buf, "%s::", net_unused); in get_ipv6_net32_unused()
312 return strdup(net_unused); in get_ipv6_net32_unused()
315 sprintf(net_unused, "%x:%x", in get_ipv6_net32_unused()
318 sprintf(buf, "%s::", net_unused); in get_ipv6_net32_unused()
323 return strdup(net_unused); in get_ipv6_net32_unused()