diff --git a/trunk/tinyNET/src/dhcp6/tnet_dhcp6.c b/trunk/tinyNET/src/dhcp6/tnet_dhcp6.c index ca5fbe23..97f6ec2b 100644 --- a/trunk/tinyNET/src/dhcp6/tnet_dhcp6.c +++ b/trunk/tinyNET/src/dhcp6/tnet_dhcp6.c @@ -56,7 +56,7 @@ tnet_dhcp6_reply_t* tnet_dhcp6_send_request(const tnet_dhcp6_ctx_t* ctx, tnet_dh goto bail; } - localsocket6 = TNET_SOCKET_CREATE(TNET_SOCKET_HOST_ANY, ctx->port_client, tnet_socket_type_udp_ipv6); + localsocket6 = TNET_SOCKET_CREATE(TNET_SOCKET_HOST_ANY /*"fe80::283c:168a:5c70:81eb"*/, ctx->port_client, tnet_socket_type_udp_ipv6); if(!TNET_SOCKET_IS_VALID(localsocket6)) { TSK_DEBUG_ERROR("Failed to create/bind DHCPv6 client socket."); diff --git a/trunk/tinyNET/src/tnet_types.h b/trunk/tinyNET/src/tnet_types.h index 2f6ff730..2fbf800e 100644 --- a/trunk/tinyNET/src/tnet_types.h +++ b/trunk/tinyNET/src/tnet_types.h @@ -76,11 +76,13 @@ typedef char tnet_ip_t[INET6_ADDRSTRLEN]; # define TNET_ERROR_WOULDBLOCK WSAEWOULDBLOCK # define TNET_ERROR_INPROGRESS WSAEINPROGRESS # define TNET_ERROR_CONNRESET WSAECONNRESET +# define tnet_gai_strerror gai_strerrorA #else # define TNET_INVALID_SOCKET -1 # define TNET_ERROR_WOULDBLOCK EWOULDBLOCK # define TNET_ERROR_INPROGRESS EINPROGRESS # define TNET_ERROR_CONNRESET ECONNRESET +# define tnet_gai_strerror gai_strerror #endif #define TNET_INVALID_FD TNET_INVALID_SOCKET diff --git a/trunk/tinyNET/src/tnet_utils.c b/trunk/tinyNET/src/tnet_utils.c index ae9496d0..c63ec551 100644 --- a/trunk/tinyNET/src/tnet_utils.c +++ b/trunk/tinyNET/src/tnet_utils.c @@ -393,7 +393,11 @@ bail: **/ int tnet_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) { - return getaddrinfo(node, service, hints, res); + int ret; + if((ret = getaddrinfo(node, service, hints, res))){ + TSK_DEBUG_ERROR("getaddrinfo failed: [%s]", tnet_gai_strerror(ret)); + } + return ret; } /** diff --git a/trunk/tinyNET/test/test.vcproj b/trunk/tinyNET/test/test.vcproj index b21d0323..153a8773 100644 --- a/trunk/tinyNET/test/test.vcproj +++ b/trunk/tinyNET/test/test.vcproj @@ -375,6 +375,10 @@ RelativePath=".\test_dhcp.h" > + + diff --git a/trunk/tinyNET/tinyNET.vcproj b/trunk/tinyNET/tinyNET.vcproj index 95f8b485..9a47a77c 100644 --- a/trunk/tinyNET/tinyNET.vcproj +++ b/trunk/tinyNET/tinyNET.vcproj @@ -530,6 +530,10 @@ RelativePath=".\src\tnet_auth.h" > + +