File: InetHostAddress.html

package info (click to toggle)
libape 1.0.0-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,572 kB
  • ctags: 1,343
  • sloc: sh: 7,342; cpp: 3,418; makefile: 117
file content (115 lines) | stat: -rw-r--r-- 4,390 bytes parent folder | download
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<HTML><HEAD><TITLE>InetHostAddress Class</TITLE></HEAD>
<BODY bgcolor="#ffffff">

<H1>InetHostAddress 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>Address of a specific Internet host machine.   <a href="#short">More...</a></P>
<P>
<code>
	#include &lt;<a href="socket-h.html">socket.h</a>&gt;
</code>

</P>

<P>
Inherits: <a href="InetAddress.html">InetAddress</a>
<P>
<H2>Public Members</H2>
<UL>
<LI> <b><a href="#ref0">InetHostAddress</a></b> (const char *host = NULL) 
</LI>
<LI> <b><a href="#ref1">InetHostAddress</a></b> (struct in_addr addr) 
</LI>
<LI>InetHostAddress&amp; <b><a href="#ref2">operator=</a></b> (struct in_addr addr) 
</LI>
<LI>bool <b><a href="#ref3">operator==</a></b> (InetHostAddress &amp;a) 
</LI>
<LI>bool <b><a href="#ref4">operator!=</a></b> (InetHostAddress &amp;a) 
</LI>
<LI>InetHostAddress&amp; <b><a href="#ref5">operator&amp;=</a></b> (InetMaskAddress &amp;mask) 
</LI>
<LI>	friend class <b><a name="ref6">InetMaskAddress</a></b>
</LI>
<LI>friend InetHostAddress <b><a name="ref7">operator&amp;</a></b> (InetHostAddress &amp;addr, InetMaskAddress &amp;mask) 
</LI>
</UL>
<HR>
<H2><a name="short">Detailed Description</a></H2>
<P>

 This object is used to hold the actual and valid internet address of a 
 specific host machine that will be accessed through a socket.
 

</P><HR>
<H3><b> <a name="ref0"></a><a name="InetHostAddress">InetHostAddress</a>(const char *host = NULL)  </b><code>[public]</code></H3>
<p>Create a new host address for a specific internet host.  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.
If no host address is specified, the local host (127.0.0.1)
is assumed.
</p><p>
</p>
<dl><dt><b>Parameters</b>:<dd>
<table width="100%" border="0">
<tr><td align="left" valign="top">
host</td><td align="left" valign="top">
dns or physical address of an Internet host.</td></tr>
</table>
</dl>
<H3><b> <a name="ref1"></a><a name="InetHostAddress">InetHostAddress</a>(struct in_addr addr)  </b><code>[public]</code></H3>
<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><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">
binary address of internet host.</td></tr>
</table>
</dl>
<H3><b><a href="InetHostAddress.html">InetHostAddress</a>&amp; <a name="ref2"></a><a name="operator=">operator=</a>(struct in_addr addr)  </b><code>[public]</code></H3>
<p>Convert a system socket binary address into an existing
internet host address object through assignment by overloading
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">
binary address of internet host.</td></tr>
</table>
</dl>
<H3><b>bool <a name="ref3"></a><a name="operator==">operator==</a>(<a href="InetHostAddress.html">InetHostAddress</a> &amp;a)  </b><code>[public]</code></H3>
<p>Compare two internet host addresses to see if they are equal
(if they specify the physical address of the same internet host).
</p>
<H3><b>bool <a name="ref4"></a><a name="operator!=">operator!=</a>(<a href="InetHostAddress.html">InetHostAddress</a> &amp;a)  </b><code>[public]</code></H3>
<p>Compare two internet host addresses to see if they are not
equal (if they each refer to unique and different physical
ip addresses).
</p>
<H3><b><a href="InetHostAddress.html">InetHostAddress</a>&amp; <a name="ref5"></a><a name="operator&=">operator&amp;=</a>(<a href="InetMaskAddress.html">InetMaskAddress</a> &amp;mask)  </b><code>[public]</code></H3>
<p>Mask the internet host address object with a network mask address.
This is commonly used to coerce an address by subnet.
</p>
<HR>
<TABLE WIDTH="100%"><TR><TD ALIGN="left" VALIGN="top">

<UL><LI><I>Author</I>: David Sugar &lt;dyfet@ostel.com&gt;. </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>