3#include <xrpl/beast/hash/hash_append.h>
4#include <xrpl/beast/hash/uhash.h>
5#include <xrpl/beast/net/IPAddressV4.h>
6#include <xrpl/beast/net/IPAddressV6.h>
7#include <xrpl/beast/utility/instrumentation.h>
9#include <boost/asio/ip/address.hpp>
10#include <boost/functional/hash.hpp>
28 return addr.to_string();
37 return addr.is_loopback();
46 return addr.is_unspecified();
55 return addr.is_multicast();
80template <
class Hasher>
89 else if (addr.is_v6())
96 UNREACHABLE(
"beast::hash_append : invalid address type");
111 return ::beast::Uhash<>{}(addr);
bool isLoopback(Address const &addr)
Returns true if this is a loopback address.
boost::asio::ip::address Address
bool isPublic(Address const &addr)
Returns true if the address is a public routable address.
bool isUnspecified(Address const &addr)
Returns true if the address is unspecified.
bool isPrivate(Address const &addr)
Returns true if the address is a private unroutable address.
bool isMulticast(Address const &addr)
Returns true if the address is a multicast address.
std::string to_string(Address const &addr)
Returns the address represented as a string.
void hash_append(Hasher &h, T const &t) noexcept
Logically concatenate input data to a Hasher.
std::size_t operator()(::beast::ip::Address const &addr) const