gdi32: Use GetDIBits in emfdrv_stretchblt.
[wine.git] / include / wine / nsi.h
blob2c72c16aedc879078ed049d5b0d19111dda68a9a
1 /*
2 * Copyright 2021 Huw Davies
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_NSI_H
20 #define __WINE_NSI_H
22 #include "inaddr.h"
23 #include "in6addr.h"
24 #include "winioctl.h"
26 /* Undocumented NSI NDIS tables */
27 #define NSI_NDIS_IFINFO_TABLE 0
28 #define NSI_NDIS_INDEX_LUID_TABLE 2
30 struct nsi_ndis_ifinfo_rw
32 GUID network_guid;
33 DWORD admin_status;
34 IF_COUNTED_STRING alias; /* .Length in bytes not including '\0' */
35 IF_PHYSICAL_ADDRESS phys_addr;
36 USHORT pad;
37 IF_COUNTED_STRING name2;
38 DWORD unk;
41 struct nsi_ndis_ifinfo_dynamic
43 DWORD oper_status;
44 struct
46 DWORD unk : 1;
47 DWORD not_media_conn : 1;
48 DWORD unk2 : 30;
49 } flags;
50 DWORD media_conn_state;
51 DWORD unk;
52 DWORD mtu;
53 ULONG64 xmit_speed;
54 ULONG64 rcv_speed;
55 ULONG64 in_errors;
56 ULONG64 in_discards;
57 ULONG64 out_errors;
58 ULONG64 out_discards;
59 ULONG64 unk2;
60 ULONG64 in_octets;
61 ULONG64 in_ucast_pkts;
62 ULONG64 in_mcast_pkts;
63 ULONG64 in_bcast_pkts;
64 ULONG64 out_octets;
65 ULONG64 out_ucast_pkts;
66 ULONG64 out_mcast_pkts;
67 ULONG64 out_bcast_pkts;
68 ULONG64 unk3[2];
69 ULONG64 in_ucast_octs;
70 ULONG64 in_mcast_octs;
71 ULONG64 in_bcast_octs;
72 ULONG64 out_ucast_octs;
73 ULONG64 out_mcast_octs;
74 ULONG64 out_bcast_octs;
75 ULONG64 unk4;
78 struct nsi_ndis_ifinfo_static
80 DWORD if_index;
81 IF_COUNTED_STRING descr;
82 DWORD type;
83 DWORD access_type;
84 DWORD unk;
85 DWORD conn_type;
86 GUID if_guid;
87 USHORT conn_present;
88 IF_PHYSICAL_ADDRESS perm_phys_addr;
89 struct
91 DWORD hw : 1;
92 DWORD filter : 1;
93 DWORD unk : 30;
94 } flags;
95 DWORD media_type;
96 DWORD phys_medium_type;
99 /* Undocumented NSI IP tables */
100 #define NSI_IP_COMPARTMENT_TABLE 2
101 #define NSI_IP_ICMPSTATS_TABLE 3
102 #define NSI_IP_IPSTATS_TABLE 6
103 #define NSI_IP_UNICAST_TABLE 10
104 #define NSI_IP_NEIGHBOUR_TABLE 11
105 #define NSI_IP_FORWARD_TABLE 16
107 struct nsi_ip_cmpt_rw
109 DWORD not_forwarding;
110 DWORD unk;
111 DWORD default_ttl;
112 DWORD unk2;
115 struct nsi_ip_cmpt_dynamic
117 DWORD num_ifs;
118 DWORD num_routes;
119 DWORD unk;
120 DWORD num_addrs;
123 struct nsi_ip_icmpstats_dynamic
125 DWORD in_msgs;
126 DWORD in_errors;
127 DWORD in_type_counts[256];
128 DWORD out_msgs;
129 DWORD out_errors;
130 DWORD out_type_counts[256];
133 struct nsi_ip_ipstats_dynamic
135 DWORD unk[4];
136 ULONGLONG in_recv;
137 ULONGLONG in_octets;
138 ULONGLONG fwd_dgrams;
139 ULONGLONG in_delivers;
140 ULONGLONG out_reqs;
141 ULONGLONG unk2;
142 ULONGLONG unk3;
143 ULONGLONG out_octets;
144 ULONGLONG unk4[6];
145 ULONGLONG in_hdr_errs;
146 DWORD in_addr_errs;
147 DWORD in_unk_protos;
148 DWORD unk5;
149 DWORD reasm_reqds;
150 DWORD reasm_oks;
151 DWORD reasm_fails;
152 DWORD in_discards;
153 DWORD out_no_routes;
154 DWORD out_discards;
155 DWORD routing_discards;
156 DWORD frag_oks;
157 DWORD frag_fails;
158 DWORD frag_creates;
159 DWORD unk6[7];
162 struct nsi_ip_ipstats_static
164 DWORD reasm_timeout;
167 struct nsi_ipv4_unicast_key
169 NET_LUID luid;
170 IN_ADDR addr;
171 DWORD pad;
174 struct nsi_ipv6_unicast_key
176 NET_LUID luid;
177 IN6_ADDR addr;
180 struct nsi_ip_unicast_rw
182 DWORD preferred_lifetime;
183 DWORD valid_lifetime;
184 DWORD prefix_origin;
185 DWORD suffix_origin;
186 DWORD on_link_prefix;
187 DWORD unk[2];
190 struct nsi_ip_unicast_dynamic
192 DWORD scope_id;
193 DWORD dad_state;
196 struct nsi_ip_unicast_static
198 ULONG64 creation_time;
201 struct nsi_ipv4_neighbour_key
203 NET_LUID luid;
204 NET_LUID luid2;
205 IN_ADDR addr;
206 DWORD pad;
209 struct nsi_ipv6_neighbour_key
211 NET_LUID luid;
212 NET_LUID luid2;
213 IN6_ADDR addr;
216 struct nsi_ip_neighbour_rw
218 BYTE phys_addr[IF_MAX_PHYS_ADDRESS_LENGTH];
221 struct nsi_ip_neighbour_dynamic
223 DWORD state;
224 DWORD time;
225 struct
227 USHORT is_router : 1;
228 USHORT is_unreachable : 1;
229 } flags;
230 USHORT phys_addr_len;
231 DWORD unk;
234 struct nsi_ipv4_forward_key
236 DWORD unk;
237 IN_ADDR prefix;
238 BYTE prefix_len;
239 BYTE unk2[3];
240 DWORD unk3[3];
241 NET_LUID luid;
242 NET_LUID luid2;
243 IN_ADDR next_hop;
244 DWORD pad;
247 struct nsi_ipv6_forward_key
249 DWORD unk;
250 IN6_ADDR prefix;
251 BYTE prefix_len;
252 BYTE unk2[3];
253 DWORD unk3[3];
254 DWORD pad;
255 NET_LUID luid;
256 NET_LUID luid2;
257 IN6_ADDR next_hop;
260 struct nsi_ip_forward_rw
262 DWORD site_prefix_len;
263 DWORD valid_lifetime;
264 DWORD preferred_lifetime;
265 DWORD metric;
266 DWORD protocol;
267 BYTE loopback;
268 BYTE autoconf;
269 BYTE publish;
270 BYTE immortal;
271 BYTE unk[4];
272 DWORD unk2;
275 struct nsi_ipv4_forward_dynamic
277 DWORD age;
278 DWORD unk[3];
279 IN_ADDR addr2; /* often a repeat of prefix */
282 struct nsi_ipv6_forward_dynamic
284 DWORD age;
285 DWORD unk[3];
286 IN6_ADDR addr2; /* often a repeat of prefix */
289 struct nsi_ip_forward_static
291 DWORD origin;
292 DWORD if_index;
295 /* Wine specific ioctl interface */
297 #define IOCTL_NSIPROXY_WINE_ENUMERATE_ALL CTL_CODE(FILE_DEVICE_NETWORK, 0x400, METHOD_BUFFERED, 0)
298 #define IOCTL_NSIPROXY_WINE_GET_ALL_PARAMETERS CTL_CODE(FILE_DEVICE_NETWORK, 0x401, METHOD_BUFFERED, 0)
299 #define IOCTL_NSIPROXY_WINE_GET_PARAMETER CTL_CODE(FILE_DEVICE_NETWORK, 0x402, METHOD_BUFFERED, 0)
301 /* input for IOCTL_NSIPROXY_WINE_ENUMERATE_ALL */
302 struct nsiproxy_enumerate_all
304 NPI_MODULEID module;
305 DWORD first_arg;
306 DWORD second_arg;
307 DWORD table;
308 DWORD key_size;
309 DWORD rw_size;
310 DWORD dynamic_size;
311 DWORD static_size;
312 DWORD count;
315 /* input for IOCTL_NSIPROXY_WINE_GET_ALL_PARAMETERS */
316 struct nsiproxy_get_all_parameters
318 NPI_MODULEID module;
319 DWORD first_arg;
320 DWORD table;
321 DWORD key_size;
322 DWORD rw_size;
323 DWORD dynamic_size;
324 DWORD static_size;
325 BYTE key[1]; /* key_size */
328 /* input for IOCTL_NSIPROXY_WINE_GET_PARAMETER */
329 struct nsiproxy_get_parameter
331 NPI_MODULEID module;
332 DWORD first_arg;
333 DWORD table;
334 DWORD key_size;
335 DWORD param_type;
336 DWORD data_offset;
337 BYTE key[1]; /* key_size */
340 /* Undocumented Nsi api */
342 #define NSI_PARAM_TYPE_RW 0
343 #define NSI_PARAM_TYPE_DYNAMIC 1
344 #define NSI_PARAM_TYPE_STATIC 2
346 struct nsi_enumerate_all_ex
348 void *unknown[2];
349 const NPI_MODULEID *module;
350 DWORD_PTR table;
351 DWORD first_arg;
352 DWORD second_arg;
353 void *key_data;
354 DWORD key_size;
355 void *rw_data;
356 DWORD rw_size;
357 void *dynamic_data;
358 DWORD dynamic_size;
359 void *static_data;
360 DWORD static_size;
361 DWORD_PTR count;
364 struct nsi_get_all_parameters_ex
366 void *unknown[2];
367 const NPI_MODULEID *module;
368 DWORD_PTR table;
369 DWORD first_arg;
370 DWORD unknown2;
371 const void *key;
372 DWORD key_size;
373 void *rw_data;
374 DWORD rw_size;
375 void *dynamic_data;
376 DWORD dynamic_size;
377 void *static_data;
378 DWORD static_size;
381 struct nsi_get_parameter_ex
383 void *unknown[2];
384 const NPI_MODULEID *module;
385 DWORD_PTR table;
386 DWORD first_arg;
387 DWORD unknown2;
388 const void *key;
389 DWORD key_size;
390 DWORD_PTR param_type;
391 void *data;
392 DWORD data_size;
393 DWORD data_offset;
396 DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWORD table, void **key_data, DWORD key_size,
397 void **rw_data, DWORD rw_size, void **dynamic_data, DWORD dynamic_size,
398 void **static_data, DWORD static_size, DWORD *count, DWORD unk2 );
399 DWORD WINAPI NsiEnumerateObjectsAllParameters( DWORD unk, DWORD unk2, const NPI_MODULEID *module, DWORD table,
400 void *key_data, DWORD key_size, void *rw_data, DWORD rw_size,
401 void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size,
402 DWORD *count );
403 DWORD WINAPI NsiEnumerateObjectsAllParametersEx( struct nsi_enumerate_all_ex *params );
404 void WINAPI NsiFreeTable( void *key_data, void *rw_data, void *dynamic_data, void *static_data );
405 DWORD WINAPI NsiGetAllParameters( DWORD unk, const NPI_MODULEID *module, DWORD table, const void *key, DWORD key_size,
406 void *rw_data, DWORD rw_size, void *dynamic_data, DWORD dynamic_size,
407 void *static_data, DWORD static_size );
408 DWORD WINAPI NsiGetAllParametersEx( struct nsi_get_all_parameters_ex *params );
409 DWORD WINAPI NsiGetParameter( DWORD unk, const NPI_MODULEID *module, DWORD table, const void *key, DWORD key_size,
410 DWORD param_type, void *data, DWORD data_size, DWORD data_offset );
411 DWORD WINAPI NsiGetParameterEx( struct nsi_get_parameter_ex *params );
413 #endif /* __WINE_NSI_H */