Insane_DNS/libraries/asio-1.28.1/doc/asio/reference/ip__address_v4.html

532 lines
18 KiB
HTML
Raw Normal View History

2023-10-24 21:59:30 -04:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ip::address_v4</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Asio">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="ip__address/to_v6.html" title="ip::address::to_v6">
<link rel="next" href="ip__address_v4/address_v4.html" title="ip::address_v4::address_v4">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ip__address/to_v6.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="ip__address_v4/address_v4.html"><img src="../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="asio.reference.ip__address_v4"></a><a class="link" href="ip__address_v4.html" title="ip::address_v4">ip::address_v4</a>
</h3></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.ip__address_v4"></a>
</p>
<p>
Implements IP version 4 style addresses.
</p>
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">address_v4</span>
</pre>
<h5>
<a name="asio.reference.ip__address_v4.h0"></a>
<span><a name="asio.reference.ip__address_v4.types"></a></span><a class="link" href="ip__address_v4.html#asio.reference.ip__address_v4.types">Types</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/bytes_type.html" title="ip::address_v4::bytes_type"><span class="bold"><strong>bytes_type</strong></span></a>
</p>
</td>
<td>
<p>
The type used to represent an address as an array of bytes.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/uint_type.html" title="ip::address_v4::uint_type"><span class="bold"><strong>uint_type</strong></span></a>
</p>
</td>
<td>
<p>
The type used to represent an address as an unsigned integer.
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="asio.reference.ip__address_v4.h1"></a>
<span><a name="asio.reference.ip__address_v4.member_functions"></a></span><a class="link" href="ip__address_v4.html#asio.reference.ip__address_v4.member_functions">Member
Functions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/address_v4.html" title="ip::address_v4::address_v4"><span class="bold"><strong>address_v4</strong></span></a> <span class="silver">[constructor]</span>
</p>
</td>
<td>
<p>
Default constructor. <br> <span class="silver"></span><br> Construct an address from raw
bytes. <br> <span class="silver"></span><br> Construct an address from an unsigned integer
in host byte order. <br> <span class="silver"></span><br> Copy constructor.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/any.html" title="ip::address_v4::any"><span class="bold"><strong>any</strong></span></a>
<span class="silver">[static]</span>
</p>
</td>
<td>
<p>
Obtain an address object that represents any address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/broadcast.html" title="ip::address_v4::broadcast"><span class="bold"><strong>broadcast</strong></span></a> <span class="silver">[static]</span>
</p>
</td>
<td>
<p>
Obtain an address object that represents the broadcast address.
<br> <span class="silver"></span><br> (Deprecated: Use network_v4 class.) Obtain an address
object that represents the broadcast address that corresponds to
the specified address and netmask.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/from_string.html" title="ip::address_v4::from_string"><span class="bold"><strong>from_string</strong></span></a> <span class="silver">[static]</span>
</p>
</td>
<td>
<p>
(Deprecated: Use make_address_v4().) Create an address from an
IP address string in dotted decimal form.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/is_class_a.html" title="ip::address_v4::is_class_a"><span class="bold"><strong>is_class_a</strong></span></a>
</p>
</td>
<td>
<p>
(Deprecated: Use network_v4 class.) Determine whether the address
is a class A address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/is_class_b.html" title="ip::address_v4::is_class_b"><span class="bold"><strong>is_class_b</strong></span></a>
</p>
</td>
<td>
<p>
(Deprecated: Use network_v4 class.) Determine whether the address
is a class B address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/is_class_c.html" title="ip::address_v4::is_class_c"><span class="bold"><strong>is_class_c</strong></span></a>
</p>
</td>
<td>
<p>
(Deprecated: Use network_v4 class.) Determine whether the address
is a class C address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/is_loopback.html" title="ip::address_v4::is_loopback"><span class="bold"><strong>is_loopback</strong></span></a>
</p>
</td>
<td>
<p>
Determine whether the address is a loopback address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/is_multicast.html" title="ip::address_v4::is_multicast"><span class="bold"><strong>is_multicast</strong></span></a>
</p>
</td>
<td>
<p>
Determine whether the address is a multicast address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/is_unspecified.html" title="ip::address_v4::is_unspecified"><span class="bold"><strong>is_unspecified</strong></span></a>
</p>
</td>
<td>
<p>
Determine whether the address is unspecified.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/loopback.html" title="ip::address_v4::loopback"><span class="bold"><strong>loopback</strong></span></a> <span class="silver">[static]</span>
</p>
</td>
<td>
<p>
Obtain an address object that represents the loopback address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/netmask.html" title="ip::address_v4::netmask"><span class="bold"><strong>netmask</strong></span></a> <span class="silver">[static]</span>
</p>
</td>
<td>
<p>
(Deprecated: Use network_v4 class.) Obtain the netmask that corresponds
to the address, based on its address class.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_eq_.html" title="ip::address_v4::operator="><span class="bold"><strong>operator=</strong></span></a>
</p>
</td>
<td>
<p>
Assign from another address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/to_bytes.html" title="ip::address_v4::to_bytes"><span class="bold"><strong>to_bytes</strong></span></a>
</p>
</td>
<td>
<p>
Get the address in bytes, in network byte order.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/to_string.html" title="ip::address_v4::to_string"><span class="bold"><strong>to_string</strong></span></a>
</p>
</td>
<td>
<p>
Get the address as a string in dotted decimal format. <br> <span class="silver"></span><br>
(Deprecated: Use other overload.) Get the address as a string in
dotted decimal format.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/to_uint.html" title="ip::address_v4::to_uint"><span class="bold"><strong>to_uint</strong></span></a>
</p>
</td>
<td>
<p>
Get the address as an unsigned integer in host byte order.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/to_ulong.html" title="ip::address_v4::to_ulong"><span class="bold"><strong>to_ulong</strong></span></a>
</p>
</td>
<td>
<p>
(Deprecated: Use to_uint().) Get the address as an unsigned long
in host byte order.
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="asio.reference.ip__address_v4.h2"></a>
<span><a name="asio.reference.ip__address_v4.friends"></a></span><a class="link" href="ip__address_v4.html#asio.reference.ip__address_v4.friends">Friends</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_not__eq_.html" title="ip::address_v4::operator!="><span class="bold"><strong>operator!=</strong></span></a>
</p>
</td>
<td>
<p>
Compare two addresses for inequality.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_lt_.html" title="ip::address_v4::operator&lt;"><span class="bold"><strong>operator&lt;</strong></span></a>
</p>
</td>
<td>
<p>
Compare addresses for ordering.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_lt__eq_.html" title="ip::address_v4::operator&lt;="><span class="bold"><strong>operator&lt;=</strong></span></a>
</p>
</td>
<td>
<p>
Compare addresses for ordering.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_eq__eq_.html" title="ip::address_v4::operator=="><span class="bold"><strong>operator==</strong></span></a>
</p>
</td>
<td>
<p>
Compare two addresses for equality.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_gt_.html" title="ip::address_v4::operator&gt;"><span class="bold"><strong>operator&gt;</strong></span></a>
</p>
</td>
<td>
<p>
Compare addresses for ordering.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_gt__eq_.html" title="ip::address_v4::operator&gt;="><span class="bold"><strong>operator&gt;=</strong></span></a>
</p>
</td>
<td>
<p>
Compare addresses for ordering.
</p>
</td>
</tr>
</tbody>
</table></div>
<h5>
<a name="asio.reference.ip__address_v4.h3"></a>
<span><a name="asio.reference.ip__address_v4.related_functions"></a></span><a class="link" href="ip__address_v4.html#asio.reference.ip__address_v4.related_functions">Related
Functions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/make_address_v4.html" title="ip::address_v4::make_address_v4"><span class="bold"><strong>make_address_v4</strong></span></a>
</p>
</td>
<td>
<p>
Create an IPv4 address from raw bytes in network order.
</p>
<p>
Create an IPv4 address from an unsigned integer in host byte order.
</p>
<p>
Create an IPv4 address from an IP address string in dotted decimal
form.
</p>
<p>
Create an IPv4 address from a IPv4-mapped IPv6 address.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/make_network_v4.html" title="ip::address_v4::make_network_v4"><span class="bold"><strong>make_network_v4</strong></span></a>
</p>
</td>
<td>
<p>
Create an IPv4 network from an address and prefix length.
</p>
<p>
Create an IPv4 network from an address and netmask.
</p>
</td>
</tr>
<tr>
<td>
<p>
<a class="link" href="ip__address_v4/operator_lt__lt_.html" title="ip::address_v4::operator&lt;&lt;"><span class="bold"><strong>operator&lt;&lt;</strong></span></a>
</p>
</td>
<td>
<p>
Output an address as a string.
</p>
<p>
Output a network as a string.
</p>
</td>
</tr>
</tbody>
</table></div>
<p>
The <a class="link" href="ip__address_v4.html" title="ip::address_v4"><code class="computeroutput"><span class="identifier">ip</span><span class="special">::</span><span class="identifier">address_v4</span></code></a>
class provides the ability to use and manipulate IP version 4 addresses.
</p>
<h5>
<a name="asio.reference.ip__address_v4.h4"></a>
<span><a name="asio.reference.ip__address_v4.thread_safety"></a></span><a class="link" href="ip__address_v4.html#asio.reference.ip__address_v4.thread_safety">Thread
Safety</a>
</h5>
<p>
<span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
</p>
<p>
<span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe.
</p>
<h5>
<a name="asio.reference.ip__address_v4.h5"></a>
<span><a name="asio.reference.ip__address_v4.requirements"></a></span><a class="link" href="ip__address_v4.html#asio.reference.ip__address_v4.requirements">Requirements</a>
</h5>
<p>
<span class="emphasis"><em>Header: </em></span><code class="literal">asio/ip/address_v4.hpp</code>
</p>
<p>
<span class="emphasis"><em>Convenience header: </em></span><code class="literal">asio.hpp</code>
</p>
</div>
<div class="copyright-footer">Copyright © 2003-2023 Christopher M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="ip__address/to_v6.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="ip__address_v4/address_v4.html"><img src="../../next.png" alt="Next"></a>
</div>
</body>
</html>