diff options
Diffstat (limited to 'contrib/ntp/libntp/socktohost.c')
-rw-r--r-- | contrib/ntp/libntp/socktohost.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/contrib/ntp/libntp/socktohost.c b/contrib/ntp/libntp/socktohost.c deleted file mode 100644 index 7a3b30f..0000000 --- a/contrib/ntp/libntp/socktohost.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * socktoa - return a numeric host name from a sockaddr_storage structure - */ -#include <sys/types.h> -#include <sys/socket.h> -#include <netdb.h> -#include <netinet/in.h> - -#include <arpa/inet.h> - -#include <stdio.h> - -#include "ntp_fp.h" -#include "lib_strbuf.h" -#include "ntp_stdlib.h" -#include "ntp.h" - - -char * -socktohost( - struct sockaddr_storage* sock - ) -{ - register char *buffer; - - LIB_GETBUF(buffer); - if (getnameinfo((struct sockaddr *)sock, SOCKLEN(sock), buffer, - LIB_BUFLENGTH /* NI_MAXHOST*/, NULL, 0, 0)) - return stoa(sock); - - return buffer; -} |