tcpip_stack Class Reference

#include <tcpip_stack.h>

Inheritance diagram for tcpip_stack:

Inheritance graph
[legend]
Collaboration diagram for tcpip_stack:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 tcpip_stack ()
virtual ~tcpip_stack ()
bool healthy () const
 IMPLEMENT_CLASS_NAME ("tcpip_stack")
istring hostname () const
machine_uid this_host (int location_type) const
byte_array full_resolve (const istring &hostname, istring &full_host) const
bool resolve_any (const istring &name, internet_address &resolved) const
istring dns_resolve (const istring &hostname) const
bool enumerate_adapters (string_array &ip_addresses, bool add_local=false) const
internet_address fill_and_resolve (const istring &machine, int port, bool &worked) const
bool enumerate_adapters (machine_uid_array &ip_addresses, bool add_local=false) const

Static Public Member Functions

static istring tcpip_error_name (int error_value)
static sockaddr convert (const internet_address &to_convert)
static internet_address convert (const sockaddr &to_convert)

Detailed Description

Definition at line 33 of file tcpip_stack.h.


Constructor & Destructor Documentation

tcpip_stack::tcpip_stack (  ) 

Definition at line 60 of file tcpip_stack.cpp.

tcpip_stack::~tcpip_stack (  )  [virtual]

Definition at line 64 of file tcpip_stack.cpp.


Member Function Documentation

bool tcpip_stack::healthy (  )  const [inline]

Definition at line 39 of file tcpip_stack.h.

tcpip_stack::IMPLEMENT_CLASS_NAME ( "tcpip_stack"   ) 

istring tcpip_stack::tcpip_error_name ( int  error_value  )  [static]

Definition at line 110 of file tcpip_stack.cpp.

References SOCK_EACCES, SOCK_EADDRINUSE, SOCK_EADDRNOTAVAIL, SOCK_EAFNOSUPPORT, SOCK_EALREADY, SOCK_EBADF, SOCK_ECONNABORTED, SOCK_ECONNREFUSED, SOCK_ECONNRESET, SOCK_EDESTADDRREQ, SOCK_EDQUOT, SOCK_EFAULT, SOCK_EHOSTDOWN, SOCK_EHOSTUNREACH, SOCK_EINPROGRESS, SOCK_EINTR, SOCK_EINVAL, SOCK_EISCONN, SOCK_ELOOP, SOCK_EMFILE, SOCK_EMSGSIZE, SOCK_ENAMETOOLONG, SOCK_ENETDOWN, SOCK_ENETRESET, SOCK_ENETUNREACH, SOCK_ENOBUFS, SOCK_ENOPROTOOPT, SOCK_ENOTCONN, SOCK_ENOTEMPTY, SOCK_ENOTSOCK, SOCK_EOPNOTSUPP, SOCK_EPFNOSUPPORT, SOCK_EPROCLIM, SOCK_EPROTONOSUPPORT, SOCK_EPROTOTYPE, SOCK_EREMOTE, SOCK_ESHUTDOWN, SOCK_ESOCKTNOSUPPORT, SOCK_ESTALE, SOCK_ETIMEDOUT, SOCK_ETOOMANYREFS, SOCK_EUSERS, SOCK_EWOULDBLOCK, and portable::system_error_text().

Referenced by full_resolve(), hostname(), socket_minder::push_receives(), socket_minder::push_sends(), raw_socket::select(), and spocket::send_to().

istring tcpip_stack::hostname (  )  const

Definition at line 96 of file tcpip_stack.cpp.

References FUNCDEF, LOG, negative(), istring::SPRINTF, portable::system_error(), and tcpip_error_name().

Referenced by dns_resolve(), enumerate_adapters(), full_resolve(), main(), resolve_any(), and this_host().

machine_uid tcpip_stack::this_host ( int  location_type  )  const

Definition at line 361 of file tcpip_stack.cpp.

References full_resolve(), hostname(), machine_uid::IPX_LOCATION, array< contents >::length(), machine_uid::NETBIOS_LOCATION, and machine_uid::TCPIP_LOCATION.

Referenced by enumerate_adapters().

sockaddr tcpip_stack::convert ( const internet_address to_convert  )  [static]

Definition at line 241 of file tcpip_stack.cpp.

References internet_address::ADDRESS_SIZE, FUNCDEF, internet_address::ip_address, memory_assign(), internet_address::port, and array< contents >::stuff().

Referenced by spocket::accept(), spocket::connect(), spocket::receive_from(), and spocket::send_to().

internet_address tcpip_stack::convert ( const sockaddr &  to_convert  )  [static]

Definition at line 259 of file tcpip_stack.cpp.

References internet_address::ADDRESS_SIZE, and internet_address::fill().

byte_array tcpip_stack::full_resolve ( const istring hostname,
istring full_host 
) const

Definition at line 268 of file tcpip_stack.cpp.

References FUNCDEF, hostname(), istring::iequals(), internet_address::localhost(), LOG, internet_address::nil_address(), istring::observe(), istring::reset(), istring::SPRINTF, portable::system_error(), and tcpip_error_name().

Referenced by check_hostname(), spocket::connect(), fill_and_resolve(), resolve_any(), and this_host().

bool tcpip_stack::resolve_any ( const istring name,
internet_address resolved 
) const

Definition at line 297 of file tcpip_stack.cpp.

References internet_address::ADDRESS_SIZE, full_resolve(), FUNCDEF, internet_address::hostname, hostname(), internet_address::ip_address, array< contents >::length(), internet_address::MAXIMUM_HOSTNAME_LENGTH, array< contents >::stuff(), and istring::stuff().

istring tcpip_stack::dns_resolve ( const istring hostname  )  const

Definition at line 314 of file tcpip_stack.cpp.

References FUNCDEF, hostname(), istring::iequals(), array< contents >::length(), istring::observe(), and istring::SPRINTF.

bool tcpip_stack::enumerate_adapters ( string_array ip_addresses,
bool  add_local = false 
) const

Definition at line 174 of file tcpip_stack.cpp.

References FUNCDEF, hostname(), array< contents >::length(), LOG, log_base::platform_ending(), array< contents >::reset(), string_array::text_form(), and this_host().

Referenced by enumerate_adapters(), and main().

internet_address tcpip_stack::fill_and_resolve ( const istring machine,
int  port,
bool &  worked 
) const

Definition at line 387 of file tcpip_stack.cpp.

References istring::empty_string(), internet_address::fill(), full_resolve(), istring::iequals(), internet_address::is_valid_internet_address(), array< contents >::length(), internet_address::localhost(), internet_address::nil_address(), and istring::to_lower().

Referenced by enumerate_adapters().

bool tcpip_stack::enumerate_adapters ( machine_uid_array ip_addresses,
bool  add_local = false 
) const

Definition at line 223 of file tcpip_stack.cpp.

References internet_address::convert(), machine_uid_array::elements(), enumerate_adapters(), fill_and_resolve(), internet_address::hostname, hostname(), array< contents >::length(), internet_address::MAXIMUM_HOSTNAME_LENGTH, machine_uid_array::reset(), and istring::stuff().


The documentation for this class was generated from the following files:
Generated on Tue Aug 19 05:12:39 2008 for HOOPLE Libraries by  doxygen 1.5.1