ddraw/tests: Move the capability tests for enumerated devices.
[wine.git] / dlls / nsiproxy.sys / ndis.c
blobc34630d8aec9f177f4f138cc074090d6f36f1101
1 /*
2 * nsiproxy.sys ndis module
4 * Copyright 2003, 2006, 2011 Juan Lang
5 * Copyright 2021 Huw Davies
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #if 0
22 #pragma makedep unix
23 #endif
25 #include "config.h"
27 #include <stdarg.h>
28 #include <sys/types.h>
29 #include <sys/socket.h>
30 #include <sys/ioctl.h>
31 #include <unistd.h>
33 #ifdef HAVE_NET_IF_H
34 #include <net/if.h>
35 #endif
37 #ifdef HAVE_NET_IF_ARP_H
38 #include <net/if_arp.h>
39 #endif
41 #ifdef HAVE_NETINET_IN_H
42 #include <netinet/in.h>
43 #endif
45 #ifdef HAVE_NETINET_IF_ETHER_H
46 #include <netinet/if_ether.h>
47 #endif
49 #ifdef HAVE_NET_ROUTE_H
50 #include <net/route.h>
51 #endif
53 #ifdef HAVE_SYS_SYSCTL_H
54 #include <sys/sysctl.h>
55 #endif
57 #ifdef HAVE_NET_IF_DL_H
58 #include <net/if_dl.h>
59 #endif
61 #ifdef HAVE_NET_IF_TYPES_H
62 #include <net/if_types.h>
63 #endif
65 #include <pthread.h>
67 #define NONAMELESSUNION
68 #include "ntstatus.h"
69 #define WIN32_NO_STATUS
70 #include "windef.h"
71 #include "winbase.h"
72 #include "winternl.h"
73 #include "winioctl.h"
74 #define USE_WS_PREFIX
75 #include "winsock2.h"
76 #include "ws2ipdef.h"
77 #include "nldef.h"
78 #include "ifdef.h"
79 #include "netiodef.h"
80 #include "ddk/wdm.h"
81 #include "wine/nsi.h"
82 #include "wine/list.h"
83 #include "wine/debug.h"
84 #include "wine/unixlib.h"
86 #include "unix_private.h"
88 WINE_DEFAULT_DEBUG_CHANNEL(nsi);
90 struct if_entry
92 struct list entry;
93 GUID if_guid;
94 NET_LUID if_luid;
95 WCHAR *if_name;
96 char if_unix_name[IFNAMSIZ];
97 IF_PHYSICAL_ADDRESS if_phys_addr;
98 UINT if_index;
99 UINT if_type;
102 static struct list if_list = LIST_INIT( if_list );
103 static pthread_mutex_t if_list_lock = PTHREAD_MUTEX_INITIALIZER;
105 static struct if_entry *find_entry_from_index( UINT index )
107 struct if_entry *entry;
109 LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
110 if (entry->if_index == index) return entry;
112 return NULL;
115 static struct if_entry *find_entry_from_luid( const NET_LUID *luid )
117 struct if_entry *entry;
119 LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
120 if (entry->if_luid.Value == luid->Value) return entry;
122 return NULL;
125 #if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR)
126 static NTSTATUS if_get_physical( const char *name, UINT *type, IF_PHYSICAL_ADDRESS *phys_addr )
128 int fd, size, i;
129 struct ifreq ifr;
130 NTSTATUS ret = STATUS_SUCCESS;
131 static const struct type_lookup
133 unsigned short ifi_type;
134 IFTYPE mib_type;
135 UINT addr_len;
136 } types[] =
138 { ARPHRD_LOOPBACK, MIB_IF_TYPE_LOOPBACK, 0 },
139 { ARPHRD_ETHER, MIB_IF_TYPE_ETHERNET, ETH_ALEN },
140 { ARPHRD_FDDI, MIB_IF_TYPE_FDDI, ETH_ALEN },
141 { ARPHRD_IEEE802, MIB_IF_TYPE_TOKENRING, ETH_ALEN },
142 { ARPHRD_IEEE802_TR, MIB_IF_TYPE_TOKENRING, ETH_ALEN },
143 { ARPHRD_SLIP, MIB_IF_TYPE_SLIP, 0 },
144 { ARPHRD_PPP, MIB_IF_TYPE_PPP, 0 }
147 *type = MIB_IF_TYPE_OTHER;
148 memset( phys_addr, 0, sizeof(*phys_addr) );
150 size = strlen( name ) + 1;
151 if (size > sizeof(ifr.ifr_name)) return STATUS_NAME_TOO_LONG;
152 memset( &ifr, 0, sizeof(ifr) );
153 memcpy( ifr.ifr_name, name, size );
155 fd = socket( PF_INET, SOCK_DGRAM, 0 );
156 if (fd == -1) return STATUS_TOO_MANY_OPENED_FILES;
158 if (ioctl( fd, SIOCGIFHWADDR, &ifr ))
160 ret = STATUS_DEVICE_DATA_ERROR;
161 goto err;
164 for (i = 0; i < ARRAY_SIZE(types); i++)
165 if (ifr.ifr_hwaddr.sa_family == types[i].ifi_type)
167 *type = types[i].mib_type;
168 phys_addr->Length = types[i].addr_len;
169 memcpy( phys_addr->Address, ifr.ifr_hwaddr.sa_data, phys_addr->Length );
170 break;
173 err:
174 close( fd );
175 return ret;
178 #elif defined (HAVE_SYS_SYSCTL_H) && defined (HAVE_NET_IF_DL_H)
180 static NTSTATUS if_get_physical( const char *name, UINT *type, IF_PHYSICAL_ADDRESS *phys_addr )
182 struct if_msghdr *ifm;
183 struct sockaddr_dl *sdl;
184 u_char *p, *buf;
185 size_t mib_len;
186 int mib[] = { CTL_NET, AF_ROUTE, 0, AF_LINK, NET_RT_IFLIST, 0 }, i;
187 static const struct type_lookup
189 u_char sdl_type;
190 IFTYPE mib_type;
191 } types[] =
193 { IFT_ETHER, MIB_IF_TYPE_ETHERNET },
194 { IFT_FDDI, MIB_IF_TYPE_FDDI },
195 { IFT_ISO88024, MIB_IF_TYPE_TOKENRING },
196 { IFT_ISO88025, MIB_IF_TYPE_TOKENRING },
197 { IFT_PPP, MIB_IF_TYPE_PPP },
198 { IFT_SLIP, MIB_IF_TYPE_SLIP },
199 { IFT_LOOP, MIB_IF_TYPE_LOOPBACK }
202 *type = MIB_IF_TYPE_OTHER;
203 memset( phys_addr, 0, sizeof(*phys_addr) );
205 if (sysctl( mib, 6, NULL, &mib_len, NULL, 0 ) < 0) return STATUS_TOO_MANY_OPENED_FILES;
207 buf = malloc( mib_len );
208 if (!buf) return STATUS_NO_MEMORY;
210 if (sysctl( mib, 6, buf, &mib_len, NULL, 0 ) < 0)
212 free( buf );
213 return STATUS_TOO_MANY_OPENED_FILES;
216 for (p = buf; p < buf + mib_len; p += ifm->ifm_msglen)
218 ifm = (struct if_msghdr *)p;
219 sdl = (struct sockaddr_dl *)(ifm + 1);
221 if (ifm->ifm_type != RTM_IFINFO || (ifm->ifm_addrs & RTA_IFP) == 0) continue;
223 if (sdl->sdl_family != AF_LINK || sdl->sdl_nlen == 0 ||
224 memcmp( sdl->sdl_data, name, max( sdl->sdl_nlen, strlen( name ) ) ))
225 continue;
227 for (i = 0; i < ARRAY_SIZE(types); i++)
228 if (sdl->sdl_type == types[i].sdl_type)
230 *type = types[i].mib_type;
231 break;
234 phys_addr->Length = sdl->sdl_alen;
235 if (phys_addr->Length > sizeof(phys_addr->Address)) phys_addr->Length = 0;
236 memcpy( phys_addr->Address, LLADDR(sdl), phys_addr->Length );
237 break;
240 free( buf );
241 return STATUS_SUCCESS;
243 #endif
245 static WCHAR *strdupAtoW( const char *str )
247 WCHAR *ret = NULL;
248 SIZE_T len;
250 if (!str) return ret;
251 len = strlen( str ) + 1;
252 ret = malloc( len * sizeof(WCHAR) );
253 if (ret) ntdll_umbstowcs( str, len, ret, len );
254 return ret;
257 static struct if_entry *add_entry( UINT index, char *name )
259 struct if_entry *entry;
260 int name_len = strlen( name );
262 if (name_len >= sizeof(entry->if_unix_name)) return NULL;
263 entry = malloc( sizeof(*entry) );
264 if (!entry) return NULL;
266 entry->if_index = index;
267 memcpy( entry->if_unix_name, name, name_len + 1 );
268 entry->if_name = strdupAtoW( name );
269 if (!entry->if_name)
271 free( entry );
272 return NULL;
275 if_get_physical( name, &entry->if_type, &entry->if_phys_addr );
277 entry->if_luid.Info.Reserved = 0;
278 entry->if_luid.Info.NetLuidIndex = index;
279 entry->if_luid.Info.IfType = entry->if_type;
281 memset( &entry->if_guid, 0, sizeof(entry->if_guid) );
282 entry->if_guid.Data1 = index;
283 memcpy( entry->if_guid.Data4 + 2, "NetDev", 6 );
285 list_add_tail( &if_list, &entry->entry );
286 return entry;
289 static unsigned int update_if_table( void )
291 struct if_nameindex *indices = if_nameindex(), *entry;
292 unsigned int append_count = 0;
294 for (entry = indices; entry->if_index; entry++)
296 if (!find_entry_from_index( entry->if_index ) && add_entry( entry->if_index, entry->if_name ))
297 ++append_count;
300 if_freenameindex( indices );
301 return append_count;
304 static void if_counted_string_init( IF_COUNTED_STRING *str, const WCHAR *value )
306 str->Length = value ? min( lstrlenW( value ), ARRAY_SIZE(str->String) - 1 ) * sizeof(WCHAR) : 0;
307 if (str->Length) memcpy( str->String, value, str->Length );
308 memset( (char *)str->String + str->Length, 0, sizeof(str->String) - str->Length );
311 static void ifinfo_fill_dynamic( struct if_entry *entry, struct nsi_ndis_ifinfo_dynamic *data )
313 int fd, name_len = strlen( entry->if_unix_name );
314 struct ifreq req;
316 memset( data, 0, sizeof(*data) );
318 if (name_len >= sizeof(req.ifr_name)) return;
319 memcpy( req.ifr_name, entry->if_unix_name, name_len + 1 );
321 fd = socket( PF_INET, SOCK_DGRAM, 0 );
322 if (fd == -1) return;
324 if (!ioctl( fd, SIOCGIFFLAGS, &req ))
326 if (req.ifr_flags & IFF_UP) data->oper_status = IfOperStatusUp;
327 #ifdef IFF_DORMANT
328 else if (req.ifr_flags & IFF_DORMANT) data->oper_status = IfOperStatusDormant;
329 #endif
330 else data->oper_status = IfOperStatusDown;
331 } else data->oper_status = IfOperStatusUnknown;
333 data->flags.unk = 0;
334 data->flags.not_media_conn = 0;
335 data->flags.unk2 = 0;
336 #ifdef __linux__
338 char filename[64];
339 FILE *fp;
341 sprintf( filename, "/sys/class/net/%s/carrier", entry->if_unix_name );
342 if (!(fp = fopen( filename, "r" ))) data->media_conn_state = MediaConnectStateUnknown;
343 else
345 if (fgetc( fp ) == '1') data->media_conn_state = MediaConnectStateConnected;
346 else data->media_conn_state = MediaConnectStateDisconnected;
347 fclose( fp );
350 #else
351 data->media_conn_state = MediaConnectStateConnected;
352 #endif
353 data->unk = 0;
355 if (!ioctl( fd, SIOCGIFMTU, &req )) data->mtu = req.ifr_mtu;
356 else data->mtu = 0;
358 close( fd );
360 #ifdef __linux__
362 FILE *fp;
364 if ((fp = fopen( "/proc/net/dev", "r" )))
366 char buf[512], *ptr;
368 while ((ptr = fgets( buf, sizeof(buf), fp )))
370 while (*ptr && isspace( *ptr )) ptr++;
371 if (!ascii_strncasecmp( ptr, entry->if_unix_name, name_len ) && ptr[name_len] == ':')
373 unsigned long long values[9];
374 ptr += name_len + 1;
375 sscanf( ptr, "%llu %llu %llu %llu %*u %*u %*u %llu %llu %llu %llu %llu",
376 values, values + 1, values + 2, values + 3, values + 4,
377 values + 5, values + 6, values + 7, values + 8 );
378 data->in_octets = values[0];
379 data->in_ucast_pkts = values[1];
380 data->in_errors = values[2];
381 data->in_discards = values[3];
382 data->in_mcast_pkts = values[4];
383 data->out_octets = values[5];
384 data->out_ucast_pkts = values[6];
385 data->out_errors = values[7];
386 data->out_discards = values[8];
387 break;
390 fclose( fp );
393 #elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_IFLIST)
395 int mib[] = { CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_IFLIST, entry->if_index };
396 size_t needed;
397 char *buf = NULL, *end;
398 struct if_msghdr *ifm;
399 struct if_data ifdata;
401 if (sysctl( mib, ARRAY_SIZE(mib), NULL, &needed, NULL, 0 ) == -1) goto done;
402 buf = malloc( needed );
403 if (!buf) goto done;
404 if (sysctl( mib, ARRAY_SIZE(mib), buf, &needed, NULL, 0 ) == -1) goto done;
405 for (end = buf + needed; buf < end; buf += ifm->ifm_msglen)
407 ifm = (struct if_msghdr *) buf;
408 if (ifm->ifm_type == RTM_IFINFO)
410 ifdata = ifm->ifm_data;
411 data->xmit_speed = data->rcv_speed = ifdata.ifi_baudrate;
412 data->in_octets = ifdata.ifi_ibytes;
413 data->in_errors = ifdata.ifi_ierrors;
414 data->in_discards = ifdata.ifi_iqdrops;
415 data->in_ucast_pkts = ifdata.ifi_ipackets;
416 data->in_mcast_pkts = ifdata.ifi_imcasts;
417 data->out_octets = ifdata.ifi_obytes;
418 data->out_ucast_pkts = ifdata.ifi_opackets;
419 data->out_mcast_pkts = ifdata.ifi_omcasts;
420 data->out_errors = ifdata.ifi_oerrors;
421 break;
424 done:
425 free( buf );
427 #endif
430 static void ifinfo_fill_entry( struct if_entry *entry, NET_LUID *key, struct nsi_ndis_ifinfo_rw *rw,
431 struct nsi_ndis_ifinfo_dynamic *dyn, struct nsi_ndis_ifinfo_static *stat )
433 if (key) memcpy( key, &entry->if_luid, sizeof(entry->if_luid) );
435 if (rw)
437 memset( &rw->network_guid, 0, sizeof(entry->if_guid) );
438 rw->admin_status = MIB_IF_ADMIN_STATUS_UP;
439 if_counted_string_init( &rw->alias, entry->if_name );
440 memcpy( &rw->phys_addr, &entry->if_phys_addr, sizeof(entry->if_phys_addr) );
441 rw->pad = 0;
442 if_counted_string_init( &rw->name2, NULL );
443 rw->unk = 0;
446 if (dyn) ifinfo_fill_dynamic( entry, dyn );
448 if (stat)
450 stat->if_index = entry->if_index;
451 if_counted_string_init( &stat->descr, entry->if_name ); /* get a more descriptive name */
452 stat->type = entry->if_type;
453 stat->access_type = (entry->if_type == MIB_IF_TYPE_LOOPBACK) ? NET_IF_ACCESS_LOOPBACK : NET_IF_ACCESS_BROADCAST;
454 stat->unk = 0;
455 stat->conn_type = NET_IF_CONNECTION_DEDICATED;
456 memcpy( &stat->if_guid, &entry->if_guid, sizeof(entry->if_guid) );
457 stat->conn_present = entry->if_type != MIB_IF_TYPE_LOOPBACK;
458 memcpy( &stat->perm_phys_addr, &entry->if_phys_addr, sizeof(entry->if_phys_addr) );
459 stat->flags.hw = entry->if_type != MIB_IF_TYPE_LOOPBACK;
460 stat->flags.filter = 0;
461 stat->flags.unk = 0;
462 stat->media_type = 0;
463 stat->phys_medium_type = 0;
467 static NTSTATUS ifinfo_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
468 void *dynamic_data, UINT dynamic_size,
469 void *static_data, UINT static_size, UINT_PTR *count )
471 struct if_entry *entry;
472 UINT num = 0;
473 NTSTATUS status = STATUS_SUCCESS;
474 BOOL want_data = key_size || rw_size || dynamic_size || static_size;
476 TRACE( "%p %d %p %d %p %d %p %d %p\n", key_data, key_size, rw_data, rw_size,
477 dynamic_data, dynamic_size, static_data, static_size, count );
479 pthread_mutex_lock( &if_list_lock );
481 update_if_table();
483 LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
485 if (num < *count)
487 ifinfo_fill_entry( entry, key_data, rw_data, dynamic_data, static_data );
488 key_data = (BYTE *)key_data + key_size;
489 rw_data = (BYTE *)rw_data + rw_size;
490 dynamic_data = (BYTE *)dynamic_data + dynamic_size;
491 static_data = (BYTE *)static_data + static_size;
493 num++;
496 pthread_mutex_unlock( &if_list_lock );
498 if (!want_data || num <= *count) *count = num;
499 else status = STATUS_BUFFER_OVERFLOW;
501 return status;
504 static NTSTATUS ifinfo_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
505 void *dynamic_data, UINT dynamic_size,
506 void *static_data, UINT static_size )
508 struct if_entry *entry;
509 NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
511 TRACE( "%p %d %p %d %p %d %p %d\n", key, key_size, rw_data, rw_size,
512 dynamic_data, dynamic_size, static_data, static_size );
514 pthread_mutex_lock( &if_list_lock );
516 if (!(entry = find_entry_from_luid( (const NET_LUID *)key )))
518 update_if_table();
519 entry = find_entry_from_luid( (const NET_LUID *)key );
521 if (entry)
523 ifinfo_fill_entry( entry, NULL, rw_data, dynamic_data, static_data );
524 status = STATUS_SUCCESS;
527 pthread_mutex_unlock( &if_list_lock );
529 return status;
532 static NTSTATUS ifinfo_get_rw_parameter( struct if_entry *entry, void *data, UINT data_size, UINT data_offset )
534 switch (data_offset)
536 case FIELD_OFFSET( struct nsi_ndis_ifinfo_rw, alias ):
538 IF_COUNTED_STRING *str = (IF_COUNTED_STRING *)data;
539 if (data_size != sizeof(*str)) return STATUS_INVALID_PARAMETER;
540 if_counted_string_init( str, entry->if_name );
541 return STATUS_SUCCESS;
543 default:
544 FIXME( "Offset %#x not handled\n", data_offset );
547 return STATUS_INVALID_PARAMETER;
550 static NTSTATUS ifinfo_get_static_parameter( struct if_entry *entry, void *data, UINT data_size, UINT data_offset )
552 switch (data_offset)
554 case FIELD_OFFSET( struct nsi_ndis_ifinfo_static, if_index ):
555 if (data_size != sizeof(UINT)) return STATUS_INVALID_PARAMETER;
556 *(UINT *)data = entry->if_index;
557 return STATUS_SUCCESS;
559 case FIELD_OFFSET( struct nsi_ndis_ifinfo_static, if_guid ):
560 if (data_size != sizeof(GUID)) return STATUS_INVALID_PARAMETER;
561 *(GUID *)data = entry->if_guid;
562 return STATUS_SUCCESS;
564 default:
565 FIXME( "Offset %#x not handled\n", data_offset );
567 return STATUS_INVALID_PARAMETER;
570 static NTSTATUS ifinfo_get_parameter( const void *key, UINT key_size, UINT param_type,
571 void *data, UINT data_size, UINT data_offset )
573 struct if_entry *entry;
574 NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
576 TRACE( "%p %d %d %p %d %d\n", key, key_size, param_type, data, data_size, data_offset );
578 pthread_mutex_lock( &if_list_lock );
580 if (!(entry = find_entry_from_luid( (const NET_LUID *)key )))
582 update_if_table();
583 entry = find_entry_from_luid( (const NET_LUID *)key );
585 if (entry)
587 switch (param_type)
589 case NSI_PARAM_TYPE_RW:
590 status = ifinfo_get_rw_parameter( entry, data, data_size, data_offset );
591 break;
592 case NSI_PARAM_TYPE_STATIC:
593 status = ifinfo_get_static_parameter( entry, data, data_size, data_offset );
594 break;
598 pthread_mutex_unlock( &if_list_lock );
600 return status;
603 static NTSTATUS index_luid_get_parameter( const void *key, UINT key_size, UINT param_type,
604 void *data, UINT data_size, UINT data_offset )
606 struct if_entry *entry;
607 NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
609 TRACE( "%p %d %d %p %d %d\n", key, key_size, param_type, data, data_size, data_offset );
611 if (param_type != NSI_PARAM_TYPE_STATIC || data_size != sizeof(NET_LUID) || data_offset != 0)
612 return STATUS_INVALID_PARAMETER;
614 pthread_mutex_lock( &if_list_lock );
616 if (!(entry = find_entry_from_index( *(UINT *)key )))
618 update_if_table();
619 entry = find_entry_from_index( *(UINT *)key );
621 if (entry)
623 *(NET_LUID *)data = entry->if_luid;
624 status = STATUS_SUCCESS;
626 pthread_mutex_unlock( &if_list_lock );
627 return status;
630 BOOL convert_unix_name_to_luid( const char *unix_name, NET_LUID *luid )
632 struct if_entry *entry;
633 BOOL ret = FALSE;
634 int updated = 0;
636 pthread_mutex_lock( &if_list_lock );
640 LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
642 if (!strcmp( entry->if_unix_name, unix_name ))
644 *luid = entry->if_luid;
645 ret = TRUE;
646 goto done;
649 } while (!updated++ && update_if_table());
651 done:
652 pthread_mutex_unlock( &if_list_lock );
654 return ret;
657 BOOL convert_luid_to_unix_name( const NET_LUID *luid, const char **unix_name )
659 struct if_entry *entry;
660 BOOL ret = FALSE;
661 int updated = 0;
663 pthread_mutex_lock( &if_list_lock );
667 LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
669 if (entry->if_luid.Value == luid->Value)
671 *unix_name = entry->if_unix_name;
672 ret = TRUE;
673 goto done;
676 } while (!updated++ && update_if_table());
678 done:
679 pthread_mutex_unlock( &if_list_lock );
681 return ret;
684 static const struct module_table tables[] =
687 NSI_NDIS_IFINFO_TABLE,
689 sizeof(NET_LUID), sizeof(struct nsi_ndis_ifinfo_rw),
690 sizeof(struct nsi_ndis_ifinfo_dynamic), sizeof(struct nsi_ndis_ifinfo_static)
692 ifinfo_enumerate_all,
693 ifinfo_get_all_parameters,
694 ifinfo_get_parameter
697 NSI_NDIS_INDEX_LUID_TABLE,
699 sizeof(UINT), 0,
700 0, sizeof(NET_LUID)
702 NULL,
703 NULL,
704 index_luid_get_parameter
706 { ~0u }
709 const struct module ndis_module =
711 &NPI_MS_NDIS_MODULEID,
712 tables