开发者

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

开发者 https://www.devze.com 2023-02-04 06:31 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消