summaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcp.c')
-rw-r--r--src/tcp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tcp.c b/src/tcp.c
index 1ab751c..77dbf26 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -1,14 +1,14 @@
/*
* tcpproxy
*
- * tcpproxy is a simple tcp connection proxy which combines the
- * features of rinetd and 6tunnel. tcpproxy supports IPv4 and
- * IPv6 and also supports connections from IPv6 to IPv4
+ * tcpproxy is a simple tcp connection proxy which combines the
+ * features of rinetd and 6tunnel. tcpproxy supports IPv4 and
+ * IPv6 and also supports connections from IPv6 to IPv4
* endpoints and vice versa.
- *
*
- * Copyright (C) 2010-2011 Christian Pointner <equinox@spreadspace.org>
- *
+ *
+ * Copyright (C) 2010-2013 Christian Pointner <equinox@spreadspace.org>
+ *
* This file is part of tcpproxy.
*
* tcpproxy is free software: you can redistribute it and/or modify
@@ -43,13 +43,13 @@ char* tcp_endpoint_to_string(tcp_endpoint_t e)
{
char addrstr[INET6_ADDRSTRLEN + 1], portstr[6], *ret;
char addrport_sep = ':';
-
+
switch(e.addr_.ss_family)
{
case AF_INET: addrport_sep = ':'; break;
case AF_INET6: addrport_sep = '.'; break;
case AF_UNSPEC: return NULL;
- default: return strdup("unknown address type");
+ default: return strdup("unknown address type");
}
int errcode = getnameinfo((struct sockaddr *)&(e.addr_), e.len_, addrstr, sizeof(addrstr), portstr, sizeof(portstr), NI_NUMERICHOST | NI_NUMERICSERV);