<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>InetHostAddress class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.5 on Thu Oct 4 15:33:00 2001 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>InetHostAddress Class Reference</h1>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. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="socket_h-source.html">socket.h</a>></code> <p> <p>Inheritance diagram for InetHostAddress: <p><center><img src="class_inethostaddress.gif" usemap="#InetHostAddress_map" border="0"></center> <map name="InetHostAddress_map"> <area href="class_inetaddress.html" alt="InetAddress" shape="rect" coords="0,0,104,24"> </map> <a href="class_inethostaddress-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="class_inethostaddress.html#a0">InetHostAddress</a> (const char *host=NULL)</td></tr> <tr><td> </td><td><font size=-1><em>Create a new host address for a specific internet host.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="class_inethostaddress.html#a1">InetHostAddress</a> (struct in_addr addr)</td></tr> <tr><td> </td><td><font size=-1><em>Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="class_inetaddress.html">InetAddress</a>& </td><td valign=bottom><a class="el" href="class_inethostaddress.html#a2">operator=</a> (unsigned long addr)</td></tr> <tr><td> </td><td><font size=-1><em>Allows assignment from the return of functions like inet_addr() or htonl().</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>InetHostAddress& </td><td valign=bottom><a class="el" href="class_inethostaddress.html#a3">operator &=</a> (const <a class="el" href="class_inetmaskaddress.html">InetMaskAddress</a> &mask)</td></tr> <tr><td> </td><td><font size=-1><em>Mask the internet host address object with a network mask address.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Friends</h2></td></tr> <tr><td nowrap align=right valign=top>class </td><td valign=bottom><a class="el" href="#l0">InetMaskAddress</a></td></tr> <tr><td nowrap align=right valign=top>InetHostAddress </td><td valign=bottom><a class="el" href="class_inethostaddress.html#l1">operator &</a> (const InetHostAddress &addr, const <a class="el" href="class_inetmaskaddress.html">InetMaskAddress</a> &mask)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> 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. <p> <dl compact><dt> <b>Author(s): </b><dd> David Sugar <<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>> </dl> <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="InetHostAddress::InetHostAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> InetHostAddress::InetHostAddress ( </b></td> <td valign="bottom"><b> const char * <em>host</em> = NULL ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create a new host address for a specific internet host. <p> 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. <p> Defaults to the IP address that represents the interface matching "gethostname()".<dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>host</em> </td><td> dns or physical address of an Internet host. </td></tr> </table> </dl> </td> </tr> </table> <a name="a1" doxytag="InetHostAddress::InetHostAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> InetHostAddress::InetHostAddress ( </b></td> <td valign="bottom"><b> struct in_addr <em>addr</em> ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object. <p> <dl compact><dt> <b>Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>addr</em> </td><td> binary address of internet host. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a3" doxytag="InetHostAddress::operator &="></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> InetHostAddress & InetHostAddress::operator &= ( </b></td> <td valign="bottom"><b> const <a class="el" href="class_inetmaskaddress.html">InetMaskAddress</a> & <em>mask</em> ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Mask the internet host address object with a network mask address. <p> This is commonly used to coerce an address by subnet. </td> </tr> </table> <a name="a2" doxytag="InetHostAddress::operator="></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> <a class="el" href="class_inetaddress.html">InetAddress</a> & InetHostAddress::operator= ( </b></td> <td valign="bottom"><b> unsigned long <em>addr</em> )<code> [inline]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Allows assignment from the return of functions like inet_addr() or htonl(). <p> <p> Reimplemented from <a class="el" href="class_inetaddress.html#a13">InetAddress</a>. </td> </tr> </table> <hr><h2>Friends And Related Function Documentation</h2> <a name="l0" doxytag="InetHostAddress::InetMaskAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> class InetMaskAddress<code> [friend]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="l1" doxytag="InetHostAddress::operator &"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> InetHostAddress operator & ( </b></td> <td valign="bottom"><b> const InetHostAddress & <em>addr</em>, </b></td> </tr> <tr> <td></td> <td><b> const <a class="el" href="class_inetmaskaddress.html">InetMaskAddress</a> & <em>mask</em> )<code> [friend]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="socket_h-source.html">socket.h</a></ul> <hr><address><small>Generated at Thu Oct 4 15:33:00 2001 for CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.5 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2001</small></address> </body> </html>