<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ost::InetAddress class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.10 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</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="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>ost::InetAddress Class Reference</h1>The network name and address objects are all derived from a common <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> base class. Internet Address binary data type. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="socket_8h-source.html">socket.h</a>></code> <p> <p>Inheritance diagram for ost::InetAddress:: <p><center><img src="classost_1_1_inet_address.gif" usemap="#ost::InetAddress_map" border="0"></center> <map name="ost::InetAddress_map"> <area href="classost_1_1_broadcast_address.html" alt="ost::BroadcastAddress" shape="rect" coords="0,56,138,80"> <area href="classost_1_1_inet_host_address.html" alt="ost::InetHostAddress" shape="rect" coords="148,56,286,80"> <area href="classost_1_1_inet_mask_address.html" alt="ost::InetMaskAddress" shape="rect" coords="296,56,434,80"> <area href="classost_1_1_inet_mcast_address.html" alt="ost::InetMcastAddress" shape="rect" coords="444,56,582,80"> </map> <a href="classost_1_1_inet_address-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="classost_1_1_inet_address.html#a0">InetAddress</a> (const <a class="el" href="classost_1_1_inet_addr_validator.html">InetAddrValidator</a> *validator=NULL)</td></tr> <tr><td> </td><td><font size=-1><em>Create an Internet Address object with an empty (0.0.0.0) address.</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="classost_1_1_inet_address.html#a1">InetAddress</a> (struct in_addr addr, const <a class="el" href="classost_1_1_inet_addr_validator.html">InetAddrValidator</a> *validator=NULL)</td></tr> <tr><td> </td><td><font size=-1><em>Convert the system internet address data type (struct in_addr) into a Common C++ <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a2">InetAddress</a> (const char *address, const <a class="el" href="classost_1_1_inet_addr_validator.html">InetAddrValidator</a> *validator=NULL)</td></tr> <tr><td> </td><td><font size=-1><em>Convert a null terminated ASCII host address string (example: "127.0.0.1") or host address name (example: "www.voxilla.org") directly into a Common C++ <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a3">InetAddress</a> (const InetAddress &rhs)</td></tr> <tr><td> </td><td><font size=-1><em>Copy constructor.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a4">~InetAddress</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Destructor.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>const char * </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a5">getHostname</a> (void) const</td></tr> <tr><td> </td><td><font size=-1><em>Provide a string representation of the value (Internet Address) held in the <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a6">isInetAddress</a> (void) const</td></tr> <tr><td> </td><td><font size=-1><em>May be used to verify if a given <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> returned by another function contains a "valid" address, or "0.0.0.0" which is often used to mark "invalid" <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> values.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>in_addr </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a7">getAddress</a> (void) const</td></tr> <tr><td> </td><td><font size=-1><em>Provide a low level system usable struct in_addr object from the contents of <a class="el" href="classost_1_1_inet_address.html">InetAddress</a>.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>in_addr </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a8">getAddress</a> (size_t i) const</td></tr> <tr><td> </td><td><font size=-1><em>Provide a low level system usable struct in_addr object from the contents of <a class="el" href="classost_1_1_inet_address.html">InetAddress</a>.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>size_t </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a9">getAddressCount</a> () const</td></tr> <tr><td> </td><td><font size=-1><em>Returns the number of internet addresses that an <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object contains.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>InetAddress & </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a10">operator=</a> (const char *str)</td></tr> <tr><td nowrap align=right valign=top>InetAddress & </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a11">operator=</a> (struct in_addr addr)</td></tr> <tr><td nowrap align=right valign=top>InetAddress & </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a12">operator=</a> (const InetAddress &rhs)</td></tr> <tr><td nowrap align=right valign=top>InetAddress & </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a13">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> <a href="#a13">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a14">operator!</a> () const</td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a15">operator==</a> (const InetAddress &a) const</td></tr> <tr><td> </td><td><font size=-1><em>Compare two internet addresses to see if they are equal (if they specify the physical address of the same internet host).</em> <a href="#a15">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#a16">operator!=</a> (const InetAddress &a) const</td></tr> <tr><td> </td><td><font size=-1><em>Compare two internet addresses to see if they are not equal (if they each refer to unique and different physical ip addresses).</em> <a href="#a16">More...</a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#b0">setIPAddress</a> (const char *host)</td></tr> <tr><td> </td><td><font size=-1><em>Sets the IP address from a string representation of the numeric address, ie "127.0.0.1".</em> <a href="#b0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#b1">setAddress</a> (const char *host)</td></tr> <tr><td> </td><td><font size=-1><em>Used to specify a host name or numeric internet address.</em> <a href="#b1">More...</a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> <tr><td nowrap align=right valign=top>in_addr * </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#n0">ipaddr</a></td></tr> <tr><td nowrap align=right valign=top>size_t </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#n1">addr_count</a></td></tr> <tr><td colspan=2><br><h2>Static Protected Attributes</h2></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classost_1_1_mutex.html">Mutex</a> </td><td valign=bottom><a class="el" href="classost_1_1_inet_address.html#q0">mutex</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The network name and address objects are all derived from a common <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> base class. Internet Address binary data type. <p> Specific classes, such as <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a>, <a class="el" href="classost_1_1_inet_mask_address.html">InetMaskAddress</a>, etc, are defined from <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> entirely so that the manner a network address is being used can easily be documented and understood from the code and to avoid common errors and accidental misuse of the wrong address object. For example, a "connection" to something that is declared as a "<a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a>" can be kept type-safe from a "connection" accidently being made to something that was declared a "InetBroadcastAddress". <p> <dl compact><dt><b> Author: </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="ost::InetAddress::InetAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> ost::InetAddress::InetAddress </td> <td class="md">( </td> <td class="md">const <a class="el" href="classost_1_1_inet_addr_validator.html">InetAddrValidator</a> *</td> <td class="mdname1"> <em>validator</em> = NULL </td> <td class="md">) </td> <td class="md"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create an Internet Address object with an empty (0.0.0.0) address. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>optional </em> </td><td> validator function object, intended for derived classes. </td></tr> </table> </dl> </td> </tr> </table> <a name="a1" doxytag="ost::InetAddress::InetAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> ost::InetAddress::InetAddress </td> <td class="md">( </td> <td class="md">struct in_addr</td> <td class="mdname"> <em>addr</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">const <a class="el" href="classost_1_1_inet_addr_validator.html">InetAddrValidator</a> *</td> <td class="mdname"> <em>validator</em> = NULL</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Convert the system internet address data type (struct in_addr) into a Common C++ <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> 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> struct of system used binary internet address. </td></tr> <tr><td valign=top><em>optional </em> </td><td> validator function object, intended for derived classes. </td></tr> </table> </dl> </td> </tr> </table> <a name="a2" doxytag="ost::InetAddress::InetAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> ost::InetAddress::InetAddress </td> <td class="md">( </td> <td class="md">const char *</td> <td class="mdname"> <em>address</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">const <a class="el" href="classost_1_1_inet_addr_validator.html">InetAddrValidator</a> *</td> <td class="mdname"> <em>validator</em> = NULL</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Convert a null terminated ASCII host address string (example: "127.0.0.1") or host address name (example: "www.voxilla.org") directly into a Common C++ <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>address </em> </td><td> null terminated C string. </td></tr> <tr><td valign=top><em>optional </em> </td><td> validator function object, intended for derived classes. </td></tr> </table> </dl> </td> </tr> </table> <a name="a3" doxytag="ost::InetAddress::InetAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> ost::InetAddress::InetAddress </td> <td class="md">( </td> <td class="md">const InetAddress &</td> <td class="mdname1"> <em>rhs</em> </td> <td class="md">) </td> <td class="md"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Copy constructor. <p> </td> </tr> </table> <a name="a4" doxytag="ost::InetAddress::~InetAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual ost::InetAddress::~InetAddress </td> <td class="md">( </td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Destructor. <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a8" doxytag="ost::InetAddress::getAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> struct in_addr ost::InetAddress::getAddress </td> <td class="md">( </td> <td class="md">size_t</td> <td class="mdname1"> <em>i</em> </td> <td class="md">) </td> <td class="md"> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Provide a low level system usable struct in_addr object from the contents of <a class="el" href="classost_1_1_inet_address.html">InetAddress</a>. <p> This is needed for services such as bind() and connect().<dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>i </em> </td><td> for InetAddresses with multiple addresses, returns the address at this index. User should call <a class="el" href="classost_1_1_inet_address.html#a9">getAddressCount</a>() to determine the number of address the object contains. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> system binary coded internet address. If parameter i is out of range, the first address is returned. </dl> </td> </tr> </table> <a name="a7" doxytag="ost::InetAddress::getAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> struct in_addr ost::InetAddress::getAddress </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Provide a low level system usable struct in_addr object from the contents of <a class="el" href="classost_1_1_inet_address.html">InetAddress</a>. <p> This is needed for services such as bind() and connect(). <p> <dl compact><dt><b> Returns: </b><dd> system binary coded internet address. </dl> </td> </tr> </table> <a name="a9" doxytag="ost::InetAddress::getAddressCount"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> size_t ost::InetAddress::getAddressCount </td> <td class="md">( </td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the number of internet addresses that an <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object contains. <p> This usually only happens with <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> objects where multiple IP addresses are returned for a DNS lookup </td> </tr> </table> <a name="a5" doxytag="ost::InetAddress::getHostname"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> const char* ost::InetAddress::getHostname </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Provide a string representation of the value (Internet Address) held in the <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object. <p> <dl compact><dt><b> Returns: </b><dd> string representation of <a class="el" href="classost_1_1_inet_address.html">InetAddress</a>. </dl> </td> </tr> </table> <a name="a6" doxytag="ost::InetAddress::isInetAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool ost::InetAddress::isInetAddress </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> May be used to verify if a given <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> returned by another function contains a "valid" address, or "0.0.0.0" which is often used to mark "invalid" <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> values. <p> <dl compact><dt><b> Returns: </b><dd> true if address != 0.0.0.0. </dl> </td> </tr> </table> <a name="a14" doxytag="ost::InetAddress::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 class="md" nowrap valign="top"> bool ost::InetAddress::operator! </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a16" doxytag="ost::InetAddress::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 class="md" nowrap valign="top"> bool ost::InetAddress::operator!= </td> <td class="md">( </td> <td class="md">const InetAddress &</td> <td class="mdname1"> <em>a</em> </td> <td class="md">) </td> <td class="md"> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Compare two internet addresses to see if they are not equal (if they each refer to unique and different physical ip addresses). <p> This is implimented in terms of operator== </td> </tr> </table> <a name="a13" doxytag="ost::InetAddress::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 class="md" nowrap valign="top"> InetAddress& ost::InetAddress::operator= </td> <td class="md">( </td> <td class="md">unsigned long</td> <td class="mdname1"> <em>addr</em> </td> <td class="md">) </td> <td class="md"></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 in <a class="el" href="classost_1_1_inet_mask_address.html#a1">ost::InetMaskAddress</a>, and <a class="el" href="classost_1_1_inet_host_address.html#a2">ost::InetHostAddress</a>. </td> </tr> </table> <a name="a12" doxytag="ost::InetAddress::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 class="md" nowrap valign="top"> InetAddress& ost::InetAddress::operator= </td> <td class="md">( </td> <td class="md">const InetAddress &</td> <td class="mdname1"> <em>rhs</em> </td> <td class="md">) </td> <td class="md"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a11" doxytag="ost::InetAddress::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 class="md" nowrap valign="top"> InetAddress& ost::InetAddress::operator= </td> <td class="md">( </td> <td class="md">struct in_addr</td> <td class="mdname1"> <em>addr</em> </td> <td class="md">) </td> <td class="md"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a10" doxytag="ost::InetAddress::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 class="md" nowrap valign="top"> InetAddress& ost::InetAddress::operator= </td> <td class="md">( </td> <td class="md">const char *</td> <td class="mdname1"> <em>str</em> </td> <td class="md">) </td> <td class="md"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a15" doxytag="ost::InetAddress::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 class="md" nowrap valign="top"> bool ost::InetAddress::operator== </td> <td class="md">( </td> <td class="md">const InetAddress &</td> <td class="mdname1"> <em>a</em> </td> <td class="md">) </td> <td class="md"> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Compare two internet addresses to see if they are equal (if they specify the physical address of the same internet host). <p> If there is more than one IP address in either <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object, this will return true if all of the IP addresses in the smaller are in the larger in any order. </td> </tr> </table> <a name="b1" doxytag="ost::InetAddress::setAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void ost::InetAddress::setAddress </td> <td class="md">( </td> <td class="md">const char *</td> <td class="mdname1"> <em>host</em> </td> <td class="md">) </td> <td class="md"><code> [protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Used to specify a host name or numeric internet address. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>host </em> </td><td> The string representation of the IP address or a hostname, , if NULL, it will default to INADDR_ANY </td></tr> </table> </dl> </td> </tr> </table> <a name="b0" doxytag="ost::InetAddress::setIPAddress"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool ost::InetAddress::setIPAddress </td> <td class="md">( </td> <td class="md">const char *</td> <td class="mdname1"> <em>host</em> </td> <td class="md">) </td> <td class="md"><code> [protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Sets the IP address from a string representation of the numeric address, ie "127.0.0.1". <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>host </em> </td><td> The string representation of the IP address </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> true if successful </dl> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a name="n1" doxytag="ost::InetAddress::addr_count"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> size_t ost::InetAddress::addr_count<code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="n0" doxytag="ost::InetAddress::ipaddr"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> struct in_addr* ost::InetAddress::ipaddr<code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="q0" doxytag="ost::InetAddress::mutex"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classost_1_1_mutex.html">Mutex</a> ost::InetAddress::mutex<code> [static, protected]</code> </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_8h-source.html">socket.h</a></ul> <hr><address><small>Generated at Fri Jan 4 18:51:49 2002 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.10 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2001</small></address> </body> </html>