summaryrefslogtreecommitdiff
path: root/sockaddr.h
blob: 7ba0d4b5245e855ba7433ad5f86406217890ec85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* klugey def'n of a socket address struct helps hide IPV4 vs. IPV6 ugliness */

#include <netdb.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifndef S_SPLINT_S
#include <sys/socket.h>
#endif /* S_SPLINT_S */

typedef union sockaddr_u {
    struct sockaddr sa;
    struct sockaddr_in sa_in;
    struct sockaddr_in6 sa_in6;
} sockaddr_t;

/* sockaddr.h ends here */