hostname icon indicating copy to clipboard operation
hostname copied to clipboard

Fetching FQDN?

Open jszwedko opened this issue 4 years ago • 4 comments

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).

jszwedko avatar Apr 05 '21 19:04 jszwedko

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.

svartalf avatar Apr 07 '21 17:04 svartalf