In windows networking (WNet), the first level of enumeration gets you a list of network providers...
On my Win7 and XP boxes this is what I get....
Code:
Microsoft Terminal Services
Microsoft Windows Network
Web Client Network
Here's the Windows code...
Code:
// enumerate lan resources
#include <windows.h>
#include <stdio.h>
int _cdecl main (void)
{ HANDLE hn;
PVOID buf = malloc(1024);
DWORD idx = 1;
NETRESOURCE net = {0};
DWORD sbuf = 1024;
WIN32_FIND_DATA fd = {0};
HANDLE fh;
CHAR vn[MAX_PATH];
net.lpRemoteName = "";
if (WNetOpenEnum(RESOURCE_GLOBALNET,RESOURCETYPE_ANY,RESOURCEUSAGE_ALL,&net,&hn))
{ puts("Enum not open");
return 0; }
while(! WNetEnumResource(hn,&idx,buf,&sbuf))
printf("%s\n", ((LPNETRESOURCE) buf)->lpRemoteName);
WNetCloseEnum(hn);
free(buf);
puts("");
return 0; }
I would be very interested to see what comes back with Windows + Linux, Windows + Mac etc. on the same network...