1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
<HTML><HEAD><TITLE>InetMaskAddress Class</TITLE></HEAD>
<BODY bgcolor="#ffffff">
<H1>InetMaskAddress Class Reference</H1>
<p>
[<A HREF="index.html">APE Index</A>] [<A HREF="hier.html">APE Hierarchy</A>]
[<A HREF="header-list.html">Headers</A>]
</p>
<HR>
<P>Internet Address Mask such as subnet masks. <a href="#short">More...</a></P>
<P>
<code>
#include <<a href="socket-h.html">socket.h</a>>
</code>
</P>
<P>
Inherits: <a href="InetAddress.html">InetAddress</a>
<P>
<H2>Public Members</H2>
<UL>
<LI> <b><a href="#ref0">InetMaskAddress</a></b> (const char *mask)
</LI>
<LI>friend InetHostAddress <b><a href="#ref1">operator&</a></b> (InetHostAddress &addr, InetMaskAddress &mask)
</LI>
</UL>
<HR>
<H2><a name="short">Detailed Description</a></H2>
<P>
Internet addresses used specifically as masking addresses (such as "
255.255.255.0") are held in the InetMaskAddress derived object. The
seperate class is used so that C++ type casting can automatically
determine when an InetAddress 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><HR>
<H3><b> <a name="ref0"></a><a name="InetMaskAddress">InetMaskAddress</a>(const char *mask) </b><code>[public]</code></H3>
<p>Create the mask from a null terminated ASCII string such as
"255.255.255.128".
</p><p>
</p>
<dl><dt><b>Parameters</b>:<dd>
<table width="100%" border="0">
<tr><td align="left" valign="top">
mask</td><td align="left" valign="top">
null terminated ASCII mask string.</td></tr>
</table>
</dl>
<H3><b>friend <a href="InetHostAddress.html">InetHostAddress</a> <a name="ref1"></a><a name="operator&">operator&</a>(<a href="InetHostAddress.html">InetHostAddress</a> &addr, <a href="InetMaskAddress.html">InetMaskAddress</a> &mask) </b><code>[public]</code></H3>
<p>Masks are usually used to coerce host addresses into a specific
router or class domain. 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><p>
</p>
<dl><dt><b>Parameters</b>:<dd>
<table width="100%" border="0">
<tr><td align="left" valign="top">
addr</td><td align="left" valign="top">
host address to be masked by subnet.</td></tr>
<tr><td align="left" valign="top">
mask</td><td align="left" valign="top">
inetnet mask address object to mask by.</td></tr>
</table>
</dl>
<dl><dt><b>Returns</b>:<dd>
a internet host address that has been masked.</dl>
<HR>
<TABLE WIDTH="100%"><TR><TD ALIGN="left" VALIGN="top">
<UL><LI><I>Author</I>: David Sugar <dyfet@ostel.com> </LI>
<LI>Documentation generated by dyfet@home.sys on Thu Dec 16 09:54:26 EST 1999
</LI>
</UL></TD><TD ALIGN="RIGHT" VALIGN="TOP">
<b>K</b><i>doc</i>
</TD>
</TR></TABLE></BODY></HTML>
|