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