~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qnetworkaddressentry.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/network/kernel/qnetworkinterface.cpp -->
 
5
<!-- qnetworkinterface.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QNetworkAddressEntry Class Reference</title>
 
7
  <title>Qt 4.6: QNetworkAddressEntry Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QNetworkAddressEntry" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QNetworkAddressEntry Class Reference<br /><span class="small-subtitle">[<a href="qtnetwork.html">QtNetwork</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QNetworkAddressEntry Class Reference<br /><span class="small-subtitle">[<a href="qtnetwork.html">QtNetwork</a> module]</span>
16
17
</h1>
17
18
<p>The QNetworkAddressEntry class stores one IP address supported by a network interface, along with its associated netmask and broadcast address. <a href="#details">More...</a></p>
18
 
<pre> #include &lt;QNetworkAddressEntry&gt;</pre><p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
 
19
<pre> #include &lt;QNetworkAddressEntry&gt;</pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
 
20
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
19
21
<p>This class was introduced in Qt 4.2.</p>
20
22
<ul>
21
23
<li><a href="qnetworkaddressentry-members.html">List of all members, including inherited members</a></li>
22
24
</ul>
 
25
<hr />
23
26
<a name="public-functions"></a>
24
 
<h3>Public Functions</h3>
25
 
<ul>
26
 
<li><div class="fn"></div><b><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></b> ()</li>
27
 
<li><div class="fn"></div><b><a href="qnetworkaddressentry.html#QNetworkAddressEntry-2">QNetworkAddressEntry</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> )</li>
28
 
<li><div class="fn"></div><b><a href="qnetworkaddressentry.html#dtor.QNetworkAddressEntry">~QNetworkAddressEntry</a></b> ()</li>
29
 
<li><div class="fn"></div>QHostAddress <b><a href="qnetworkaddressentry.html#broadcast">broadcast</a></b> () const</li>
30
 
<li><div class="fn"></div>QHostAddress <b><a href="qnetworkaddressentry.html#ip">ip</a></b> () const</li>
31
 
<li><div class="fn"></div>QHostAddress <b><a href="qnetworkaddressentry.html#netmask">netmask</a></b> () const</li>
32
 
<li><div class="fn"></div>int <b><a href="qnetworkaddressentry.html#prefixLength">prefixLength</a></b> () const</li>
33
 
<li><div class="fn"></div>void <b><a href="qnetworkaddressentry.html#setBroadcast">setBroadcast</a></b> ( const QHostAddress &amp; <i>newBroadcast</i> )</li>
34
 
<li><div class="fn"></div>void <b><a href="qnetworkaddressentry.html#setIp">setIp</a></b> ( const QHostAddress &amp; <i>newIp</i> )</li>
35
 
<li><div class="fn"></div>void <b><a href="qnetworkaddressentry.html#setNetmask">setNetmask</a></b> ( const QHostAddress &amp; <i>newNetmask</i> )</li>
36
 
<li><div class="fn"></div>void <b><a href="qnetworkaddressentry.html#setPrefixLength">setPrefixLength</a></b> ( int <i>length</i> )</li>
37
 
<li><div class="fn"></div>bool <b><a href="qnetworkaddressentry.html#operator-not-eq">operator!=</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> ) const</li>
38
 
<li><div class="fn"></div>QNetworkAddressEntry &amp; <b><a href="qnetworkaddressentry.html#operator-eq">operator=</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> )</li>
39
 
<li><div class="fn"></div>bool <b><a href="qnetworkaddressentry.html#operator-eq-eq">operator==</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> ) const</li>
40
 
</ul>
 
27
<h2>Public Functions</h2>
 
28
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
29
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#QNetworkAddressEntry">QNetworkAddressEntry</a></b> ()</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#QNetworkAddressEntry-2">QNetworkAddressEntry</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> )</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#dtor.QNetworkAddressEntry">~QNetworkAddressEntry</a></b> ()</td></tr>
 
32
<tr><td class="memItemLeft" align="right" valign="top">QHostAddress </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#broadcast">broadcast</a></b> () const</td></tr>
 
33
<tr><td class="memItemLeft" align="right" valign="top">QHostAddress </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#ip">ip</a></b> () const</td></tr>
 
