Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 154

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>GNU CommonC++: ost::IPV4Mask Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_i_p_v4_mask.html">IPV4Mask</a></div>
<h1>ost::IPV4Mask Class Reference</h1><!-- doxytag: class="ost::IPV4Mask" --><!-- doxytag: inherits="ost::IPV4Address" -->Internet addresses used specifically as masking addresses (such as " 255.255.255.0") are held in the <a class="el" href="classost_1_1_i_p_v4_mask.html">IPV4Mask</a> derived object.Internet Address Mask such as subnet masks.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="address_8h-source.html">address.h</a>&gt;</code>
<p>
<p>Inheritance diagram for ost::IPV4Mask:
<p><center><img src="classost_1_1_i_p_v4_mask.png" usemap="#ost::IPV4Mask_map" border="0" alt=""></center>
<map name="ost::IPV4Mask_map">
<area href="classost_1_1_i_p_v4_address.html" alt="ost::IPV4Address" shape="rect" coords="0,0,108,24">
</map>
<a href="classost_1_1_i_p_v4_mask-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_i_p_v4_mask.html#c1eee23d7fb3b9d366e537d27ee7bc50">IPV4Mask</a> (const char *mask)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create the mask from a null terminated ASCII string such as "255.255.255.128".  <a href="#c1eee23d7fb3b9d366e537d27ee7bc50"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_i_p_v4_address.html">IPV4Address</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_i_p_v4_mask.html#49ec7fe09dfcc3b9a963e2dc6f1186d4">operator=</a> (unsigned long addr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allows assignment from the return of functions like inet_addr() or htonl().  <a href="#49ec7fe09dfcc3b9a963e2dc6f1186d4"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">__EXPORT <a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_i_p_v4_mask.html#400c689d4f8484e7b26ad9c9fe865c7f">operator &amp;</a> (const <a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a> &amp;addr, const <a class="el" href="classost_1_1_i_p_v4_mask.html">IPV4Mask</a> &amp;mask)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Masks are usually used to coerce host addresses into a specific router or class domain.  <a href="#400c689d4f8484e7b26ad9c9fe865c7f"></a><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_i_p_v4_mask.html">IPV4Mask</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_i_p_v4_address.html">IPV4Address</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></dt><dd>David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; </dd></dl>

<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="c1eee23d7fb3b9d366e537d27ee7bc50"></a><!-- doxytag: member="ost::IPV4Mask::IPV4Mask" ref="c1eee23d7fb3b9d366e537d27ee7bc50" args="(const char *mask)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ost::IPV4Mask::IPV4Mask           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>mask</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </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></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mask</em>&nbsp;</td><td>null terminated ASCII mask string. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="49ec7fe09dfcc3b9a963e2dc6f1186d4"></a><!-- doxytag: member="ost::IPV4Mask::operator=" ref="49ec7fe09dfcc3b9a963e2dc6f1186d4" args="(unsigned long addr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_i_p_v4_address.html">IPV4Address</a>&amp; ost::IPV4Mask::operator=           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>addr</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </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_i_p_v4_address.html#c05d9c4599ad313dec545a9e89e7e2d5">ost::IPV4Address</a>.    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="400c689d4f8484e7b26ad9c9fe865c7f"></a><!-- doxytag: member="ost::IPV4Mask::operator &amp;" ref="400c689d4f8484e7b26ad9c9fe865c7f" args="(const IPV4Host &amp;addr, const IPV4Mask &amp;mask)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">__EXPORT <a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a> operator &amp;           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>addr</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const <a class="el" href="classost_1_1_i_p_v4_mask.html">IPV4Mask</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>mask</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [friend]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </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 &amp; operator.<p>
<dl compact><dt><b>Returns:</b></dt><dd>a internet host address that has been masked. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>addr</em>&nbsp;</td><td>host address to be masked by subnet. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mask</em>&nbsp;</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="address_8h-source.html">address.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:55 2006 for GNU CommonC++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>