我试图将MacOSX应用程序移植到windows,我已经提出了一个关于getifaddrs的问题。基本上windows不支持它。我想设法重新实现它(对于AF_INET和AF_INET6),但Windows上的等效功能似乎没有像MacOSX的支持。
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.
以前有人做过这种类型的转换吗?如果是这样,有一个很好的方法,我可以得到窗口报告我的接口信息,像MacOSX吗?
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?
推荐答案是 GetAdaptersInfo 和 GetAdaptersAddresses 。 MSDN文档是相当全面的,所以你应该找到你需要的一切。
The closest functions on Windows are GetAdaptersInfo and GetAdaptersAddresses. The MSDN documentation is pretty comprehensive, so you should find everything you need.
更多推荐
将getifaddrs移植到Win XP
发布评论