13#include <netinet/in.h>
34 static struct sockaddr_in
resolve(const
std::
string &
name) throw() ;
35 static
std::
string resolve(struct sockaddr_in address) throw() ;
37 static
std::
string to_string(struct sockaddr_in ip_addr) ;
40 Host(struct sockaddr_in ip_addr);
41 virtual ~
Host() throw();
42 operator struct sockaddr_in() const throw();
44 struct sockaddr_in
ip() const throw() ;
45 const
std::
string &
name() const throw() ;
51 bool operator ==(const
Host &a, const
Host &b) throw();
52 bool operator !=(const
Host &a, const
Host &b) throw();
72 static const std::string &
local_name() throw() ;
std::string ip_string() const
get ip in string mode
static struct sockaddr_in resolve(const std::string &name)
name to ip conversion
const std::string & name() const
get name
static std::string expand(const std::string &name)
expands to full name
struct sockaddr_in ip() const
get ip address
static std::string to_string(struct sockaddr_in ip_addr)
ip to string conversion
bool equals(const Host &other) const
equality method
const std::string & full_name() const
get fully qualified name
std::string m_name
name of the host
Host()
constructor for current host
std::string m_full_name
cached fully qualified host name
std::string m_os_name
name of the operating system
std::string m_version
version of the operating system
const std::string & description() const
machine type */
static LocalHost * s_instance
singleton for local host
const std::string & os_release() const
release of the operating system
static const std::string & full_local_name()
fully qualified local host name
std::string m_machine
machine type
const std::string & os_name() const
name of the operating system
static const LocalHost * instance()
pointer to the singleton local host
const std::string & os_version() const
version of the operating system
static const std::string & local_name()
localhostname
std::string m_release
release of the operating system
const std::string & machine() const
version of the operating system
std::string m_description
machine description (cached)
const char * getfullhost()
get fully qualified host name