File: Poco.Net.IPAddress.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (305 lines) | stat: -rw-r--r-- 27,259 bytes parent folder | download | duplicates (2)
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::IPAddress</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class IPAddress</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> NetCore<br />
<b>Header:</b> Poco/Net/IPAddress.h</p>
<h2>Description</h2>
<div class="description">
<p>This class represents an internet (IP) host address. The address can belong either to the <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> or the <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address family. </p>
<p>Relational operators (==, !=, &lt;, &lt;=, &gt;, &gt;=) are supported. However, you must not interpret any special meaning into the result of these  operations, other than that the results are consistent. </p>
<p>Especially, an <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> address is never equal to an <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address, even if the <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address is <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> compatible and the addresses are the same. </p>
<p><a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> addresses are supported only if the target platform supports <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.IPAddress.html#13645" title="Poco::Net::IPAddress::addr()">addr</a>, <a href="Poco.Net.IPAddress.html#13646" title="Poco::Net::IPAddress::af()">af</a>, <a href="Poco.Net.IPAddress.html#13615" title="Poco::Net::IPAddress::family()">family</a>, <a href="Poco.Net.IPAddress.html#13659" title="Poco::Net::IPAddress::init()">init</a>, <a href="Poco.Net.IPAddress.html#13618" title="Poco::Net::IPAddress::isBroadcast()">isBroadcast</a>, <a href="Poco.Net.IPAddress.html#13631" title="Poco::Net::IPAddress::isGlobalMC()">isGlobalMC</a>, <a href="Poco.Net.IPAddress.html#13624" title="Poco::Net::IPAddress::isIPv4Compatible()">isIPv4Compatible</a>, <a href="Poco.Net.IPAddress.html#13625" title="Poco::Net::IPAddress::isIPv4Mapped()">isIPv4Mapped</a>, <a href="Poco.Net.IPAddress.html#13622" title="Poco::Net::IPAddress::isLinkLocal()">isLinkLocal</a>, <a href="Poco.Net.IPAddress.html#13628" title="Poco::Net::IPAddress::isLinkLocalMC()">isLinkLocalMC</a>, <a href="Poco.Net.IPAddress.html#13619" title="Poco::Net::IPAddress::isLoopback()">isLoopback</a>, <a href="Poco.Net.IPAddress.html#13620" title="Poco::Net::IPAddress::isMulticast()">isMulticast</a>, <a href="Poco.Net.IPAddress.html#13627" title="Poco::Net::IPAddress::isNodeLocalMC()">isNodeLocalMC</a>, <a href="Poco.Net.IPAddress.html#13630" title="Poco::Net::IPAddress::isOrgLocalMC()">isOrgLocalMC</a>, <a href="Poco.Net.IPAddress.html#13623" title="Poco::Net::IPAddress::isSiteLocal()">isSiteLocal</a>, <a href="Poco.Net.IPAddress.html#13629" title="Poco::Net::IPAddress::isSiteLocalMC()">isSiteLocalMC</a>, <a href="Poco.Net.IPAddress.html#13621" title="Poco::Net::IPAddress::isUnicast()">isUnicast</a>, <a href="Poco.Net.IPAddress.html#13626" title="Poco::Net::IPAddress::isWellKnownMC()">isWellKnownMC</a>, <a href="Poco.Net.IPAddress.html#13617" title="Poco::Net::IPAddress::isWildcard()">isWildcard</a>, <a href="Poco.Net.IPAddress.html#13644" title="Poco::Net::IPAddress::length()">length</a>, <a href="Poco.Net.IPAddress.html#13647" title="Poco::Net::IPAddress::mask()">mask</a>, <a href="Poco.Net.IPAddress.html#13634" title="Poco::Net::IPAddress::operator !=()">operator&nbsp;!=</a>, <a href="Poco.Net.IPAddress.html#13636" title="Poco::Net::IPAddress::operator <()">operator&nbsp;&lt;</a>, <a href="Poco.Net.IPAddress.html#13638" title="Poco::Net::IPAddress::operator <=()">operator&nbsp;&lt;=</a>, <a href="Poco.Net.IPAddress.html#13611" title="Poco::Net::IPAddress::operator =()">operator&nbsp;=</a>, <a href="Poco.Net.IPAddress.html#13632" title="Poco::Net::IPAddress::operator ==()">operator&nbsp;==</a>, <a href="Poco.Net.IPAddress.html#13640" title="Poco::Net::IPAddress::operator >()">operator&nbsp;&gt;</a>, <a href="Poco.Net.IPAddress.html#13642" title="Poco::Net::IPAddress::operator >=()">operator&nbsp;&gt;=</a>, <a href="Poco.Net.IPAddress.html#13652" title="Poco::Net::IPAddress::parse()">parse</a>, <a href="Poco.Net.IPAddress.html#13613" title="Poco::Net::IPAddress::swap()">swap</a>, <a href="Poco.Net.IPAddress.html#13616" title="Poco::Net::IPAddress::toString()">toString</a>, <a href="Poco.Net.IPAddress.html#13654" title="Poco::Net::IPAddress::tryParse()">tryParse</a></p>
<h2>Enumerations</h2>
<h3><i>Anonymous</i></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="13658">MAX_ADDRESS_LENGTH</a> = sizeof (struct in_addr)</p>
<div class="description">
<p>Maximum length in bytes of a socket address. </p>
</div>
<h3><a name="13594">Family</a></h3>
<div class="description">
<p>Possible address families for IP addresses. </p>
</div>
<p class="decl"><a name="13595">IPv4</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="13596">IPv6</a></p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="13597">IPAddress</a></h3>
<p class="decl"><a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>();</p>
<div class="description">
<p>Creates a wildcard (zero) <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>. </p>
</div>
<h3><a name="13598">IPAddress</a></h3>
<p class="decl"><a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />);</p>
<div class="description">
<p>Creates an <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> by copying another one. </p>
</div>
<h3><a name="13600">IPAddress</a></h3>
<p class="decl">explicit <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.IPAddress.html#13594" title="enum  Poco::Net::IPAddress::Family">Family</a> family<br />);</p>
<div class="description">
<p>Creates a wildcard (zero) <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> for the given address family. </p>
</div>
<h3><a name="13602">IPAddress</a></h3>
<p class="decl">explicit <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; addr<br />);</p>
<div class="description">
<p>Creates an <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> from the string containing an IP address in presentation format (dotted decimal for <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, hex string for <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>). </p>
<p>Depending on the format of addr, either an <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> or an <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address is created. </p>
<p>See <a href="Poco.Net.IPAddress.html#13616" title="Poco::Net::IPAddress::toString()">toString</a>() for details on the supported formats. </p>
<p>Throws an <a href="Poco.Net.InvalidAddressException.html" title="class Poco::Net::InvalidAddressException">InvalidAddressException</a> if the address cannot be parsed. </p>
</div>
<h3><a name="13604">IPAddress</a></h3>
<p class="decl"><a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; addr,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.IPAddress.html#13594" title="enum  Poco::Net::IPAddress::Family">Family</a> family<br />);</p>
<div class="description">
<p>Creates an <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> from the string containing an IP address in presentation format (dotted decimal for <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, hex string for <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>). </p>
</div>
<h3><a name="13607">IPAddress</a></h3>
<p class="decl"><a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const void * addr,<br />&nbsp;&nbsp;&nbsp;&nbsp;socklen_t length<br />);</p>
<div class="description">
<p>Creates an <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> from a native internet address. A pointer to a in_addr or a in6_addr structure may be  passed. </p>
</div>
<h2>Destructor</h2>
<h3><a name="13610">~IPAddress</a></h3>
<p class="decl">~<a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="13645">addr</a></h3>
<p class="decl">const void * addr() const;</p>
<div class="description">
<p>Returns the internal address structure. </p>
</div>
<h3><a name="13646">af</a></h3>
<p class="decl">int af() const;</p>
<div class="description">
<p>Returns the address family (AF_INET or AF_INET6) of the address. </p>
</div>
<h3><a name="13615">family</a></h3>
<p class="decl"><a href="Poco.Net.IPAddress.html#13594" title="enum  Poco::Net::IPAddress::Family">Family</a> family() const;</p>
<div class="description">
<p>Returns the address family (<a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> or <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>) of the address. </p>
</div>
<h3><a name="13618">isBroadcast</a></h3>
<p class="decl">bool isBroadcast() const;</p>
<div class="description">
<p>Returns true if and only if the address is a broadcast address. </p>
<p>Only <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> addresses can be broadcast addresses. In a broadcast address, all bits are one. </p>
<p>For a <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address, returns always false. </p>
</div>
<h3><a name="13631">isGlobalMC</a></h3>
<p class="decl">bool isGlobalMC() const;</p>
<div class="description">
<p>Returns true if and only if the address is a global multicast address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, global multicast addresses are in the  224.0.1.0 to 238.255.255.255 range. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, global multicast addresses are in the FFxF:x:x:x:x:x:x:x range. </p>
</div>
<h3><a name="13624">isIPv4Compatible</a></h3>
<p class="decl">bool isIPv4Compatible() const;</p>
<div class="description">
<p>Returns true if and only if the address is <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> compatible. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> addresses, this is always true. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, the address must be in the ::x:x range (the first 96 bits are zero). </p>
</div>
<h3><a name="13625">isIPv4Mapped</a></h3>
<p class="decl">bool isIPv4Mapped() const;</p>
<div class="description">
<p>Returns true if and only if the address is an <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> mapped <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> addresses, this is always true. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, the address must be in the ::FFFF:x:x range. </p>
</div>
<h3><a name="13622">isLinkLocal</a></h3>
<p class="decl">bool isLinkLocal() const;</p>
<div class="description">
<p>Returns true if and only if the address is a link local unicast address. </p>
<p><a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> link local addresses are in the 169.254.0.0/16 range, according to <a href="http://www.ietf.org/rfc/rfc3927.txt" target="_blank">RFC 3927</a>. </p>
<p><a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> link local addresses have 1111 1110 10 as the first 10 bits, followed by 54 zeros. </p>
</div>
<h3><a name="13628">isLinkLocalMC</a></h3>
<p class="decl">bool isLinkLocalMC() const;</p>
<div class="description">
<p>Returns true if and only if the address is a link-local multicast address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, link-local multicast addresses are in the 224.0.0.0/24 range. Note that this overlaps with the range for well-known multicast addresses. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, link-local multicast addresses are in the FFx2:x:x:x:x:x:x:x range. </p>
</div>
<h3><a name="13619">isLoopback</a></h3>
<p class="decl">bool isLoopback() const;</p>
<div class="description">
<p>Returns true if and only if the address is a loopback address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, the loopback address is 127.0.0.1. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, the loopback address is ::1. </p>
</div>
<h3><a name="13620">isMulticast</a></h3>
<p class="decl">bool isMulticast() const;</p>
<div class="description">
<p>Returns true if and only if the address is a multicast address. </p>
<p><a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> multicast addresses are in the 224.0.0.0 to 239.255.255.255 range (the first four bits have the value 1110). </p>
<p><a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> multicast addresses are in the FFxx:x:x:x:x:x:x:x range. </p>
</div>
<h3><a name="13627">isNodeLocalMC</a></h3>
<p class="decl">bool isNodeLocalMC() const;</p>
<div class="description">
<p>Returns true if and only if the address is a node-local multicast address. </p>
<p><a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> does not support node-local addresses, thus the result is always false for an <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, node-local multicast addresses are in the FFx1:x:x:x:x:x:x:x range. </p>
</div>
<h3><a name="13630">isOrgLocalMC</a></h3>
<p class="decl">bool isOrgLocalMC() const;</p>
<div class="description">
<p>Returns true if and only if the address is a organization-local multicast address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, organization-local multicast addresses are in the 239.192.0.0/16 range. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, organization-local multicast addresses are in the FFx8:x:x:x:x:x:x:x range. </p>
</div>
<h3><a name="13623">isSiteLocal</a></h3>
<p class="decl">bool isSiteLocal() const;</p>
<div class="description">
<p>Returns true if and only if the address is a site local unicast address. </p>
<p><a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> site local addresses are in on of the 10.0.0.0/24, 192.168.0.0/16 or 172.16.0.0 to 172.31.255.255 ranges. </p>
<p><a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> site local addresses have 1111 1110 11 as the first 10 bits, followed by 38 zeros. </p>
</div>
<h3><a name="13629">isSiteLocalMC</a></h3>
<p class="decl">bool isSiteLocalMC() const;</p>
<div class="description">
<p>Returns true if and only if the address is a site-local multicast address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, site local multicast addresses are in the 239.255.0.0/16 range. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, site-local multicast addresses are in the FFx5:x:x:x:x:x:x:x range. </p>
</div>
<h3><a name="13621">isUnicast</a></h3>
<p class="decl">bool isUnicast() const;</p>
<div class="description">
<p>Returns true if and only if the address is a unicast address. </p>
<p>An address is unicast if it is neither a wildcard, broadcast or multicast address. </p>
</div>
<h3><a name="13626">isWellKnownMC</a></h3>
<p class="decl">bool isWellKnownMC() const;</p>
<div class="description">
<p>Returns true if and only if the address is a well-known multicast address. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, well-known multicast addresses are in the  224.0.0.0/8 range. </p>
<p>For <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>, well-known multicast addresses are in the  FF0x:x:x:x:x:x:x:x range. </p>
</div>
<h3><a name="13617">isWildcard</a></h3>
<p class="decl">bool isWildcard() const;</p>
<div class="description">
<p>Returns true if and only if the address is a wildcard (all zero) address. </p>
</div>
<h3><a name="13644">length</a></h3>
<p class="decl">socklen_t length() const;</p>
<div class="description">
<p>Returns the length in bytes of the internal socket address structure.	 </p>
</div>
<h3><a name="13647">mask</a></h3>
<p class="decl">void mask(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; mask<br />);</p>
<div class="description">
<p>Masks the IP address using the given netmask, which is usually a <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> subnet mask. Only supported for <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> addresses. </p>
<p>The new address is (address &amp; mask). </p>
</div>
<h3><a name="13649">mask</a></h3>
<p class="decl">void mask(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; mask,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; set<br />);</p>
<div class="description">
<p>Masks the IP address using the given netmask, which is usually a <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> subnet mask. Only supported for <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> addresses. </p>
<p>The new address is (address &amp; mask) | (set &amp; ~mask). </p>
</div>
<h3><a name="13634">operator !=</a></h3>
<p class="decl">bool operator != (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="13636">operator &lt;</a></h3>
<p class="decl">bool operator &lt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="13638">operator &lt;=</a></h3>
<p class="decl">bool operator &lt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="13611">operator =</a></h3>
<p class="decl"><a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />);</p>
<div class="description">
<p>Assigns an <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a>. </p>
</div>
<h3><a name="13632">operator ==</a></h3>
<p class="decl">bool operator == (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="13640">operator &gt;</a></h3>
<p class="decl">bool operator &gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="13642">operator &gt;=</a></h3>
<p class="decl">bool operator &gt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; addr<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="13652">parse</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> parse(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; addr<br />);</p>
<div class="description">
<p>Creates an <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> from the string containing an IP address in presentation format (dotted decimal for <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, hex string for <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>). </p>
<p>Depending on the format of addr, either an <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> or an <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address is created. </p>
<p>See <a href="Poco.Net.IPAddress.html#13616" title="Poco::Net::IPAddress::toString()">toString</a>() for details on the supported formats. </p>
<p>Throws an <a href="Poco.Net.InvalidAddressException.html" title="class Poco::Net::InvalidAddressException">InvalidAddressException</a> if the address cannot be parsed. </p>
</div>
<h3><a name="13613">swap</a></h3>
<p class="decl">void swap(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; address<br />);</p>
<div class="description">
<p>Swaps the <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> with another one. </p>
</div>
<h3><a name="13616">toString</a></h3>
<p class="decl">std::string toString() const;</p>
<div class="description">
<p>Returns a string containing a representation of the address in presentation format. </p>
<p>For <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> addresses the result will be in dotted-decimal (d.d.d.d) notation. </p>
<p>Textual representation of <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> address is one of the following forms: </p>
<p>The preferred form is x:x:x:x:x:x:x:x, where the 'x's are the hexadecimal  values of the eight 16-bit pieces of the address. This is the full form. Example: 1080:0:0:0:8:600:200A:425C </p>
<p>It is not necessary to write the leading zeros in an individual field.  However, there must be at least one numeral in every field, except as described below. </p>
<p>It is common for <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a> addresses to contain long strings of zero bits.  In order to make writing addresses containing zero bits easier, a special syntax is  available to compress the zeros. The use of &quot;::&quot; indicates multiple groups of 16-bits of zeros.  The &quot;::&quot; can only appear once in an address. The &quot;::&quot; can also be used to compress the leading  and/or trailing zeros in an address. Example: 1080::8:600:200A:425C </p>
<p>For dealing with <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> compatible addresses in a mixed environment, a special syntax is available: x:x:x:x:x:x:d.d.d.d, where the 'x's are the  hexadecimal values of the six high-order 16-bit pieces of the address,  and the 'd's are the decimal values of the four low-order 8-bit pieces of the  standard <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a> representation address. Example: ::FFFF:192.168.1.120 </p>
</div>
<h3><a name="13654">tryParse</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static bool tryParse(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; addr,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; result<br />);</p>
<div class="description">
<p>Tries to interpret the given address string as an IP address in presentation format (dotted decimal for <a href="Poco.Net.IPAddress.html#13595" title="Poco::Net::IPAddress::IPv4">IPv4</a>, hex string for <a href="Poco.Net.IPAddress.html#13596" title="Poco::Net::IPAddress::IPv6">IPv6</a>). </p>
<p>Returns true and stores the <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> in result if the string contains a valid address. </p>
<p>Returns false and leaves result unchanged otherwise. </p>
</div>
<h3><a name="13659">init</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void init(<br />&nbsp;&nbsp;&nbsp;&nbsp;IPAddressImpl * pImpl<br />);</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>