34
<tr><td class="memItemLeft" align="right" valign="top">QHostAddress </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#netmask">netmask</a></b> () const</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#prefixLength">prefixLength</a></b> () const</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#setBroadcast">setBroadcast</a></b> ( const QHostAddress &amp; <i>newBroadcast</i> )</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#setIp">setIp</a></b> ( const QHostAddress &amp; <i>newIp</i> )</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#setNetmask">setNetmask</a></b> ( const QHostAddress &amp; <i>newNetmask</i> )</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#setPrefixLength">setPrefixLength</a></b> ( int <i>length</i> )</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#operator-not-eq">operator!=</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> ) const</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">QNetworkAddressEntry &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#operator-eq">operator=</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> )</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qnetworkaddressentry.html#operator-eq-eq">operator==</a></b> ( const QNetworkAddressEntry &amp; <i>other</i> ) const</td></tr>
 
43
</table>
41
44
<a name="details"></a>
42
45
<hr />
43
46
<h2>Detailed Description</h2>
46
49
<p>This class represents one such group.</p>
47
50
<hr />
48
51
<h2>Member Function Documentation</h2>
 
52
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/QNetworkAddressEntry" />
49
53
<h3 class="fn"><a name="QNetworkAddressEntry"></a>QNetworkAddressEntry::QNetworkAddressEntry ()</h3>
50
54
<p>Constructs an empty <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object.</p>
51
55
<h3 class="fn"><a name="QNetworkAddressEntry-2"></a>QNetworkAddressEntry::QNetworkAddressEntry ( const QNetworkAddressEntry &amp; <i>other</i> )</h3>
52
56
<p>Constructs a <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object that is a copy of the object <i>other</i>.</p>
 
57
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/~QNetworkAddressEntry" />
53
58
<h3 class="fn"><a name="dtor.QNetworkAddressEntry"></a>QNetworkAddressEntry::~QNetworkAddressEntry ()</h3>
54
59
<p>Destroys this <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object.</p>
 
