ipexport.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Defines the types and macros used by the ICMP API, see icmpapi.h.
  3. *
  4. * Copyright (C) 1999 Francois Gouget
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #ifndef __WINE_IPEXPORT_H
  21. #define __WINE_IPEXPORT_H
  22. typedef unsigned long IPAddr;
  23. typedef unsigned long IPMask;
  24. typedef unsigned long IP_STATUS;
  25. struct ip_option_information
  26. {
  27. unsigned char Ttl;
  28. unsigned char Tos;
  29. unsigned char Flags;
  30. unsigned char OptionsSize;
  31. unsigned char* OptionsData;
  32. };
  33. #define IP_FLAG_DF 0x2
  34. #define IP_OPT_EOL 0
  35. #define IP_OPT_NOP 1
  36. #define IP_OPT_SECURITY 0x82
  37. #define IP_OPT_LSRR 0x83
  38. #define IP_OPT_SSRR 0x89
  39. #define IP_OPT_RR 0x7
  40. #define IP_OPT_TS 0x44
  41. #define IP_OPT_SID 0x88
  42. #define MAX_OPT_SIZE 40
  43. struct icmp_echo_reply
  44. {
  45. IPAddr Address;
  46. unsigned long Status;
  47. unsigned long RoundTripTime;
  48. unsigned short DataSize;
  49. unsigned short Reserved;
  50. void* Data;
  51. struct ip_option_information Options;
  52. };
  53. typedef struct ip_option_information IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION;
  54. typedef struct icmp_echo_reply ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY;
  55. #define IP_STATUS_BASE 11000
  56. #define IP_SUCCESS 0
  57. #define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
  58. #define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
  59. #define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
  60. #define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
  61. #define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
  62. #define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
  63. #define IP_BAD_OPTION (IP_STATUS_BASE + 7)
  64. #define IP_HW_ERROR (IP_STATUS_BASE + 8)
  65. #define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
  66. #define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
  67. #define IP_BAD_REQ (IP_STATUS_BASE + 11)
  68. #define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
  69. #define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
  70. #define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
  71. #define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
  72. #define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
  73. #define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
  74. #define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
  75. #define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
  76. #define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
  77. #define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
  78. #define IP_UNLOAD (IP_STATUS_BASE + 22)
  79. #define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
  80. #define MAX_IP_STATUS IP_GENERAL_FAILURE
  81. #define IP_PENDING (IP_STATUS_BASE + 255)
  82. #define MAX_ADAPTER_NAME 128
  83. typedef struct _IP_ADAPTER_INDEX_MAP {
  84. ULONG Index;
  85. WCHAR Name[MAX_ADAPTER_NAME];
  86. } IP_ADAPTER_INDEX_MAP, *PIP_ADAPTER_INDEX_MAP;
  87. typedef struct _IP_INTERFACE_INFO {
  88. LONG NumAdapters;
  89. IP_ADAPTER_INDEX_MAP Adapter[1];
  90. } IP_INTERFACE_INFO,*PIP_INTERFACE_INFO;
  91. typedef struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS {
  92. ULONG NumAdapters;
  93. IPAddr Address[1];
  94. } IP_UNIDIRECTIONAL_ADAPTER_ADDRESS, *PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
  95. #endif /* __WINE_IPEXPORT_H */