1 /************************************************
6 $Date: 2007-02-12 15:01:19 -0800 (Mon, 12 Feb 2007) $
7 created at: Fri Apr 30 23:19:34 JST 1999
9 ************************************************/
16 # define SA_LEN(sa) (sa)->sa_len
20 (((sa)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) \
21 : sizeof(struct sockaddr))
23 /* by tradition, sizeof(struct sockaddr) covers most of the sockaddrs */
24 # define SA_LEN(sa) (sizeof(struct sockaddr))
30 # define SET_SA_LEN(sa, len) (sa)->sa_len = (len)
32 # define SET_SA_LEN(sa, len) (len)
36 # define SIN_LEN(si) (si)->sin_len
37 # define SET_SIN_LEN(si,len) (si)->sin_len = (len)
39 # define SIN_LEN(si) sizeof(struct sockaddr_in)
40 # define SET_SIN_LEN(si,len)
44 # define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
45 # define IN_MULTICAST(i) IN_CLASSD(i)
48 #ifndef IN_EXPERIMENTAL
49 # define IN_EXPERIMENTAL(i) ((((long)(i)) & 0xe0000000) == 0xe0000000)
52 #ifndef IN_CLASSA_NSHIFT
53 # define IN_CLASSA_NSHIFT 24
56 #ifndef IN_LOOPBACKNET
57 # define IN_LOOPBACKNET 127
65 # define PF_UNSPEC AF_UNSPEC
69 # define PF_INET AF_INET
72 #if defined(HOST_NOT_FOUND) && !defined(h_errno) && !defined(__CYGWIN__)