when i type "hostname" in the command line I get something like 2.x.aaa.bbb.in-addr.arpa
I wonder if there is a function that returns that value...
(I have tried with gethostname() but it only returns me 2.x.a , which is incomplete)
when i type "hostname" in the command line I get something like 2.x.aaa.bbb.in-addr.arpa
I wonder if there is a function that returns that value...
(I have tried with gethostname() but it only returns me 2.x.a , which is incomplete)
Mac OS 10.6 Snow Leopard : Darwin
well, assuming your program is going to be UNIX-only, check the man page for hostname. you will see in the explanation that all it does, pretty much, is read from a file and prints it. what you can do is read from that same file.