|
From: evanescent <coo...@gm...> - 2009-08-24 10:28:00
|
Hi All,
I am trying to write a C program which retrieve the network interfaces in
windows.
But i am writing this on Linux and using mingw to complete it for windows.
But when I compile using $ i586-mingw32msvc-gcc -o adapter_listner.exe
adapter_listner.c where adapter_listner.c is the source file.
I have included the necessary header files also.
[code]
#include <stdio.h>
#include <winsock2.h>
#include <iphlpapi.h>
int get_adapter_list();
int main(int argc , char *argv[])
{
get_adapter_list();
}
int get_adapter_list()
{
#ifdef __linux__
#elif _WIN32
printf("\nListning network interfaces\n");
PIP_ADAPTER_ADDRESSES adapter_addrs;
// GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen);
#endif //__linux__
return 0;
}
[/code]
thanks
|