- ipv6 support (-DUSE_IPV6)
[sip-router] / test / resolver.txt
1
2
3
4                                  Linux          FreeBSD         Solaris         Cygwin
5 gethostbyname           y                       y                       y                       y
6 gethostbyname_r         n                       n                       y                       -
7 gethostbyname2          y                       y                       y(*)            -
8 getaddrinfo                     y                       y                       y                       -
9 res_search (res_*)      y                       y                       y                       -
10
11 Linux, Solaris, Cygwin:
12
13 struct sockaddr_in{
14         sa_family_t     sin_family;
15         in_port_t       sin_port;
16         struct  in_addr sin_addr;
17         /* ...*/
18 }; 
19
20 FreeBSD:
21 struct sockaddr_in {
22         u_char  sin_len;
23         u_char  sin_family;
24         u_short sin_port;
25         struct  in_addr sin_addr;
26         char    sin_zero[8];
27 };
28
29
30 Linux, Solaris, Cygwin:
31 struct sockaddr_in6 {
32         sa_family_t     sin6_family;
33         in_port_t       sin6_port;
34         uint32_t        sin6_flowinfo;
35         struct in6_addr sin6_addr;
36                 /*...*/
37 };
38
39
40 FreeBSD:
41 struct sockaddr_in6 {
42         u_int8_t        sin6_len;       /* length of this struct(sa_family_t)*/
43         u_int8_t        sin6_family;    /* AF_INET6 (sa_family_t) */
44         u_int16_t       sin6_port;      /* Transport layer port # (in_port_t)*/
45         u_int32_t       sin6_flowinfo;  /* IP6 flow information */
46         struct in6_addr sin6_addr;      /* IP6 address */
47         u_int32_t       sin6_scope_id;  /* intface scope id */
48 };
49
50
51
52                                 sockaddr_in                                     sockaddr_in6
53 Linux   <netinet/in.h> or <linux/in.h>  <netinet/in.h> or <linux/in6.h> (*)
54 FreeBSD                 <netinet/in.h>                          <netinet6/in6.h>
55 Solaris                 <netinet/in.h>                          <netinet/in.h>
56 Cygwin  <netinet/in.h> or <cywin/in.h>  <netinet/in.h> or <cygwin/in.h>
57
58 (*) - on linux netinet/in.h -> from GNU libc, linux/in*.h from the kernel.
59
60
61
62
63 struct sockaddr:
64
65 Linux:
66 (sa_family_t= unsigned short)
67
68 struct sockaddr {
69         sa_family_t     sa_family;      /* address family, AF_xxx       */
70         char            sa_data[14];    /* 14 bytes of protocol address */
71 };
72
73
74
75 FreeBSD:
76
77 (sa_family_t = u_char)
78
79 struct sockaddr {
80         u_char          sa_len;         /* total length */
81         sa_family_t     sa_family;      /* address family */
82         char            sa_data[14];    /* actually longer; address value */
83 };
84