How can I return the Domain Name of the network I'm connected to? I've looked for an API for this, but can't seem to find one.

Thanks