Posts

Post not yet marked as solved
5 Replies
345 Views
I want to get the network-name (domain-name) on my Mac-Machine. Where iin the Settings does this domain name gets configured. I refer to this page which talks about computer name and host name, I could find where my hostname is present (Settings->General->Sharing->local host name) but not anything related to the network-name (local -domain) . Even try to fetch this info using the linux api to getdomainname, api call succeeded but it returns Nothing. #include <iostream> #include <unistd.h> #include <limits.h> #include <cstring> int main() { char domainname[255]; // Get the domain name if (getdomainname(domainname, 255) != 0) { std::cout << "Error getting domain name" << std::endl; return 1; } std::cout << "Domain name: " << domainname << std::endl; return 0; } Output Domain name: I even came across Search-Domains, Does it have anything to do with the network-name (domain name of the machine)?
Posted Last updated
.
Post not yet marked as solved
1 Replies
247 Views
I have a use-case were I want to use the the FQDN (Fully Qualified Domain Name) in IOS-Device, which can be used to connect to a Device instead of using the IP-Address. FQDN will be consisting of the machine-name or host-name (Most common term) and the domain-name of the network i.e network-name (local domain assigned to that device). Which IOS Api can be used Here?
Posted Last updated
.