Fix gcc 4 warnings.
[wine/multimedia.git] / include / ws2tcpip.h
blob45128fc6c82c9a1a8c5a259521b47cf840905f20
1 /*
2 * Copyright (C) 2001 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WS2TCPIP__
20 #define __WS2TCPIP__
22 #ifdef USE_WS_PREFIX
23 #define WS(x) WS_##x
24 #else
25 #define WS(x) x
26 #endif
28 /* FIXME: This gets defined by some Unix (Linux) header and messes things */
29 #undef s6_addr
31 /* for addrinfo calls */
32 typedef struct WS(addrinfo)
34 int ai_flags;
35 int ai_family;
36 int ai_socktype;
37 int ai_protocol;
38 size_t ai_addrlen;
39 char * ai_canonname;
40 struct WS(sockaddr)* ai_addr;
41 struct WS(addrinfo)* ai_next;
42 } ADDRINFOA, *PADDRINFOA;
44 typedef struct WS(addrinfoW)
46 int ai_flags;
47 int ai_family;
48 int ai_socktype;
49 int ai_protocol;
50 size_t ai_addrlen;
51 PWSTR ai_canonname;
52 struct WS(sockaddr)* ai_addr;
53 struct WS(addrinfoW)* ai_next;
54 } ADDRINFOW, *PADDRINFOW;
56 typedef ADDRINFOA ADDRINFO;
59 * Multicast group information
62 struct WS(ip_mreq)
64 struct WS(in_addr) imr_multiaddr;
65 struct WS(in_addr) imr_interface;
68 struct WS(ip_mreq_source) {
69 struct WS(in_addr) imr_multiaddr;
70 struct WS(in_addr) imr_sourceaddr;
71 struct WS(in_addr) imr_interface;
74 struct WS(ip_msfilter) {
75 struct WS(in_addr) imsf_multiaddr;
76 struct WS(in_addr) imsf_interface;
77 u_long imsf_fmode;
78 u_long imsf_numsrc;
79 struct WS(in_addr) imsf_slist[1];
82 typedef struct WS(in_addr6)
84 u_char s6_addr[16]; /* IPv6 address */
85 } IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR;
87 typedef struct WS(sockaddr_in6)
89 short sin6_family; /* AF_INET6 */
90 u_short sin6_port; /* Transport level port number */
91 u_long sin6_flowinfo; /* IPv6 flow information */
92 struct WS(in_addr6) sin6_addr; /* IPv6 address */
93 } SOCKADDR_IN6,*PSOCKADDR_IN6, *LPSOCKADDR_IN6;
95 typedef union sockaddr_gen
97 struct WS(sockaddr) Address;
98 struct WS(sockaddr_in) AddressIn;
99 struct WS(sockaddr_in6) AddressIn6;
100 } WS(sockaddr_gen);
102 /* Structure to keep interface specific information */
103 typedef struct _INTERFACE_INFO
105 u_long iiFlags; /* Interface flags */
106 WS(sockaddr_gen) iiAddress; /* Interface address */
107 WS(sockaddr_gen) iiBroadcastAddress; /* Broadcast address */
108 WS(sockaddr_gen) iiNetmask; /* Network mask */
109 } INTERFACE_INFO, * LPINTERFACE_INFO;
111 /* Possible flags for the iiFlags - bitmask */
112 #ifndef USE_WS_PREFIX
113 #define IFF_UP 0x00000001 /* Interface is up */
114 #define IFF_BROADCAST 0x00000002 /* Broadcast is supported */
115 #define IFF_LOOPBACK 0x00000004 /* this is loopback interface */
116 #define IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
117 #define IFF_MULTICAST 0x00000010 /* multicast is supported */
118 #else
119 #define WS_IFF_UP 0x00000001 /* Interface is up */
120 #define WS_IFF_BROADCAST 0x00000002 /* Broadcast is supported */
121 #define WS_IFF_LOOPBACK 0x00000004 /* this is loopback interface */
122 #define WS_IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
123 #define WS_IFF_MULTICAST 0x00000010 /* multicast is supported */
124 #endif /* USE_WS_PREFIX */
126 #ifndef USE_WS_PREFIX
127 #define IP_OPTIONS 1
128 #define IP_HDRINCL 2
129 #define IP_TOS 3
130 #define IP_TTL 4
131 #define IP_MULTICAST_IF 9
132 #define IP_MULTICAST_TTL 10
133 #define IP_MULTICAST_LOOP 11
134 #define IP_ADD_MEMBERSHIP 12
135 #define IP_DROP_MEMBERSHIP 13
136 #define IP_DONTFRAGMENT 14
137 #else
138 #define WS_IP_OPTIONS 1
139 #define WS_IP_HDRINCL 2
140 #define WS_IP_TOS 3
141 #define WS_IP_TTL 4
142 #define WS_IP_MULTICAST_IF 9
143 #define WS_IP_MULTICAST_TTL 10
144 #define WS_IP_MULTICAST_LOOP 11
145 #define WS_IP_ADD_MEMBERSHIP 12
146 #define WS_IP_DROP_MEMBERSHIP 13
147 #define WS_IP_DONTFRAGMENT 14
148 #endif /* USE_WS_PREFIX */
150 #endif /* __WS2TCPIP__ */