2
* socktoa - return a numeric host name from a sockaddr_storage structure
8
#include <sys/socket.h>
10
#include <netinet/in.h>
12
#include <arpa/inet.h>
14
#ifdef ISC_PLATFORM_NEEDNTOP
21
#include "lib_strbuf.h"
22
#include "ntp_stdlib.h"
27
struct sockaddr_storage* sock
30
register char *buffer;
34
if (sock == NULL) printf("null");
36
switch(sock->ss_family) {
39
inet_ntop(AF_INET, &GET_INADDR(*sock), buffer,
44
inet_ntop(AF_INET6, &GET_INADDR6(*sock), buffer,