Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Porting getifaddrs to Win XP

I'm trying to port a MacOSX app to windows and I've come up against a problem around getifaddrs. Basically windows does not support it. I'm trying to figure a way to re-implement it (for AF_INET and AF_INET6) but the "equivalent" functionality on windows appears to be nothing like the MacOSX support.

Has someone done this sort of conversion before? If so is there a nice way I can get windows to report me interface info like MacOSX does?

like image 705
Goz Avatar asked Jun 18 '10 11:06

Goz


1 Answers

The closest functions on Windows are GetAdaptersInfo and GetAdaptersAddresses. The MSDN documentation is pretty comprehensive, so you should find everything you need.

like image 77
Laurent Etiemble Avatar answered Nov 10 '22 11:11

Laurent Etiemble