mshtml/tests: Test RegExp.toString on object with separate RegExp flag props.
[wine.git] / include / wine / nsi.h
blobaf35593b29cb2823bbe7cbad027e59af10d884da
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 "ws2def.h"
25 #include "ws2ipdef.h"
26 #include "winioctl.h"
28 /* Undocumented NSI NDIS tables */
29 #define NSI_NDIS_IFINFO_TABLE 0
30 #define NSI_NDIS_INDEX_LUID_TABLE 2
32 struct nsi_ndis_ifinfo_rw
34 GUID network_guid;
35 UINT admin_status;
36 IF_COUNTED_STRING alias; /* .Length in bytes not including '\0' */
37 IF_PHYSICAL_ADDRESS phys_addr;
38 USHORT pad;
39 IF_COUNTED_STRING name2;
40 UINT unk;
43 struct nsi_ndis_ifinfo_dynamic
45 UINT oper_status;
46 struct
48 UINT unk : 1;
49 UINT not_media_conn : 1;
50 UINT unk2 : 30;
51 } flags;
52 UINT media_conn_state;
53 UINT unk;
54 UINT mtu;
55 ULONG64 xmit_speed;
56 ULONG64 rcv_speed;
57 ULONG64 unk2[3];
58 ULONG64 in_discards;
59 ULONG64 in_errors;
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 out_errors;
69 ULONG64 out_discards;
70 ULONG64 in_ucast_octs;
71 ULONG64 in_mcast_octs;
72 ULONG64 in_bcast_octs;
73 ULONG64 out_ucast_octs;
74 ULONG64 out_mcast_octs;
75 ULONG64 out_bcast_octs;
76 ULONG64 unk4;
79 struct nsi_ndis_ifinfo_static
81 UINT if_index;
82 IF_COUNTED_STRING descr;
83 UINT type;
84 UINT access_type;
85 UINT unk;
86 UINT conn_type;
87 GUID if_guid;
88 USHORT conn_present;
89 IF_PHYSICAL_ADDRESS perm_phys_addr;
90 struct
92 UINT hw : 1;
93 UINT filter : 1;
94 UINT unk : 30;
95 } flags;
96 UINT media_type;
97 UINT phys_medium_type;
100 /* Undocumented NSI IP tables */
101 #define NSI_IP_COMPARTMENT_TABLE 2
102 #define NSI_IP_ICMPSTATS_TABLE 3
103 #define NSI_IP_IPSTATS_TABLE 6
104 #define NSI_IP_UNICAST_TABLE 10
105 #define NSI_IP_NEIGHBOUR_TABLE 11
106 #define NSI_IP_FORWARD_TABLE 16
108 struct nsi_ip_cmpt_rw
110 UINT not_forwarding;
111 UINT unk;
112 UINT default_ttl;
113 UINT unk2;
116 struct nsi_ip_cmpt_dynamic
118 UINT num_ifs;
119 UINT num_routes;
120 UINT unk;
121 UINT num_addrs;
124 struct nsi_ip_icmpstats_dynamic
126 UINT in_msgs;
127 UINT in_errors;
128 UINT in_type_counts[256];
129 UINT out_msgs;
130 UINT out_errors;
131 UINT out_type_counts[256];
134 struct nsi_ip_ipstats_dynamic
136 UINT unk[4];
137 ULONGLONG in_recv;
138 ULONGLONG in_octets;
139 ULONGLONG fwd_dgrams;
140 ULONGLONG in_delivers;
141 ULONGLONG out_reqs;
142 ULONGLONG unk2;
143 ULONGLONG unk3;
144 ULONGLONG out_octets;
145 ULONGLONG unk4[6];
146 ULONGLONG in_hdr_errs;
147 UINT in_addr_errs;
148 UINT in_unk_protos;
149 UINT unk5;
150 UINT reasm_reqds;
151 UINT reasm_oks;
152 UINT reasm_fails;
153 UINT in_discards;
154 UINT out_no_routes;
155 UINT out_discards;
156 UINT routing_discards;
157 UINT frag_oks;
158 UINT frag_fails;
159 UINT frag_creates;
160 UINT unk6[7];
163 struct nsi_ip_ipstats_static
165 UINT reasm_timeout;
168 struct nsi_ipv4_unicast_key
170 NET_LUID luid;
171 IN_ADDR addr;
172 UINT pad;
175 struct nsi_ipv6_unicast_key
177 NET_LUID luid;
178 IN6_ADDR addr;
181 struct nsi_ip_unicast_rw
183 UINT preferred_lifetime;
184 UINT valid_lifetime;
185 UINT prefix_origin;
186 UINT suffix_origin;
187 UINT on_link_prefix;
188 UINT unk[2];
191 struct nsi_ip_unicast_dynamic
193 UINT scope_id;
194 UINT dad_state;
197 struct nsi_ip_unicast_static
199 ULONG64 creation_time;
202 struct nsi_ipv4_neighbour_key
204 NET_LUID luid;
205 NET_LUID luid2;
206 IN_ADDR addr;
207 UINT pad;
210 struct nsi_ipv6_neighbour_key
212 NET_LUID luid;
213 NET_LUID luid2;
214 IN6_ADDR addr;
217 struct nsi_ip_neighbour_rw
219 BYTE phys_addr[IF_MAX_PHYS_ADDRESS_LENGTH];
222 struct nsi_ip_neighbour_dynamic
224 UINT state;
225 UINT time;
226 struct
228 BOOLEAN is_router;
229 BOOLEAN is_unreachable;
230 } flags;
231 USHORT phys_addr_len;
232 UINT unk;
235 struct nsi_ipv4_forward_key
237 UINT unk;
238 IN_ADDR prefix;
239 BYTE prefix_len;
240 BYTE unk2[3];
241 UINT unk3[3];
242 NET_LUID luid;
243 NET_LUID luid2;
244 IN_ADDR next_hop;
245 UINT pad;
248 struct nsi_ipv6_forward_key
250 UINT unk;
251 IN6_ADDR prefix;
252 BYTE prefix_len;
253 BYTE unk2[3];
254 UINT unk3[3];
255 UINT pad;
256 NET_LUID luid;
257 NET_LUID luid2;
258 IN6_ADDR next_hop;
261 struct nsi_ip_forward_rw
263 UINT site_prefix_len;
264 UINT valid_lifetime;
265 UINT preferred_lifetime;
266 UINT metric;
267 UINT protocol;
268 BYTE loopback;
269 BYTE autoconf;
270 BYTE publish;
271 BYTE immortal;
272 BYTE unk[4];
273 UINT unk2;
276 struct nsi_ipv4_forward_dynamic
278 UINT age;
279 UINT unk[3];
280 IN_ADDR addr2; /* often a repeat of prefix */
283 struct nsi_ipv6_forward_dynamic
285 UINT age;
286 UINT unk[3];
287 IN6_ADDR addr2; /* often a repeat of prefix */
290 struct nsi_ip_forward_static
292 UINT origin;
293 UINT if_index;
296 /* Undocumented NSI TCP tables */
297 #define NSI_TCP_STATS_TABLE 0
298 #define NSI_TCP_ALL_TABLE 3
299 #define NSI_TCP_ESTAB_TABLE 4
300 #define NSI_TCP_LISTEN_TABLE 5
302 struct nsi_tcp_stats_dynamic
304 UINT active_opens;
305 UINT passive_opens;
306 UINT attempt_fails;
307 UINT est_rsts;
308 UINT cur_est;
309 UINT pad; /* ? */
310 ULONGLONG in_segs;
311 ULONGLONG out_segs;
312 UINT retrans_segs;
313 UINT out_rsts;
314 UINT in_errs;
315 UINT num_conns;
316 UINT unk[12];
319 struct nsi_tcp_stats_static
321 UINT rto_algo;
322 UINT rto_min;
323 UINT rto_max;
324 UINT max_conns;
325 UINT unk;
328 struct nsi_tcp_conn_key
330 SOCKADDR_INET local;
331 SOCKADDR_INET remote;
334 struct nsi_tcp_conn_dynamic
336 UINT state;
337 UINT unk[4];
340 struct nsi_tcp_conn_static
342 UINT unk[3];
343 UINT pid;
344 ULONGLONG create_time;
345 ULONGLONG mod_info;
348 /* Undocumented NSI UDP tables */
349 #define NSI_UDP_STATS_TABLE 0
350 #define NSI_UDP_ENDPOINT_TABLE 1
352 struct nsi_udp_stats_dynamic
354 ULONGLONG in_dgrams;
355 UINT no_ports;
356 UINT in_errs;
357 ULONGLONG out_dgrams;
358 UINT num_addrs;
359 UINT unk[5];
362 struct nsi_udp_endpoint_key
364 SOCKADDR_INET local;
367 struct nsi_udp_endpoint_static
369 UINT pid;
370 UINT unk;
371 ULONGLONG create_time;
372 UINT flags;
373 UINT unk2;
374 ULONGLONG mod_info;
377 /* Wine specific ioctl interface */
379 #define IOCTL_NSIPROXY_WINE_ENUMERATE_ALL CTL_CODE(FILE_DEVICE_NETWORK, 0x400, METHOD_BUFFERED, 0)
380 #define IOCTL_NSIPROXY_WINE_GET_ALL_PARAMETERS CTL_CODE(FILE_DEVICE_NETWORK, 0x401, METHOD_BUFFERED, 0)
381 #define IOCTL_NSIPROXY_WINE_GET_PARAMETER CTL_CODE(FILE_DEVICE_NETWORK, 0x402, METHOD_BUFFERED, 0)
382 #define IOCTL_NSIPROXY_WINE_ICMP_ECHO CTL_CODE(FILE_DEVICE_NETWORK, 0x403, METHOD_BUFFERED, 0)
384 /* input for IOCTL_NSIPROXY_WINE_ENUMERATE_ALL */
385 struct nsiproxy_enumerate_all
387 NPI_MODULEID module;
388 UINT first_arg;
389 UINT second_arg;
390 UINT table;
391 UINT key_size;
392 UINT rw_size;
393 UINT dynamic_size;
394 UINT static_size;
395 UINT count;
398 /* input for IOCTL_NSIPROXY_WINE_GET_ALL_PARAMETERS */
399 struct nsiproxy_get_all_parameters
401 NPI_MODULEID module;
402 UINT first_arg;
403 UINT table;
404 UINT key_size;
405 UINT rw_size;
406 UINT dynamic_size;
407 UINT static_size;
408 BYTE key[1]; /* key_size */
411 /* input for IOCTL_NSIPROXY_WINE_GET_PARAMETER */
412 struct nsiproxy_get_parameter
414 NPI_MODULEID module;
415 UINT first_arg;
416 UINT table;
417 UINT key_size;
418 UINT param_type;
419 UINT data_offset;
420 BYTE key[1]; /* key_size */
423 /* input for IOCTL_NSIPROXY_WINE_ICMP_ECHO */
424 struct nsiproxy_icmp_echo
426 SOCKADDR_INET src;
427 SOCKADDR_INET dst;
428 ULONGLONG user_reply_ptr;
429 BYTE bits;
430 BYTE ttl;
431 BYTE tos;
432 BYTE flags;
433 UINT opt_size;
434 UINT req_size;
435 UINT timeout;
436 BYTE data[1]; /* ((opt_size + 3) & ~3) + req_size */
439 /* Undocumented Nsi api */
441 #define NSI_PARAM_TYPE_RW 0
442 #define NSI_PARAM_TYPE_DYNAMIC 1
443 #define NSI_PARAM_TYPE_STATIC 2
445 struct nsi_enumerate_all_ex
447 void *unknown[2];
448 const NPI_MODULEID *module;
449 UINT_PTR table;
450 UINT first_arg;
451 UINT second_arg;
452 void *key_data;
453 UINT key_size;
454 void *rw_data;
455 UINT rw_size;
456 void *dynamic_data;
457 UINT dynamic_size;
458 void *static_data;
459 UINT static_size;
460 UINT_PTR count;
463 struct nsi_get_all_parameters_ex
465 void *unknown[2];
466 const NPI_MODULEID *module;
467 UINT_PTR table;
468 UINT first_arg;
469 UINT unknown2;
470 const void *key;
471 UINT key_size;
472 void *rw_data;
473 UINT rw_size;
474 void *dynamic_data;
475 UINT dynamic_size;
476 void *static_data;
477 UINT static_size;
480 struct nsi_get_parameter_ex
482 void *unknown[2];
483 const NPI_MODULEID *module;
484 UINT_PTR table;
485 UINT first_arg;
486 UINT unknown2;
487 const void *key;
488 UINT key_size;
489 UINT_PTR param_type;
490 void *data;
491 UINT data_size;
492 UINT data_offset;
495 DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWORD table, void **key_data, DWORD key_size,
496 void **rw_data, DWORD rw_size, void **dynamic_data, DWORD dynamic_size,
497 void **static_data, DWORD static_size, DWORD *count, DWORD unk2 );
498 DWORD WINAPI NsiEnumerateObjectsAllParameters( DWORD unk, DWORD unk2, const NPI_MODULEID *module, DWORD table,
499 void *key_data, DWORD key_size, void *rw_data, DWORD rw_size,
500 void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size,
501 DWORD *count );
502 DWORD WINAPI NsiEnumerateObjectsAllParametersEx( struct nsi_enumerate_all_ex *params );
503 void WINAPI NsiFreeTable( void *key_data, void *rw_data, void *dynamic_data, void *static_data );
504 DWORD WINAPI NsiGetAllParameters( DWORD unk, const NPI_MODULEID *module, DWORD table, const void *key, DWORD key_size,
505 void *rw_data, DWORD rw_size, void *dynamic_data, DWORD dynamic_size,
506 void *static_data, DWORD static_size );
507 DWORD WINAPI NsiGetAllParametersEx( struct nsi_get_all_parameters_ex *params );
508 DWORD WINAPI NsiGetParameter( DWORD unk, const NPI_MODULEID *module, DWORD table, const void *key, DWORD key_size,
509 DWORD param_type, void *data, DWORD data_size, DWORD data_offset );
510 DWORD WINAPI NsiGetParameterEx( struct nsi_get_parameter_ex *params );
512 #endif /* __WINE_NSI_H */