Debian Codegraph @

mingw-w64-headers/include/ipexport.h

raw
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6 #ifndef IP_EXPORT_INCLUDED
7 #define IP_EXPORT_INCLUDED 1
8
9 typedef ULONG IPAddr;
10 typedef ULONG IPMask;
11 typedef ULONG IP_STATUS;
12
13 #include <in6addr.h>
14
15 typedef struct in6_addr IPv6Addr;
16
17 #include <inaddr.h>
18
19 typedef struct ip_option_information {
20 UCHAR Ttl;
21 UCHAR Tos;
22 UCHAR Flags;
23 UCHAR OptionsSize;
24 PUCHAR OptionsData;
25 } IP_OPTION_INFORMATION,*PIP_OPTION_INFORMATION;
26
27 #ifdef _WIN64
28 typedef struct ip_option_information32 {
29 UCHAR Ttl;
30 UCHAR Tos;
31 UCHAR Flags;
32 UCHAR OptionsSize;
33 UCHAR *OptionsData;
34 } IP_OPTION_INFORMATION32,*PIP_OPTION_INFORMATION32;
35 #endif
36
37 typedef struct icmp_echo_reply {
38 IPAddr Address;
39 ULONG Status;
40 ULONG RoundTripTime;
41 USHORT DataSize;
42 USHORT Reserved;
43 PVOID Data;
44 struct ip_option_information Options;
45 } ICMP_ECHO_REPLY,*PICMP_ECHO_REPLY;
46
47 #ifdef _WIN64
48 typedef struct icmp_echo_reply32 {
49 IPAddr Address;
50 ULONG Status;
51 ULONG RoundTripTime;
52 USHORT DataSize;
53 USHORT Reserved;
54 VOID *Data;
55 struct ip_option_information32 Options;
56 } ICMP_ECHO_REPLY32,*PICMP_ECHO_REPLY32;
57 #endif
58
59 typedef struct arp_send_reply {
60 IPAddr DestAddress;
61 IPAddr SrcAddress;
62 } ARP_SEND_REPLY,*PARP_SEND_REPLY;
63
64 typedef struct tcp_reserve_port_range {
65 USHORT UpperRange;
66 USHORT LowerRange;
67 } TCP_RESERVE_PORT_RANGE,*PTCP_RESERVE_PORT_RANGE;
68
69 #define MAX_ADAPTER_NAME 128
70
71 typedef struct _IP_ADAPTER_INDEX_MAP {
72 ULONG Index;
73 WCHAR Name[MAX_ADAPTER_NAME];
74 } IP_ADAPTER_INDEX_MAP,*PIP_ADAPTER_INDEX_MAP;
75
76 typedef struct _IP_INTERFACE_INFO {
77 LONG NumAdapters;
78 IP_ADAPTER_INDEX_MAP Adapter[1];
79 } IP_INTERFACE_INFO,*PIP_INTERFACE_INFO;
80
81 typedef struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS {
82 ULONG NumAdapters;
83 IPAddr Address[1];
84 } IP_UNIDIRECTIONAL_ADAPTER_ADDRESS,*PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
85
86 typedef struct _IP_ADAPTER_ORDER_MAP {
87 ULONG NumAdapters;
88 ULONG AdapterOrder[1];
89 } IP_ADAPTER_ORDER_MAP,*PIP_ADAPTER_ORDER_MAP;
90
91 typedef struct _IP_MCAST_COUNTER_INFO {
92 ULONG64 InMcastOctets;
93 ULONG64 OutMcastOctets;
94 ULONG64 InMcastPkts;
95 ULONG64 OutMcastPkts;
96 } IP_MCAST_COUNTER_INFO,*PIP_MCAST_COUNTER_INFO;
97
98 typedef struct _IPV6_ADDRESS_EX {
99 USHORT sin6_port;
100 ULONG sin6_flowinfo;
101 USHORT sin6_addr[8];
102 ULONG sin6_scope_id;
103 } IPV6_ADDRESS_EX, *PIPV6_ADDRESS_EX;
104
105 typedef struct icmpv6_echo_reply_lh {
106 IPV6_ADDRESS_EX Address;
107 ULONG Status;
108 unsigned int RoundTripTime;
109 } ICMPV6_ECHO_REPLY_LH, *PICMPV6_ECHO_REPLY_LH;
110
111 typedef ICMPV6_ECHO_REPLY_LH ICMPV6_ECHO_REPLY;
112 typedef ICMPV6_ECHO_REPLY_LH *PICMPV6_ECHO_REPLY;
113
114 #define IP_STATUS_BASE 11000
115
116 #define IP_SUCCESS 0
117 #define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
118 #define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
119 #define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
120 #define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
121 #define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
122 #define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
123 #define IP_BAD_OPTION (IP_STATUS_BASE + 7)
124 #define IP_HW_ERROR (IP_STATUS_BASE + 8)
125 #define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
126 #define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
127 #define IP_BAD_REQ (IP_STATUS_BASE + 11)
128 #define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
129 #define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
130 #define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
131 #define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
132 #define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
133 #define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
134 #define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
135
136 #define IP_DEST_NO_ROUTE (IP_STATUS_BASE + 2)
137 #define IP_DEST_ADDR_UNREACHABLE (IP_STATUS_BASE + 3)
138 #define IP_DEST_PROHIBITED (IP_STATUS_BASE + 4)
139 #define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
140 #define IP_HOP_LIMIT_EXCEEDED (IP_STATUS_BASE + 13)
141 #define IP_REASSEMBLY_TIME_EXCEEDED (IP_STATUS_BASE + 14)
142 #define IP_PARAMETER_PROBLEM (IP_STATUS_BASE + 15)
143
144 #define IP_DEST_UNREACHABLE (IP_STATUS_BASE + 40)
145 #define IP_TIME_EXCEEDED (IP_STATUS_BASE + 41)
146 #define IP_BAD_HEADER (IP_STATUS_BASE + 42)
147 #define IP_UNRECOGNIZED_NEXT_HEADER (IP_STATUS_BASE + 43)
148 #define IP_ICMP_ERROR (IP_STATUS_BASE + 44)
149 #define IP_DEST_SCOPE_MISMATCH (IP_STATUS_BASE + 45)
150
151 #define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
152 #define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
153 #define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
154 #define IP_UNLOAD (IP_STATUS_BASE + 22)
155 #define IP_ADDR_ADDED (IP_STATUS_BASE + 23)
156 #define IP_MEDIA_CONNECT (IP_STATUS_BASE + 24)
157 #define IP_MEDIA_DISCONNECT (IP_STATUS_BASE + 25)
158 #define IP_BIND_ADAPTER (IP_STATUS_BASE + 26)
159 #define IP_UNBIND_ADAPTER (IP_STATUS_BASE + 27)
160 #define IP_DEVICE_DOES_NOT_EXIST (IP_STATUS_BASE + 28)
161 #define IP_DUPLICATE_ADDRESS (IP_STATUS_BASE + 29)
162 #define IP_INTERFACE_METRIC_CHANGE (IP_STATUS_BASE + 30)
163 #define IP_RECONFIG_SECFLTR (IP_STATUS_BASE + 31)
164 #define IP_NEGOTIATING_IPSEC (IP_STATUS_BASE + 32)
165 #define IP_INTERFACE_WOL_CAPABILITY_CHANGE (IP_STATUS_BASE + 33)
166 #define IP_DUPLICATE_IPADD (IP_STATUS_BASE + 34)
167 #define IP_NO_FURTHER_SENDS (IP_STATUS_BASE + 35)
168
169 #define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
170 #define MAX_IP_STATUS IP_GENERAL_FAILURE
171 #define IP_PENDING (IP_STATUS_BASE + 255)
172
173 #define IP_FLAG_REVERSE 0x1
174 #define IP_FLAG_DF 0x2
175
176 #define IP_OPT_EOL 0
177 #define IP_OPT_NOP 1
178 #define IP_OPT_SECURITY 0x82
179 #define IP_OPT_LSRR 0x83
180 #define IP_OPT_SSRR 0x89
181 #define IP_OPT_RR 0x7
182 #define IP_OPT_TS 0x44
183 #define IP_OPT_SID 0x88
184 #define IP_OPT_ROUTER_ALERT 0x94
185
186 #define MAX_OPT_SIZE 40
187
188 #ifdef CHICAGO
189
190 #define IOCTL_IP_RTCHANGE_NOTIFY_REQUEST 101
191 #define IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST 102
192 #define IOCTL_ARP_SEND_REQUEST 103
193 #define IOCTL_IP_INTERFACE_INFO 104
194 #define IOCTL_IP_GET_BEST_INTERFACE 105
195 #define IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS 106
196 #endif
197 #endif