diff options
author | Christian Pointner <equinox@spreadspace.org> | 2010-12-02 00:28:25 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2010-12-02 00:28:25 +0000 |
commit | 90f403d1f554822be06564ea52498d710d2bf051 (patch) | |
tree | d7642107854c778f952bd2876578c627e744eb9e /src/tcp.c | |
parent | buffer size can now be configured (diff) |
added new options for resolv types (IPv4 vs IPv6)
manpage: new parameters
manpage: added short description to each parameter
git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@19 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
Diffstat (limited to 'src/tcp.c')
-rw-r--r-- | src/tcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -75,7 +75,10 @@ struct addrinfo* tcp_resolve_endpoint(const char* addr, const char* port, resolv int errcode = getaddrinfo(addr, port, &hints, &res); if (errcode != 0) { - log_printf(ERROR, "Error resolving address (%s:%s): %s", (addr) ? addr : "*", (port) ? port : "0", gai_strerror(errcode)); + char* type = ""; + if(rt == IPV4_ONLY) type = "IPv4 "; + else if(rt == IPV6_ONLY) type = "IPv6 "; + log_printf(ERROR, "Error resolving %saddress (%s:%s): %s", type, (addr) ? addr : "*", (port) ? port : "0", gai_strerror(errcode)); return NULL; } if(!res) { |