{subsection: condor_netaddr}
-=condor_netaddr= exists to encapsulate the idea of a subset. It's built on top of condor_sockaddr, adding a count for how many bits to mask off. At the moment it's only being used to validate that a subset string can be parsed, but should eventually be used in any situation where Condor is checking that a given address is within a given subset (ie security).
+=condor_netaddr= exists to encapsulate the idea of a subnet. It's built on top of condor_sockaddr, adding a count for how many bits to mask off. At the moment it's only being used to validate that a subset string can be parsed, but should eventually be used in any situation where Condor is checking that a given address is within a given subset (ie security).
+
+{subsection: Hostname to condor_sockaddr and back}
+
+If you have a hostname, but need condor_sockaddr, you'll want the functions in /src/condor_includes/ipv6_hostname.h .
+
+*Hostname to condor_sockaddr:* resolve_hostname() takes a hostname (MyString or const char *), and returns a std::vector<condor_sockaddr>. Note that _all_ off the returned condor_sockaddrs are correct! To be properly behaved, you should try them, in order, until you find one that works, or you run out of options.
+
+*condor_sockaddr to Hostname:* get_hostname() takes a condor_sockaddr and returns a hostname (MyString). If you want aliases as well, get_hostname_with_alias will return a std::vector<MyString> of hostnames.
+
{section: Notes}
{code}
-/condor_includes/ipv6_hostname.h
- Getting hostnames and condor_sockaddrs.
-- get_hostname/get_hostname_with_alias - condor_sockaddr -> MyString
-- resolve_hostname - MyString -> vector<condor_sockaddr>
- - Note that it returns a list. They're all "correct." If you're trying to connect to the hostname, you must try them all, in order, until you succeed or you run out of options.
-
./src/condor_includes/condor_sockfunc.h
- Use the condor_ wrappers (condor_accept, condor_bind, condor_inet_pton, etc) which take condor_sockaddrs.
{endcode}