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
24 /* Undocumented NSI NDIS tables */
25 #define NSI_NDIS_IFINFO_TABLE 0
26 #define NSI_NDIS_INDEX_LUID_TABLE 2
28 struct nsi_ndis_ifinfo_rw
32 IF_COUNTED_STRING alias
; /* .Length in bytes not including '\0' */
33 IF_PHYSICAL_ADDRESS phys_addr
;
35 IF_COUNTED_STRING name2
;
39 struct nsi_ndis_ifinfo_dynamic
45 DWORD not_media_conn
: 1;
48 DWORD media_conn_state
;
59 ULONG64 in_ucast_pkts
;
60 ULONG64 in_mcast_pkts
;
61 ULONG64 in_bcast_pkts
;
63 ULONG64 out_ucast_pkts
;
64 ULONG64 out_mcast_pkts
;
65 ULONG64 out_bcast_pkts
;
67 ULONG64 in_ucast_octs
;
68 ULONG64 in_mcast_octs
;
69 ULONG64 in_bcast_octs
;
70 ULONG64 out_ucast_octs
;
71 ULONG64 out_mcast_octs
;
72 ULONG64 out_bcast_octs
;
76 struct nsi_ndis_ifinfo_static
79 IF_COUNTED_STRING descr
;
86 IF_PHYSICAL_ADDRESS perm_phys_addr
;
94 DWORD phys_medium_type
;
97 /* Wine specific ioctl interface */
99 #define IOCTL_NSIPROXY_WINE_ENUMERATE_ALL CTL_CODE(FILE_DEVICE_NETWORK, 0x400, METHOD_BUFFERED, 0)
100 #define IOCTL_NSIPROXY_WINE_GET_ALL_PARAMETERS CTL_CODE(FILE_DEVICE_NETWORK, 0x401, METHOD_BUFFERED, 0)
101 #define IOCTL_NSIPROXY_WINE_GET_PARAMETER CTL_CODE(FILE_DEVICE_NETWORK, 0x402, METHOD_BUFFERED, 0)
103 /* input for IOCTL_NSIPROXY_WINE_ENUMERATE_ALL */
104 struct nsiproxy_enumerate_all
117 /* input for IOCTL_NSIPROXY_WINE_GET_ALL_PARAMETERS */
118 struct nsiproxy_get_all_parameters
127 BYTE key
[1]; /* key_size */
130 /* input for IOCTL_NSIPROXY_WINE_GET_PARAMETER */
131 struct nsiproxy_get_parameter
139 BYTE key
[1]; /* key_size */
142 /* Undocumented Nsi api */
144 #define NSI_PARAM_TYPE_RW 0
145 #define NSI_PARAM_TYPE_DYNAMIC 1
146 #define NSI_PARAM_TYPE_STATIC 2
148 struct nsi_enumerate_all_ex
151 const NPI_MODULEID
*module
;
166 struct nsi_get_all_parameters_ex
169 const NPI_MODULEID
*module
;
183 struct nsi_get_parameter_ex
186 const NPI_MODULEID
*module
;
192 DWORD_PTR param_type
;
198 DWORD WINAPI
NsiAllocateAndGetTable( DWORD unk
, const NPI_MODULEID
*module
, DWORD table
, void **key_data
, DWORD key_size
,
199 void **rw_data
, DWORD rw_size
, void **dynamic_data
, DWORD dynamic_size
,
200 void **static_data
, DWORD static_size
, DWORD
*count
, DWORD unk2
);
201 DWORD WINAPI
NsiEnumerateObjectsAllParameters( DWORD unk
, DWORD unk2
, const NPI_MODULEID
*module
, DWORD table
,
202 void *key_data
, DWORD key_size
, void *rw_data
, DWORD rw_size
,
203 void *dynamic_data
, DWORD dynamic_size
, void *static_data
, DWORD static_size
,
205 DWORD WINAPI
NsiEnumerateObjectsAllParametersEx( struct nsi_enumerate_all_ex
*params
);
206 void WINAPI
NsiFreeTable( void *key_data
, void *rw_data
, void *dynamic_data
, void *static_data
);
207 DWORD WINAPI
NsiGetAllParameters( DWORD unk
, const NPI_MODULEID
*module
, DWORD table
, const void *key
, DWORD key_size
,
208 void *rw_data
, DWORD rw_size
, void *dynamic_data
, DWORD dynamic_size
,
209 void *static_data
, DWORD static_size
);
210 DWORD WINAPI
NsiGetAllParametersEx( struct nsi_get_all_parameters_ex
*params
);
211 DWORD WINAPI
NsiGetParameter( DWORD unk
, const NPI_MODULEID
*module
, DWORD table
, const void *key
, DWORD key_size
,
212 DWORD param_type
, void *data
, DWORD data_size
, DWORD data_offset
);
213 DWORD WINAPI
NsiGetParameterEx( struct nsi_get_parameter_ex
*params
);
215 #endif /* __WINE_NSI_H */