busybox-1.32.0/networking/nslookup.c
static void server_print(void)
{
	char *server;
	struct sockaddr *sa;

#if ENABLE_FEATURE_IPV6
	sa = (struct sockaddr*)_res._u._ext.nsaddrs[0];
	if (!sa)
#endif
		sa = (struct sockaddr*)&_res.nsaddr_list[0];
	server = xmalloc_sockaddr2dotted_noport(sa);

	print_host(server, "Server:");
	if (ENABLE_FEATURE_CLEAN_UP)
		free(server);
	bb_putchar('\n');
}
/* lookup the default nameserver and display it */
lookup the default nameserver and display it
lookup the default nameserver and display it
static void server_print(void)
{
	char *server;
	struct sockaddr *sa;
#if ENABLE_FEATURE_IPV6
	sa = (struct sockaddr*)_res._u._ext.nsaddrs[0];
	if (!sa)
#endif
		sa = (struct sockaddr*)&_res.nsaddr_list[0];
	server = xmalloc_sockaddr2dotted_noport(sa);
	print_host(server, "Server:");
	if (ENABLE_FEATURE_CLEAN_UP)
		free(server);
	bb_putchar('\n');
}
static void server_print ( void ) { char * server ; struct sockaddr * sa ; #if ENABLE_FEATURE_IPV6 sa = ( struct sockaddr * ) _res . _u . _ext . nsaddrs [ 0 ] ; if ( ! sa ) #endif sa = ( struct sockaddr * ) & _res . nsaddr_list [ 0 ] ; server = xmalloc_sockaddr2dotted_noport ( sa ) ; print_host ( server , " " ) ; if ( ENABLE_FEATURE_CLEAN_UP ) free ( server ) ; bb_putchar ( ' \n ' ) ; }
lookup the default nameserver and display it
lookup the default nameserver and display it