source: trunk/include/ws2defs.h@ 21561

Last change on this file since 21561 was 21456, checked in by dmik, 15 years ago

WinSock2: IPPROTO_IP option constants have different values than in Winsock1.1 (closes ticket:10).

File size: 2.1 KB
Line 
1#ifndef _WS2DEFS_H_
2#define _WS2DEFS_H_
3
4#define WS2_IPPROTO_OFFSET 100
5
6#define WS2_IPPROTO_OPT(a) (a+WS2_IPPROTO_OFFSET)
7
8/* These match the WinSock 2 constants */
9#define IP_OPTIONS_WS2 1 /* set/get IP options */
10#define IP_HDRINCL_WS2 2 /* header is included with data */
11#define IP_TOS_WS2 3 /* IP type of service and preced*/
12#define IP_TTL_WS2 4 /* IP time to live */
13#define IP_MULTICAST_IF_WS2 9 /* set/get IP multicast i/f */
14#define IP_MULTICAST_TTL_WS2 10 /* set/get IP multicast ttl */
15#define IP_MULTICAST_LOOP_WS2 11 /* set/get IP multicast loopback */
16#define IP_ADD_MEMBERSHIP_WS2 12 /* add an IP group membership */
17#define IP_DROP_MEMBERSHIP_WS2 13 /* drop an IP group membership */
18#define IP_DONTFRAGMENT_WS2 14 /* don't fragment IP datagrams */
19
20/* These match the OS/2 constants */
21#define IP_OPTIONS_OS2 1 /* buf/ip_opts; set/get IP options */
22#define IP_MULTICAST_IF_OS2 2 /* u_char; set/get IP multicast i/f */
23#define IP_MULTICAST_TTL_OS2 3 /* u_char; set/get IP multicast ttl */
24#define IP_MULTICAST_LOOP_OS2 4 /* u_char; set/get IP multicast loopback */
25#define IP_ADD_MEMBERSHIP_OS2 5 /* ip_mreq; add an IP group membership */
26#define IP_DROP_MEMBERSHIP_OS2 6 /* ip_mreq; drop an IP group membership */
27#define IP_HDRINCL_OS2 7 /* int; header is included with data */
28#define IP_TOS_OS2 8 /* int; IP type of service and preced. */
29#define IP_TTL_OS2 9 /* int; IP time to live */
30#define IP_RECVOPTS_OS2 10 /* bool; receive all IP opts w/dgram */
31#define IP_RECVRETOPTS_OS2 11 /* bool; receive IP opts for response */
32#define IP_RECVDSTADDR_OS2 12 /* bool; receive IP dst addr w/dgram */
33#define IP_RETOPTS_OS2 13 /* ip_opts; set/get IP options */
34#define IP_RECVTRRI_OS2 14 /* bool; receive token ring routing inf */
35
36#define SO_REUSEPORT_OS2 0x1000 /* allow local address & port reuse */
37
38#endif /* _WS2DEFS_H_ */
39
40
41
Note: See TracBrowser for help on using the repository browser.