12 #ifndef INET_ADDRESS_H
13 #define INET_ADDRESS_H
63 INETAddress (
const char* host_,
const char* service_,
Address is an abstraction for INET or UNIX-domain address data type.
void init()
Perform initialization common to all ctors.
string getHostName()
Return host name.
void dump()
Dump the address content to log file.
static string get_fully_qualified_domain_name(vector< string > &aliases_)
Return fully-qualified host name.
SA * getAddress() const
Get hold of address structure.
~INETAddress()
Destructor.
INETAddress()
Default constructor.
int getServiceByName(string serv_, Protocol prot_=TCP)
Lookup port by its service name found in /etc/services.
int getPort() const
Return port.
void createHostPort(const char *host_, int port_)
Makes socket address out of host name and port.
SA_IN m_address
Internet address structure sockaddr_in.
static string m_fqdn_cache
Cached fully-qualified domain name.
const int getLength() const
Return address length.