comparison fuhtark_test/include/winapi/ipexport.h @ 1500:91c8c3b7cbf0

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