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>
25 return addr.to_string();
32 return addr.is_loopback();
39 return addr.is_unspecified();
46 return addr.is_multicast();
67template <
class Hasher>
76 else if (addr.is_v6())
83 UNREACHABLE(
"beast::hash_append : invalid address type");
98 return ::beast::Uhash<>{}(addr);
bool isMulticast(Address const &addr)
Returns true if the address is a multicast address.
bool isPublic(Address const &addr)
Returns true if the address is a public routable address.
bool isLoopback(Address const &addr)
Returns true if this is a loopback 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.
boost::asio::ip::address Address
std::string to_string(Address const &addr)
Returns the address represented as a string.
std::enable_if_t< IsContiguouslyHashable< T, Hasher >::value > 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