Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用下面的代码 local_addr.sin_addr.s_addr = INADDR_ANY; ,但我发现默认地址是vmware的ip,这不是我想要的。众所周知,我们可以通过hostinfo->h_addr_list来枚举ip地址,但是如何筛选掉非虚拟机的ip地址呢?
我通过 GetAdaptersInfo/getifaddrs 枚举网络适配器解决了这个问题