From ef6722750b4518fcb29bf983755b5f02451ef224 Mon Sep 17 00:00:00 2001 From: John Denker Date: Tue, 31 Jul 2012 22:34:58 -0700 Subject: a bunch of files added by the ipv6 patch --- ucspi-tcp-0.88/socket_getifname.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ucspi-tcp-0.88/socket_getifname.c (limited to 'ucspi-tcp-0.88/socket_getifname.c') diff --git a/ucspi-tcp-0.88/socket_getifname.c b/ucspi-tcp-0.88/socket_getifname.c new file mode 100644 index 0000000..77edff9 --- /dev/null +++ b/ucspi-tcp-0.88/socket_getifname.c @@ -0,0 +1,14 @@ +#include +#include +#include +#include "socket.h" + +static char ifname[IFNAMSIZ]; + +const char* socket_getifname(uint32 interface) { + char *tmp=if_indextoname(interface,ifname); + if (tmp) + return tmp; + else + return "[unknown]"; +} -- cgit v1.2.3