ReactOS  0.4.15-dev-1377-ga59cecd
ipexport.h
Go to the documentation of this file.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #ifndef __WINE_IPEXPORT_H
22 #define __WINE_IPEXPORT_H
23 
24 #include <in6addr.h>
25 #include <inaddr.h>
26 
27 typedef ULONG IPAddr;
28 typedef ULONG IPMask;
29 typedef ULONG IP_STATUS;
30 
31 typedef struct ip_option_information
32 {
33  unsigned char Ttl;
34  unsigned char Tos;
35  unsigned char Flags;
36  unsigned char OptionsSize;
37  unsigned char* OptionsData;
39 
40 #if defined(_WIN64)
41 
42 struct ip_option_information32
43 {
44  unsigned char Ttl;
45  unsigned char Tos;
46  unsigned char Flags;
47  unsigned char OptionsSize;
48  unsigned char* POINTER_32 OptionsData;
49 };
50 
51 #endif // _WIN64
52 
53 #define IP_FLAG_DF 0x2
54 
55 #define IP_OPT_EOL 0
56 #define IP_OPT_NOP 1
57 #define IP_OPT_SECURITY 0x82
58 #define IP_OPT_LSRR 0x83
59 #define IP_OPT_SSRR 0x89
60 #define IP_OPT_RR 0x7
61 #define IP_OPT_TS 0x44
62 #define IP_OPT_SID 0x88
63 
64 #define MAX_OPT_SIZE 40
65 
66 
67 typedef struct icmp_echo_request
68 {
81 
82 typedef struct icmp_echo_reply
83 {
92 
93 #ifdef _WIN64
94 struct icmp_echo_reply32
95 {
97  ULONG Status;
98  ULONG RoundTripTime;
99  unsigned short DataSize;
100  unsigned short Reserved;
101  void* POINTER_32 Data;
102  struct ip_option_information32 Options;
103 };
104 
105 typedef struct ip_option_information32 IP_OPTION_INFORMATION32, *PIP_OPTION_INFORMATION32;
106 
107 typedef struct icmp_echo_reply32 ICMP_ECHO_REPLY32, *PICMP_ECHO_REPLY32;
108 #endif
109 
110 
111 #define IP_STATUS_BASE 11000
112 
113 #define IP_SUCCESS 0
114 #define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
115 #define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
116 #define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
117 #define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
118 #define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
119 #define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
120 #define IP_BAD_OPTION (IP_STATUS_BASE + 7)
121 #define IP_HW_ERROR (IP_STATUS_BASE + 8)
122 #define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
123 #define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
124 #define IP_BAD_REQ (IP_STATUS_BASE + 11)
125 #define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
126 #define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
127 #define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
128 #define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
129 #define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
130 #define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
131 #define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
132 
133 #define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
134 #define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
135 #define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
136 #define IP_UNLOAD (IP_STATUS_BASE + 22)
137 
138 #define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
139 #define MAX_IP_STATUS IP_GENERAL_FAILURE
140 #define IP_PENDING (IP_STATUS_BASE + 255)
141 
142 
143 #define MAX_ADAPTER_NAME 128
144 
145 typedef struct _IP_ADAPTER_INDEX_MAP {
149 
150 typedef struct _IP_INTERFACE_INFO {
154 
159 
160 /* ReactOS */
161 
162 typedef struct _IP_ADAPTER_ORDER_MAP {
166 
167 #if (NTDDI_VERSION >= NTDDI_WINXP)
168 
169 #include <pshpack1.h>
170 typedef struct _IPV6_ADDRESS_EX {
176 #include <poppack.h>
177 
178 typedef struct _ICMPV6_ECHO_REQUEST
179 {
184  UINT16 Ttl; // XXX: These seem unnecessarily large.
185  UINT32 Flags; // Is something else in the struct?
187 
188 typedef struct icmpv6_echo_reply_lh {
191  unsigned int RoundTripTime;
193 
196 
197 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
198 
199 #endif /* __WINE_IPEXPORT_H */
UINT8 HasOptions
Definition: ipexport.h:73
IP_ADAPTER_INDEX_MAP Adapter[1]
Definition: ipexport.h:152
struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS IP_UNIDIRECTIONAL_ADAPTER_ADDRESS
IPV6_ADDRESS_EX SourceAddress
Definition: ipexport.h:181
UINT32 RoundTripTime
Definition: ipexport.h:86
struct icmpv6_echo_reply_lh ICMPV6_ECHO_REPLY_LH
ULONG sin6_flowinfo
Definition: ipexport.h:172
struct _IPV6_ADDRESS_EX * PIPV6_ADDRESS_EX
unsigned char Tos
Definition: ipexport.h:34
#define POINTER_32
Definition: basetsd.h:38
struct icmp_echo_request ICMP_ECHO_REQUEST
struct icmp_echo_reply * PICMP_ECHO_REPLY
UINT16 DataSize
Definition: ipexport.h:72
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG _In_opt_ PVOID Data
Definition: wdfdevice.h:4527
IPV6_ADDRESS_EX DestinationAddress
Definition: ipexport.h:180
struct _IP_ADAPTER_ORDER_MAP * PIP_ADAPTER_ORDER_MAP
ULONG AdapterOrder[1]
Definition: ipexport.h:164
struct _IP_ADAPTER_INDEX_MAP * PIP_ADAPTER_INDEX_MAP
struct _IP_INTERFACE_INFO * PIP_INTERFACE_INFO
struct _IPV6_ADDRESS_EX IPV6_ADDRESS_EX
struct icmpv6_echo_reply_lh * PICMPV6_ECHO_REPLY_LH
ULONG sin6_scope_id
Definition: ipexport.h:174
IPAddr Address
Definition: ipexport.h:84
unsigned int UINT32
long LONG
Definition: pedump.c:60
static WCHAR Address[46]
Definition: ping.c:68
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
unsigned char OptionsSize
Definition: ipexport.h:36
ULONG IPAddr
Definition: pfhook.h:35
UINT16 Reserved
Definition: ipexport.h:88
struct _ICMPV6_ECHO_REQUEST * PICMPV6_ECHO_REQUEST
IP_OPTION_INFORMATION Options
Definition: ipexport.h:90
Status
Definition: gdiplustypes.h:24
struct _IP_ADAPTER_ORDER_MAP IP_ADAPTER_ORDER_MAP
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3531
IPAddr Address
Definition: ipexport.h:69
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
__wchar_t WCHAR
Definition: xmlstorage.h:180
ICMPV6_ECHO_REPLY_LH * PICMPV6_ECHO_REPLY
Definition: ipexport.h:195
struct icmp_echo_request * PICMP_ECHO_REQUEST
UINT16 OptionsOffset
Definition: ipexport.h:77
struct _ICMPV6_ECHO_REQUEST ICMPV6_ECHO_REQUEST
unsigned char Ttl
Definition: ipexport.h:33
ICMPV6_ECHO_REPLY_LH ICMPV6_ECHO_REPLY
Definition: ipexport.h:194
IPV6_ADDRESS_EX Address
Definition: ipexport.h:189
unsigned char Flags
Definition: ipexport.h:35
unsigned char * OptionsData
Definition: ipexport.h:37
UINT16 DataOffset
Definition: ipexport.h:71
unsigned int RoundTripTime
Definition: ipexport.h:191
struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS * PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS
USHORT sin6_port
Definition: ipexport.h:171
UINT16 DataSize
Definition: ipexport.h:87
unsigned short USHORT
Definition: pedump.c:61
struct ip_option_information IP_OPTION_INFORMATION
ULONG IP_STATUS
Definition: ipexport.h:29
unsigned short UINT16
struct ip_option_information * PIP_OPTION_INFORMATION
struct _IP_ADAPTER_INDEX_MAP IP_ADAPTER_INDEX_MAP
UINT32 Status
Definition: ipexport.h:85
#define MAX_ADAPTER_NAME
Definition: ipexport.h:143
unsigned int ULONG
Definition: retypes.h:1
UINT8 OptionsSize
Definition: ipexport.h:78
ULONG IPMask
Definition: ipexport.h:28
ULONG IPAddr
Definition: ipexport.h:27
unsigned char UINT8
struct icmp_echo_reply ICMP_ECHO_REPLY
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
USHORT sin6_addr[8]
Definition: ipexport.h:173
UINT32 Timeout
Definition: ipexport.h:70
struct _IP_INTERFACE_INFO IP_INTERFACE_INFO