将getifaddrs移植到Win XP [英] Porting getifaddrs to Win XP

查看:751
本文介绍了将getifaddrs移植到Win XP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