source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ipexport.h@ 1186

Last change on this file since 1186 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 5.4 KB
RevLine 
[1166]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
9typedef ULONG IPAddr;
10typedef ULONG IPMask;
11typedef ULONG IP_STATUS;
12
13#include <in6addr.h>
14
15typedef struct in6_addr IPv6Addr;
16
17#include <inaddr.h>
18
19typedef 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
28typedef 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
37typedef 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
48typedef 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
59typedef struct arp_send_reply {
60 IPAddr DestAddress;
61 IPAddr SrcAddress;
62} ARP_SEND_REPLY,*PARP_SEND_REPLY;
63
64typedef 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
71typedef struct _IP_ADAPTER_INDEX_MAP {
72 ULONG Index;
73 WCHAR Name[MAX_ADAPTER_NAME];
74} IP_ADAPTER_INDEX_MAP,*PIP_ADAPTER_INDEX_MAP;
75
76typedef struct _IP_INTERFACE_INFO {
77 LONG NumAdapters;
78 IP_ADAPTER_INDEX_MAP Adapter[1];
79} IP_INTERFACE_INFO,*PIP_INTERFACE_INFO;
80
81typedef struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS {
82 ULONG NumAdapters;
83 IPAddr Address[1];
84} IP_UNIDIRECTIONAL_ADAPTER_ADDRESS,*PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
85
86typedef struct _IP_ADAPTER_ORDER_MAP {
87 ULONG NumAdapters;
88 ULONG AdapterOrder[1];
89} IP_ADAPTER_ORDER_MAP,*PIP_ADAPTER_ORDER_MAP;
90
91typedef 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
98typedef 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#define IP_STATUS_BASE 11000
106
107#define IP_SUCCESS 0
108#define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
109#define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
110#define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
111#define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
112#define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
113#define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
114#define IP_BAD_OPTION (IP_STATUS_BASE + 7)
115#define IP_HW_ERROR (IP_STATUS_BASE + 8)
116#define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
117#define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
118#define IP_BAD_REQ (IP_STATUS_BASE + 11)
119#define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
120#define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
121#define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
122#define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
123#define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
124#define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
125#define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
126
127#define IP_DEST_NO_ROUTE (IP_STATUS_BASE + 2)
128#define IP_DEST_ADDR_UNREACHABLE (IP_STATUS_BASE + 3)
129#define IP_DEST_PROHIBITED (IP_STATUS_BASE + 4)
130#define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
131#define IP_HOP_LIMIT_EXCEEDED (IP_STATUS_BASE + 13)
132#define IP_REASSEMBLY_TIME_EXCEEDED (IP_STATUS_BASE + 14)
133#define IP_PARAMETER_PROBLEM (IP_STATUS_BASE + 15)
134
135#define IP_DEST_UNREACHABLE (IP_STATUS_BASE + 40)
136#define IP_TIME_EXCEEDED (IP_STATUS_BASE + 41)
137#define IP_BAD_HEADER (IP_STATUS_BASE + 42)
138#define IP_UNRECOGNIZED_NEXT_HEADER (IP_STATUS_BASE + 43)
139#define IP_ICMP_ERROR (IP_STATUS_BASE + 44)
140#define IP_DEST_SCOPE_MISMATCH (IP_STATUS_BASE + 45)
141
142#define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
143#define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
144#define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
145#define IP_UNLOAD (IP_STATUS_BASE + 22)
146#define IP_ADDR_ADDED (IP_STATUS_BASE + 23)
147#define IP_MEDIA_CONNECT (IP_STATUS_BASE + 24)
148#define IP_MEDIA_DISCONNECT (IP_STATUS_BASE + 25)
149#define IP_BIND_ADAPTER (IP_STATUS_BASE + 26)
150#define IP_UNBIND_ADAPTER (IP_STATUS_BASE + 27)
151#define IP_DEVICE_DOES_NOT_EXIST (IP_STATUS_BASE + 28)
152#define IP_DUPLICATE_ADDRESS (IP_STATUS_BASE + 29)
153#define IP_INTERFACE_METRIC_CHANGE (IP_STATUS_BASE + 30)
154#define IP_RECONFIG_SECFLTR (IP_STATUS_BASE + 31)
155#define IP_NEGOTIATING_IPSEC (IP_STATUS_BASE + 32)
156#define IP_INTERFACE_WOL_CAPABILITY_CHANGE (IP_STATUS_BASE + 33)
157#define IP_DUPLICATE_IPADD (IP_STATUS_BASE + 34)
158#define IP_NO_FURTHER_SENDS (IP_STATUS_BASE + 35)
159
160#define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
161#define MAX_IP_STATUS IP_GENERAL_FAILURE
162#define IP_PENDING (IP_STATUS_BASE + 255)
163
164#define IP_FLAG_DF 0x2
165
166#define IP_OPT_EOL 0
167#define IP_OPT_NOP 1
168#define IP_OPT_SECURITY 0x82
169#define IP_OPT_LSRR 0x83
170#define IP_OPT_SSRR 0x89
171#define IP_OPT_RR 0x7
172#define IP_OPT_TS 0x44
173#define IP_OPT_SID 0x88
174#define IP_OPT_ROUTER_ALERT 0x94
175
176#define MAX_OPT_SIZE 40
177
178#ifdef CHICAGO
179
180#define IOCTL_IP_RTCHANGE_NOTIFY_REQUEST 101
181#define IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST 102
182#define IOCTL_ARP_SEND_REQUEST 103
183#define IOCTL_IP_INTERFACE_INFO 104
184#define IOCTL_IP_GET_BEST_INTERFACE 105
185#define IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS 106
186#endif
187#endif
Note: See TracBrowser for help on using the repository browser.