我可以得到Linux计算机连接到C ++的所有域的名称吗? [英] Can I get the names of all the domains a Linux computer is connected to in C++?
本文介绍了我可以得到Linux计算机连接到C ++的所有域的名称吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
顺便说一下,我已经尝试过 getnameinfo
,这对我来说不行。所以请建议另一个答案。
此外,如果您的答案包含示例代码,这将会更有帮助。
解决方案
这是类似的主题 Linux / C ++:获取本地计算机的IP地址
I have a Linux machine that is connected (by external NICs) to 2 external domains. I want to get the names of the domains my machine is connected to programmatically using C++. How can I get all these names in my application?
By the way, I have already tried getnameinfo
, and it doesn't work for me. So please suggest another answer.
Also, it would be more helpful to me if your answers included sample code.
解决方案
Here is similar topic Linux / C++: Get the IP Address of local computer
这篇关于我可以得到Linux计算机连接到C ++的所有域的名称吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文