<!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::InetMaskAddress 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::InetMaskAddress Class Reference</h1>Internet addresses used specifically as masking addresses (such as " 255.255.255.0") are held in the <a class="el" href="classost_1_1_inet_mask_address.html">InetMaskAddress</a> derived object. Internet Address Mask such as subnet masks. <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::InetMaskAddress:: <p><center><img src="classost_1_1_inet_mask_address.gif" usemap="#ost::InetMaskAddress_map" border="0"></center> <map name="ost::InetMaskAddress_map"> <area href="classost_1_1_inet_address.html" alt="ost::InetAddress" shape="rect" coords="0,0,131,24"> </map> <a href="classost_1_1_inet_mask_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_mask_address.html#a0">InetMaskAddress</a> (const char *mask)</td></tr> <tr><td> </td><td><font size=-1><em>Create the mask from a null terminated ASCII string such as "255.255.255.128".</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classost_1_1_inet_address.html">InetAddress</a> & </td><td valign=bottom><a class="el" href="classost_1_1_inet_mask_address.html#a1">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="#a1">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><a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> </td><td valign=bottom><a class="el" href="classost_1_1_inet_mask_address.html#l0">operator &</a> (const <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> &addr, const InetMaskAddress &mask)</td></tr> <tr><td> </td><td><font size=-1><em>Masks are usually used to coerce host addresses into a specific router or class domain.</em> <a href="#l0">More...</a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Internet addresses used specifically as masking addresses (such as " 255.255.255.0") are held in the <a class="el" href="classost_1_1_inet_mask_address.html">InetMaskAddress</a> derived object. Internet Address Mask such as subnet masks. <p> The seperate class is used so that C++ type casting can automatically determine when an <a class="el" href="classost_1_1_inet_address.html">InetAddress</a> object is really a mask address object rather than simply using the base class. This also allows manipulative operators for address masking to operate only when presented with a Masked address as well as providing cleaner and safer source. <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::InetMaskAddress::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 class="md" nowrap valign="top"> ost::InetMaskAddress::InetMaskAddress </td> <td class="md">( </td> <td class="md">const char *</td> <td class="mdname1"> <em>mask</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> Create the mask from a null terminated ASCII string such as "255.255.255.128". <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>mask </em> </td><td> null terminated ASCII mask string. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a1" doxytag="ost::InetMaskAddress::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"> <a class="el" href="classost_1_1_inet_address.html">InetAddress</a>& ost::InetMaskAddress::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"><code> [inline]</code></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="classost_1_1_inet_address.html#a13">ost::InetAddress</a>. </td> </tr> </table> <hr><h2>Friends And Related Function Documentation</h2> <a name="l0" doxytag="ost::InetMaskAddress::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"> <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> operator & </td> <td class="md">( </td> <td class="md">const <a class="el" href="classost_1_1_inet_host_address.html">InetHostAddress</a> &</td> <td class="mdname"> <em>addr</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">const InetMaskAddress &</td> <td class="mdname"> <em>mask</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [friend]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Masks are usually used to coerce host addresses into a specific router or class domain. <p> This can be done by taking the Inet Host Address object and "and"ing it with an address mask. This operation can be directly expressed in C++ through the & operator. <p> <dl compact><dt><b> Returns: </b><dd> a internet host address that has been masked. </dl><dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>addr </em> </td><td> host address to be masked by subnet. </td></tr> <tr><td valign=top><em>mask </em> </td><td> inetnet mask address object to mask by. </td></tr> </table> </dl> </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>