21# include <sys/socket.h>
23# include <sys/utsname.h>
120 if ( (
r =
s.find(
':')) > 0 ) {
124 else if ( (
r =
s.find(
'@')) > 0 ) {
146 return htons ((
unsigned short int)
l);
198 EL((
ASSAERR,
"gethostbyaddr() failed\n"));
212 "AF_INET" :
"AF_UNIX"));
259 char** pptr =
hptr->h_aliases;
260 while (*pptr !=
NULL) {
An incapsulation of TCP/UDP Internet Protocol socket address structure.
#define EL(X)
A macro for writing error message to the Logger.
#define DL(X)
A macro for writing debug message to the Logger.
virtual void dump()
Dump object state to the log file.
void setstate(addrstate flag_)
Set state of the Address object.
A wrapper class to provide AutoPtr with reference semantics.
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.
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.
@ ADDRESS
Class Address & friends messages
@ ASSAERR
ASSA and system errors