我可以得到一个Linux计算机连接到C ++的所有域的名称吗? [英] Can I get the names of all the domains a Linux computer is connected to in C++?

查看:226
本文介绍了我可以得到一个Linux计算机连接到C ++的所有域的名称吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台Linux计算机(通过外部NIC连接到2个外部域)。我想获得我的机器连接到的域名的编程使用C ++。

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?

顺便说一下,我已经尝试过 getnameinfo 它不为我工作。因此,请提出另一个答案。

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.

推荐答案

这里是类似的主题 Linux / C ++:获取本地计算机的IP地址

这篇关于我可以得到一个Linux计算机连接到C ++的所有域的名称吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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