home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / cecko / install / devcpp4920.exe / include / ipexport.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-14  |  2.6 KB  |  81 lines

  1. #ifndef _IPEXPORT_H
  2. #define _IPEXPORT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifndef ANY_SIZE
  7. #define ANY_SIZE 1
  8. #endif
  9. #define MAX_ADAPTER_NAME 128
  10. /* IP STATUS flags */
  11. #define IP_STATUS_BASE 11000
  12. #define IP_SUCCESS  0
  13. #define IP_BUF_TOO_SMALL    (IP_STATUS_BASE + 1)
  14. #define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
  15. #define IP_DEST_HOST_UNREACHABLE    (IP_STATUS_BASE + 3)
  16. #define IP_DEST_PROT_UNREACHABLE    (IP_STATUS_BASE + 4)
  17. #define IP_DEST_PORT_UNREACHABLE    (IP_STATUS_BASE + 5)
  18. #define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
  19. #define IP_BAD_OPTION   (IP_STATUS_BASE + 7)
  20. #define IP_HW_ERROR (IP_STATUS_BASE + 8)
  21. #define IP_PACKET_TOO_BIG   (IP_STATUS_BASE + 9)
  22. #define IP_REQ_TIMED_OUT    (IP_STATUS_BASE + 10)
  23. #define IP_BAD_REQ  (IP_STATUS_BASE + 11)
  24. #define IP_BAD_ROUTE    (IP_STATUS_BASE + 12)
  25. #define IP_TTL_EXPIRED_TRANSIT  (IP_STATUS_BASE + 13)
  26. #define IP_TTL_EXPIRED_REASSEM  (IP_STATUS_BASE + 14)
  27. #define IP_PARAM_PROBLEM    (IP_STATUS_BASE + 15)
  28. #define IP_SOURCE_QUENCH    (IP_STATUS_BASE + 16)
  29. #define IP_OPTION_TOO_BIG   (IP_STATUS_BASE + 17)
  30. #define IP_BAD_DESTINATION  (IP_STATUS_BASE + 18)
  31. #define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
  32. #define IP_SPEC_MTU_CHANGE  (IP_STATUS_BASE + 20)
  33. #define IP_MTU_CHANGE   (IP_STATUS_BASE + 21)
  34. #define IP_UNLOAD   (IP_STATUS_BASE + 22)
  35. #define IP_GENERAL_FAILURE  (IP_STATUS_BASE + 50)
  36. #define MAX_IP_STATUS   IP_GENERAL_FAILURE
  37. #define IP_PENDING  (IP_STATUS_BASE + 255)
  38. /* IP header Flags values */
  39. #define IP_FLAG_DF  0x2
  40. /*  IP Option types */
  41. #define IP_OPT_EOL  0
  42. #define IP_OPT_NOP  1
  43. #define IP_OPT_SECURITY 0x82
  44. #define IP_OPT_LSRR 0x83
  45. #define IP_OPT_SSRR 0x89
  46. #define IP_OPT_RR   0x7
  47. #define IP_OPT_TS   0x44
  48. #define IP_OPT_SID  0x88
  49. #define IP_OPT_ROUTER_ALERT 0x94
  50. #define MAX_OPT_SIZE    40
  51.  
  52. typedef unsigned long IPAddr, IPMask, IP_STATUS;
  53. typedef struct ip_option_information {
  54.   unsigned char Ttl;
  55.   unsigned char Tos;
  56.   unsigned char Flags;
  57.   unsigned char OptionsSize;
  58.   unsigned char* OptionsData;
  59. }IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION;
  60. typedef struct icmp_echo_reply {
  61.   IPAddr        Address;
  62.   unsigned long Status;
  63.   unsigned long RoundTripTime;
  64.   unsigned short    DataSize;
  65.   unsigned short    Reserved;
  66.   void* Data;
  67.   struct ip_option_information   Options;
  68. } ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY;;
  69. typedef struct {
  70.   ULONG Index;
  71.   WCHAR  Name[MAX_ADAPTER_NAME];
  72. } IP_ADAPTER_INDEX_MAP, *PIP_ADAPTER_INDEX_MAP;
  73. typedef struct {
  74.   LONG NumAdapters;
  75.   IP_ADAPTER_INDEX_MAP Adapter[ANY_SIZE];
  76. } IP_INTERFACE_INFO, *PIP_INTERFACE_INFO;
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80. #endif /* _IPEXPORT_H */
  81.