home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / win32 / Ws2tcpip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  2.5 KB  |  72 lines

  1. /*
  2. **  WS2TCPIP.H - WinSock2 Extension for TCP/IP protocols
  3. **
  4. **  This file contains TCP/IP specific information for use
  5. **  by WinSock2 compatible applications.
  6. **
  7. **  To provide the backward compatibility, all the TCP/IP
  8. **  specific definitions that were included in the WINSOCK.H
  9. **  file are now included in WINSOCK2.H file. WS2TCPIP.H
  10. **  file includes only the definitions  introduced in the
  11. **  WinSock 2 Protocol-Specific Annex document.
  12. **
  13. **  Rev 0.2 Aug 10, 1995
  14. */
  15.  
  16. #ifndef _WS2TCPIP_H_
  17. #define _WS2TCPIP_H_
  18.  
  19.  
  20. /* Structure to keep interface specific information */
  21.  
  22. typedef struct _INTERFACE_INFO
  23. {
  24.     u_long          iiFlags;            /* Interface flags */
  25.     struct sockaddr iiAddress;          /* Interface address */
  26.     struct sockaddr iiBroadcastAddress; /* Broadcast address */
  27.     struct sockaddr iiNetmask;          /* Network mask */
  28. } INTERFACE_INFO, FAR * LPINTERFACE_INFO;
  29.  
  30. /* Possible flags for the  iiFlags - bitmask  */
  31.  
  32. #define IFF_UP           0x00000001 /* Interface is up */
  33. #define IFF_BROADCAST    0x00000002 /* Broadcast is  supported */
  34. #define IFF_LOOPBACK     0x00000004 /* this is loopback interface */
  35. #define IFF_POINTTOPOINT 0x00000008 /*this is point-to-point interface*/
  36. #define IFF_MULTICAST    0x00000010 /* multicast is supported */
  37.  
  38. /* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP */
  39.  
  40. struct ip_mreq {
  41.     struct in_addr imr_multiaddr;   /* IP multicast address of group */
  42.     struct in_addr imr_interface;   /* local IP address of interface */
  43. };
  44.  
  45. /* TCP/IP specific Ioctl codes */
  46.  
  47. #define SIO_GET_INTERFACE_LIST  _IOR('t', 127, u_long)  // <TBD>
  48.  
  49. /* Option to use with [gs]etsockopt at the IPPROTO_IP level */
  50.  
  51. #define IP_OPTIONS          1  /* set/get IP options */
  52. #define IP_HDRINCL          2  /* header is included with data */
  53. #define IP_TOS              3  /* IP type of service and preced*/
  54. #define IP_TTL              4  /* IP time to live */
  55. #define IP_MULTICAST_IF     9  /* set/get IP multicast i/f  */
  56. #define IP_MULTICAST_TTL    10 /* set/get IP multicast ttl */
  57. #define IP_MULTICAST_LOOP   11 /*set/get IP multicast loopback */
  58. #define IP_ADD_MEMBERSHIP   12 /* add an IP group membership */
  59. #define IP_DROP_MEMBERSHIP  13 /* drop an IP group membership */
  60. #define IP_DONTFRAGMENT     14 /* don't fragment IP datagrams */
  61.  
  62. /* Option to use with [gs]etsockopt at the IPPROTO_UDP level */
  63.  
  64. #define UDP_NOCHECKSUM      1
  65.  
  66. /* Option to use with [gs]etsockopt at the IPPROTO_TCP level */
  67.  
  68. #define TCP_EXPEDITED_1122  0x0002
  69.  
  70. #endif  /* _WS2TCPIP_H_ */
  71.  
  72.