Huw Davies (@huw) commented about dlls/nsiproxy.sys/ip.c:
unsigned int i, j;
TRACE( "%p %d %p %d %p %d %p %d %p\n", key_data, key_size, rw_data, rw_size, dynamic_data, dynamic_size, static_data, static_size, count );
iface_count = 0;
if ((status = nsi_enumerate_all( 1, 0, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, NULL, 0, NULL, 0,
NULL, 0, NULL, 0, &iface_count )))
return status;
if (!(iface_static = malloc( iface_count * sizeof(*iface_static) )))
return STATUS_NO_MEMORY;
if ((status = nsi_enumerate_all( 1, 0, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, NULL, 0, NULL, 0,
NULL, 0, iface_static, sizeof(*iface_static), &iface_count ))
&& status != STATUS_BUFFER_OVERFLOW)
The keys for this table are the interfaces' `NET_LUID`s, so if you retrieved those too, you wouldn't need to do the index->luid conversion later on.