29995869dbd9a2b7878ca19bfdf87d6ee8282b20
[reactos.git] / reactos / include / psdk / ipexport.h
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 Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #ifndef __WINE_IPEXPORT_H
22 #define __WINE_IPEXPORT_H
23
24 typedef unsigned long IPAddr;
25 typedef unsigned long IPMask;
26 typedef unsigned long IP_STATUS;
27
28 struct ip_option_information
29 {
30 unsigned char Ttl;
31 unsigned char Tos;
32 unsigned char Flags;
33 unsigned char OptionsSize;
34 unsigned char* OptionsData;
35 };
36
37 #define IP_FLAG_DF 0x2
38
39 #define IP_OPT_EOL 0
40 #define IP_OPT_NOP 1
41 #define IP_OPT_SECURITY 0x82
42 #define IP_OPT_LSRR 0x83
43 #define IP_OPT_SSRR 0x89
44 #define IP_OPT_RR 0x7
45 #define IP_OPT_TS 0x44
46 #define IP_OPT_SID 0x88
47 #define IP_OPT_ROUTER_ALERT 0x94
48
49 #define MAX_OPT_SIZE 40
50
51
52 struct icmp_echo_reply
53 {
54 IPAddr Address;
55 unsigned long Status;
56 unsigned long RoundTripTime;
57 unsigned short DataSize;
58 unsigned short Reserved;
59 void* Data;
60 struct ip_option_information Options;
61 };
62
63 typedef struct ip_option_information IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION;
64
65 typedef struct icmp_echo_reply ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY;
66
67
68 #define IP_STATUS_BASE 11000
69
70 #define IP_SUCCESS 0
71 #define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
72 #define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
73 #define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
74 #define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
75 #define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
76 #define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
77 #define IP_BAD_OPTION (IP_STATUS_BASE + 7)
78 #define IP_HW_ERROR (IP_STATUS_BASE + 8)
79 #define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
80 #define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
81 #define IP_BAD_REQ (IP_STATUS_BASE + 11)
82 #define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
83 #define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
84 #define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
85 #define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
86 #define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
87 #define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
88 #define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
89
90 #define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
91 #define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
92 #define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
93 #define IP_UNLOAD (IP_STATUS_BASE + 22)
94 #define IP_ADDR_ADDED (IP_STATUS_BASE + 23)
95 #define IP_MEDIA_CONNECT (IP_STATUS_BASE + 24)
96 #define IP_MEDIA_DISCONNECT (IP_STATUS_BASE + 25)
97 #define IP_BIND_ADAPTER (IP_STATUS_BASE + 26)
98 #define IP_UNBIND_ADAPTER (IP_STATUS_BASE + 27)
99 #define IP_DEVICE_DOES_NOT_EXIST (IP_STATUS_BASE + 28)
100 #define IP_DUPLICATE_ADDRESS (IP_STATUS_BASE + 29)
101 #define IP_INTERFACE_METRIC_CHANGE (IP_STATUS_BASE + 30)
102 #define IP_RECONFIG_SECFLTR (IP_STATUS_BASE + 31)
103 #define IP_NEGOTIATING_IPSEC (IP_STATUS_BASE + 32)
104 #define IP_INTERFACE_WOL_CAPABILITY_CHANGE (IP_STATUS_BASE + 33)
105 #define IP_DUPLICATE_IPADD (IP_STATUS_BASE + 34)
106
107 #define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
108 #define MAX_IP_STATUS IP_GENERAL_FAILURE
109 #define IP_PENDING (IP_STATUS_BASE + 255)
110
111
112 #define MAX_ADAPTER_NAME 128
113
114 typedef struct _IP_ADAPTER_INDEX_MAP {
115 ULONG Index;
116 WCHAR Name[MAX_ADAPTER_NAME];
117 } IP_ADAPTER_INDEX_MAP, *PIP_ADAPTER_INDEX_MAP;
118
119 typedef struct _IP_INTERFACE_INFO {
120 LONG NumAdapters;
121 IP_ADAPTER_INDEX_MAP Adapter[1];
122 } IP_INTERFACE_INFO,*PIP_INTERFACE_INFO;
123
124 typedef struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS {
125 ULONG NumAdapters;
126 IPAddr Address[1];
127 } IP_UNIDIRECTIONAL_ADAPTER_ADDRESS, *PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
128
129 typedef struct _IP_ADAPTER_ORDER_MAP {
130 ULONG NumAdapters;
131 ULONG AdapterOrder[1];
132 } IP_ADAPTER_ORDER_MAP, *PIP_ADAPTER_ORDER_MAP;
133
134 #endif /* __WINE_IPEXPORT_H */