Added memicmpW.
[wine.git] / include / ws2tcpip.h
blob4bd03fcd081e6a66d6da46204a2579d94fe634c3
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
32 * Multicast group information
35 struct WS(ip_mreq)
37 struct WS(in_addr) imr_multiaddr;
38 struct WS(in_addr) imr_interface;
41 struct WS(ip_mreq_source) {
42 struct WS(in_addr) imr_multiaddr;
43 struct WS(in_addr) imr_sourceaddr;
44 struct WS(in_addr) imr_interface;
47 struct WS(ip_msfilter) {
48 struct WS(in_addr) imsf_multiaddr;
49 struct WS(in_addr) imsf_interface;
50 u_long imsf_fmode;
51 u_long imsf_numsrc;
52 struct WS(in_addr) imsf_slist[1];
55 typedef struct WS(in_addr6)
57 u_char s6_addr[16]; /* IPv6 address */
58 } IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR;
60 typedef struct WS(sockaddr_in6)
62 short sin6_family; /* AF_INET6 */
63 u_short sin6_port; /* Transport level port number */
64 u_long sin6_flowinfo; /* IPv6 flow information */
65 struct WS(in_addr6) sin6_addr; /* IPv6 address */
66 } SOCKADDR_IN6,*PSOCKADDR_IN6, *LPSOCKADDR_IN6;
68 typedef union sockaddr_gen
70 struct WS(sockaddr) Address;
71 struct WS(sockaddr_in) AddressIn;
72 struct WS(sockaddr_in6) AddressIn6;
73 } WS(sockaddr_gen);
75 /* Structure to keep interface specific information */
76 typedef struct _INTERFACE_INFO
78 u_long iiFlags; /* Interface flags */
79 WS(sockaddr_gen) iiAddress; /* Interface address */
80 WS(sockaddr_gen) iiBroadcastAddress; /* Broadcast address */
81 WS(sockaddr_gen) iiNetmask; /* Network mask */
82 } INTERFACE_INFO, * LPINTERFACE_INFO;
84 /* Possible flags for the iiFlags - bitmask */
85 #ifndef USE_WS_PREFIX
86 #define IFF_UP 0x00000001 /* Interface is up */
87 #define IFF_BROADCAST 0x00000002 /* Broadcast is supported */
88 #define IFF_LOOPBACK 0x00000004 /* this is loopback interface */
89 #define IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
90 #define IFF_MULTICAST 0x00000010 /* multicast is supported */
91 #else
92 #define WS_IFF_UP 0x00000001 /* Interface is up */
93 #define WS_IFF_BROADCAST 0x00000002 /* Broadcast is supported */
94 #define WS_IFF_LOOPBACK 0x00000004 /* this is loopback interface */
95 #define WS_IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
96 #define WS_IFF_MULTICAST 0x00000010 /* multicast is supported */
97 #endif /* USE_WS_PREFIX */
99 #ifndef USE_WS_PREFIX
100 #define IP_OPTIONS 1
101 #define IP_HDRINCL 2
102 #define IP_TOS 3
103 #define IP_TTL 4
104 #define IP_MULTICAST_IF 9
105 #define IP_MULTICAST_TTL 10
106 #define IP_MULTICAST_LOOP 11
107 #define IP_ADD_MEMBERSHIP 12
108 #define IP_DROP_MEMBERSHIP 13
109 #define IP_DONTFRAGMENT 14
110 #else
111 #define WS_IP_OPTIONS 1
112 #define WS_IP_HDRINCL 2
113 #define WS_IP_TOS 3
114 #define WS_IP_TTL 4
115 #define WS_IP_MULTICAST_IF 9
116 #define WS_IP_MULTICAST_TTL 10
117 #define WS_IP_MULTICAST_LOOP 11
118 #define WS_IP_ADD_MEMBERSHIP 12
119 #define WS_IP_DROP_MEMBERSHIP 13
120 #define WS_IP_DONTFRAGMENT 14
121 #endif /* USE_WS_PREFIX */
123 #endif /* __WS2TCPIP__ */