Can I get the names of all the domains a Linux computer is connected to in C++?

六月ゝ 毕业季﹏ 提交于 2019-12-11 08:52:01

问题


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.


回答1:


Here is similar topic Linux / C++: Get the IP Address of local computer



来源:https://stackoverflow.com/questions/4704612/can-i-get-the-names-of-all-the-domains-a-linux-computer-is-connected-to-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!