dns: Rename toip6() to getaddrinfo() since the old name is misleading

This commit is contained in:
Florian Zeitz 2011-06-14 01:40:11 +02:00 committed by Sam Roberts
parent 923eef1929
commit 5065a2585c

View File

@ -16,7 +16,7 @@
* Internal function prototypes. * Internal function prototypes.
\*=========================================================================*/ \*=========================================================================*/
static int inet_global_toip(lua_State *L); static int inet_global_toip(lua_State *L);
static int inet_global_toip6(lua_State *L); static int inet_global_getaddrinfo(lua_State *L);
static int inet_global_tohostname(lua_State *L); static int inet_global_tohostname(lua_State *L);
static void inet_pushresolved(lua_State *L, struct hostent *hp); static void inet_pushresolved(lua_State *L, struct hostent *hp);
static int inet_global_gethostname(lua_State *L); static int inet_global_gethostname(lua_State *L);
@ -24,7 +24,7 @@ static int inet_global_gethostname(lua_State *L);
/* DNS functions */ /* DNS functions */
static luaL_reg func[] = { static luaL_reg func[] = {
{ "toip", inet_global_toip}, { "toip", inet_global_toip},
{ "toip6", inet_global_toip6}, { "getaddrinfo", inet_global_getaddrinfo},
{ "tohostname", inet_global_tohostname}, { "tohostname", inet_global_tohostname},
{ "gethostname", inet_global_gethostname}, { "gethostname", inet_global_gethostname},
{ NULL, NULL} { NULL, NULL}
@ -97,7 +97,7 @@ static int inet_global_toip(lua_State *L)
return 2; return 2;
} }
static int inet_global_toip6(lua_State *L) static int inet_global_getaddrinfo(lua_State *L)
{ {
const char *hostname = luaL_checkstring(L, 1); const char *hostname = luaL_checkstring(L, 1);
struct addrinfo *iterator = NULL, *resolved = NULL; struct addrinfo *iterator = NULL, *resolved = NULL;