hostname
hostname copied to clipboard
Fetching FQDN?
Thanks for this crate!
I was just wondering what you thought about adding a mechanism to fetch the fully qualified domain name (similar to hostname --fqdn).
Yeah, it would be nice to have it, but it needs a bit more investigation first how would it work both for Windows and POSIX-compatible systems.
So far it looks like GetComputerNameExW in combination with ComputerNamePhysicalDnsFullyQualified flag can be used for Windows.
As for POSIX, seems like this approach would be our solution.
It sounds promising so far, but it would be better to double check everything first.