Fix compilation errors on FreeBSD.
[wine/dibdrv.git] / include / ws2tcpip.h
blob3ef49a4c9bf8732abb5174347da99bbf7463e1cd
1 #ifndef __WS2TCPIP__
2 #define __WS2TCPIP__
4 #ifdef USE_WS_PREFIX
5 #define WS(x) WS_##x
6 #else
7 #define WS(x) x
8 #endif
10 /* FIXME: This gets defined by some Unix (Linux) header and messes things */
11 #undef s6_addr
13 typedef struct WS(in_addr6)
15 u_char s6_addr[16]; /* IPv6 address */
16 } IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR;
18 typedef struct WS(sockaddr_in6)
20 short sin6_family; /* AF_INET6 */
21 u_short sin6_port; /* Transport level port number */
22 u_long sin6_flowinfo; /* IPv6 flow information */
23 struct WS(in_addr6) sin6_addr; /* IPv6 address */
24 } SOCKADDR_IN6,*PSOCKADDR_IN6, *LPSOCKADDR_IN6;
26 typedef union sockaddr_gen
28 struct WS(sockaddr) Address;
29 struct WS(sockaddr_in) AddressIn;
30 struct WS(sockaddr_in6) AddressIn6;
31 } WS(sockaddr_gen);
33 /* Structure to keep interface specific information */
34 typedef struct _INTERFACE_INFO
36 u_long iiFlags; /* Interface flags */
37 WS(sockaddr_gen) iiAddress; /* Interface address */
38 WS(sockaddr_gen) iiBroadcastAddress; /* Broadcast address */
39 WS(sockaddr_gen) iiNetmask; /* Network mask */
40 } INTERFACE_INFO, * LPINTERFACE_INFO;
42 /* Possible flags for the iiFlags - bitmask */
43 #ifndef USE_WS_PREFIX
44 #define IFF_UP 0x00000001 /* Interface is up */
45 #define IFF_BROADCAST 0x00000002 /* Broadcast is supported */
46 #define IFF_LOOPBACK 0x00000004 /* this is loopback interface */
47 #define IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
48 #define IFF_MULTICAST 0x00000010 /* multicast is supported */
49 #else
50 #define WS_IFF_UP 0x00000001 /* Interface is up */
51 #define WS_IFF_BROADCAST 0x00000002 /* Broadcast is supported */
52 #define WS_IFF_LOOPBACK 0x00000004 /* this is loopback interface */
53 #define WS_IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
54 #define WS_IFF_MULTICAST 0x00000010 /* multicast is supported */
55 #endif /* USE_WS_PREFIX */
57 #endif /* __WS2TCPIP__ */