mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com> Co-authored-by: Bart <bthomee@users.noreply.github.com>
26 lines
575 B
C++
26 lines
575 B
C++
#pragma once
|
|
|
|
#include <xrpl/beast/hash/hash_append.h>
|
|
|
|
#include <boost/asio/ip/address_v4.hpp>
|
|
|
|
namespace beast::IP {
|
|
|
|
using AddressV4 = boost::asio::ip::address_v4;
|
|
|
|
/** Returns `true` if the address is a private unroutable address. */
|
|
bool
|
|
is_private(AddressV4 const& addr);
|
|
|
|
/** Returns `true` if the address is a public routable address. */
|
|
bool
|
|
is_public(AddressV4 const& addr);
|
|
|
|
/** Returns the address class for the given address.
|
|
@note Class 'D' represents multicast addresses (224.*.*.*).
|
|
*/
|
|
char
|
|
get_class(AddressV4 const& address);
|
|
|
|
} // namespace beast::IP
|