mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Per XLS-0095, we are taking steps to rename ripple(d) to xrpl(d). This change specifically removes all copyright notices referencing Ripple, XRPLF, and certain affiliated contributors upon mutual agreement, so the notice in the LICENSE.md file applies throughout. Copyright notices referencing external contributions remain as-is. Duplicate verbiage is also removed.
31 lines
678 B
C++
31 lines
678 B
C++
#ifndef BEAST_NET_IPADDRESSV4_H_INCLUDED
|
|
#define BEAST_NET_IPADDRESSV4_H_INCLUDED
|
|
|
|
#include <xrpl/beast/hash/hash_append.h>
|
|
|
|
#include <boost/asio/ip/address_v4.hpp>
|
|
|
|
namespace beast {
|
|
namespace 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 IP
|
|
} // namespace beast
|
|
|
|
#endif
|