60
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/broadcast" />
55
61
<h3 class="fn"><a name="broadcast"></a><a href="qhostaddress.html">QHostAddress</a> QNetworkAddressEntry::broadcast () const</h3>
56
62
<p>Returns the broadcast address associated with the IPv4 address and netmask. It can usually be derived from those two by setting to 1 the bits of the IP address where the netmask contains a 0. (In other words, by bitwise-OR'ing the IP address with the inverse of the netmask)</p>
57
63
<p>This member is always empty for IPv6 addresses, since the concept of broadcast has been abandoned in that system in favor of multicast. In particular, the group of hosts corresponding to all the nodes in the local network can be reached by the &quot;all-nodes&quot; special multicast group (address FF02::1).</p>
58
64
<p>See also <a href="qnetworkaddressentry.html#setBroadcast">setBroadcast</a>().</p>
 
65
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/ip" />
59
66
<h3 class="fn"><a name="ip"></a><a href="qhostaddress.html">QHostAddress</a> QNetworkAddressEntry::ip () const</h3>
60
67
<p>This function returns one IPv4 or IPv6 address found, that was found in a network interface.</p>
61
68
<p>See also <a href="qnetworkaddressentry.html#setIp">setIp</a>().</p>
 
69
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/netmask" />
62
70
<h3 class="fn"><a name="netmask"></a><a href="qhostaddress.html">QHostAddress</a> QNetworkAddressEntry::netmask () const</h3>
63
71
<p>Returns the netmask associated with the IP address. The netmask is expressed in the form of an IP address, such as 255.255.0&#x2e;0&#x2e;</p>
64
72
<p>For IPv6 addresses, the prefix length is converted to an address where the number of bits set to 1 is equal to the prefix length. For a prefix length of 64 bits (the most common value), the netmask will be expressed as a <a href="qhostaddress.html">QHostAddress</a> holding the address FFFF:FFFF:FFFF:FFFF::</p>
65
73
<p>See also <a href="qnetworkaddressentry.html#setNetmask">setNetmask</a>() and <a href="qnetworkaddressentry.html#prefixLength">prefixLength</a>().</p>
 
74
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/prefixLength" />
66
75
<h3 class="fn"><a name="prefixLength"></a>int QNetworkAddressEntry::prefixLength () const</h3>
67
76
<p>Returns the prefix length of this IP address. The prefix length matches the number of bits set to 1 in the netmask (see <a href="qnetworkaddressentry.html#netmask">netmask</a>()). For IPv4 addresses, the value is between 0 and 32. For IPv6 addresses, it's contained between 0 and 128 and is the preferred form of representing addresses.</p>
68
77
<p>This function returns -1 if the prefix length could not be determined (i.e&#x2e;, <a href="qnetworkaddressentry.html#netmask">netmask</a>() returns a null QHostAddress()).</p>
69
78
<p>This function was introduced in Qt 4.5.</p>
70
79
<p>See also <a href="qnetworkaddressentry.html#setPrefixLength">setPrefixLength</a>() and <a href="qnetworkaddressentry.html#netmask">netmask</a>().</p>
 
80
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/setBroadcast" />
71
81
<h3 class="fn"><a name="setBroadcast"></a>void QNetworkAddressEntry::setBroadcast ( const <a href="qhostaddress.html">QHostAddress</a> &amp; <i>newBroadcast</i> )</h3>
72
82
<p>Sets the broadcast IP address of this <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object to <i>newBroadcast</i>.</p>
73
83
<p>See also <a href="qnetworkaddressentry.html#broadcast">broadcast</a>().</p>
 
84
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/setIp" />
74
85
<h3 class="fn"><a name="setIp"></a>void QNetworkAddressEntry::setIp ( const <a href="qhostaddress.html">QHostAddress</a> &amp; <i>newIp</i> )</h3>
75
86
<p>Sets the IP address the <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object contains to <i>newIp</i>.</p>
76
87
<p>See also <a href="qnetworkaddressentry.html#ip">ip</a>().</p>
 
88
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/setNetmask" />
77
89
<h3 class="fn"><a name="setNetmask"></a>void QNetworkAddressEntry::setNetmask ( const <a href="qhostaddress.html">QHostAddress</a> &amp; <i>newNetmask</i> )</h3>
78
90
<p>Sets the netmask that this <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object contains to <i>newNetmask</i>. Setting the netmask also sets the prefix length to match the new netmask.</p>
79
91
<p>See also <a href="qnetworkaddressentry.html#netmask">netmask</a>() and <a href="qnetworkaddressentry.html#setPrefixLength">setPrefixLength</a>().</p>
 
92
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/setPrefixLength" />
80
93
<h3 class="fn"><a name="setPrefixLength"></a>void QNetworkAddressEntry::setPrefixLength ( int <i>length</i> )</h3>
81
94
<p>Sets the prefix length of this IP address to <i>length</i>. The value of <i>length</i> must be valid for this type of IP address: between 0 and 32 for IPv4 addresses, between 0 and 128 for IPv6 addresses. Setting to any invalid value is equivalent to setting to -1, which means &quot;no prefix length&quot;.</p>
82
95
<p>Setting the prefix length also sets the netmask (see <a href="qnetworkaddressentry.html#netmask">netmask</a>()).</p>
83
96
<p>This function was introduced in Qt 4.5.</p>
84
97
<p>See also <a href="qnetworkaddressentry.html#prefixLength">prefixLength</a>() and <a href="qnetworkaddressentry.html#setNetmask">setNetmask</a>().</p>
 
98
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/operator!=" />
85
99
<h3 class="fn"><a name="operator-not-eq"></a>bool QNetworkAddressEntry::operator!= ( const QNetworkAddressEntry &amp; <i>other</i> ) const</h3>
86
100
<p>Returns true if this network address entry is different from <i>other</i>.</p>
 
101
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/operator=" />
87
102
<h3 class="fn"><a name="operator-eq"></a>QNetworkAddressEntry &amp; QNetworkAddressEntry::operator= ( const QNetworkAddressEntry &amp; <i>other</i> )</h3>
88
103
<p>Makes a copy of the <a href="qnetworkaddressentry.html">QNetworkAddressEntry</a> object <i>other</i>.</p>
 
104
<a name="//apple_ref/cpp/instm/QNetworkAddressEntry/operator==" />
89
105
<h3 class="fn"><a name="operator-eq-eq"></a>bool QNetworkAddressEntry::operator== ( const QNetworkAddressEntry &amp; <i>other</i> ) const</h3>
90
106
<p>Returns true if this network address entry is the same as <i>other</i>.</p>
91
107
<p /><address><hr /><div align="center">
92
108
<table width="100%" cellspacing="0" border="0"><tr class="address">
93
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
94
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
95
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
96
 
</tr></table></div></address></body>
 
109
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
110
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
111
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
112
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
97
113
</html>