Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

InetHostAddress Class Reference

This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket. Address of a specific Internet host machine. More...

#include <socket.h>

Inheritance diagram for InetHostAddress:

InetAddress List of all members.

Public Methods

 InetHostAddress (const char *host=NULL)
 Create a new host address for a specific internet host. More...

 InetHostAddress (struct in_addr addr)
 Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object. More...

InetAddressoperator= (unsigned long addr)
 Allows assignment from the return of functions like inet_addr() or htonl().

InetHostAddress& operator &= (const InetMaskAddress &mask)
 Mask the internet host address object with a network mask address. More...


Friends

class  InetMaskAddress
InetHostAddress operator & (const InetHostAddress &addr, const InetMaskAddress &mask)

Detailed Description

This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket. Address of a specific Internet host machine.

Author(s):
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

InetHostAddress::InetHostAddress ( const char * host = NULL )
 

Create a new host address for a specific internet host.

The internet host can be specified in a null terminated ASCII string and include either the physical host address or the DNS name of a host machine. Hence, an InetHostAddress ("www.voxilla.org") can be directly declaired in this manner.

Defaults to the IP address that represents the interface matching "gethostname()".

Parameters:
host   dns or physical address of an Internet host.

InetHostAddress::InetHostAddress ( struct in_addr addr )
 

Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object.

Parameters:
addr   binary address of internet host.


Member Function Documentation

InetHostAddress & InetHostAddress::operator &= ( const InetMaskAddress & mask )
 

Mask the internet host address object with a network mask address.

This is commonly used to coerce an address by subnet.

InetAddress & InetHostAddress::operator= ( unsigned long addr ) [inline]
 

Allows assignment from the return of functions like inet_addr() or htonl().

Reimplemented from InetAddress.


Friends And Related Function Documentation

class InetMaskAddress [friend]
 

InetHostAddress operator & ( const InetHostAddress & addr,
const InetMaskAddress & mask ) [friend]
 


The documentation for this class was generated from the following file:
Generated at Thu Sep 27 17:41:25 2001 for CommonC++ by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001