In a C project (POSIX), how do I get the fully qualified name for the current system?
For example, I can get just the hostname of my machine by doing gethostna
gethostna
The easy way, try uname()
If that does not work, use gethostname() then gethostbyname() and finally gethostbyaddr()
The h_name of hostent{} should be your FQDN