20#include <xrpl/beast/net/IPAddressV4.h>
28 return ((addr.to_ulong() & 0xff000000) ==
30 ((addr.to_ulong() & 0xfff00000) ==
32 ((addr.to_ulong() & 0xffff0000) ==
40 return !
is_private(addr) && !addr.is_multicast();
46 static char const* table =
"AAAABBCD";
47 return table[(addr.to_ulong() & 0xE0000000) >> 29];
char get_class(AddressV4 const &address)
Returns the address class for the given address.
bool is_public(Address const &addr)
Returns true if the address is a public routable address.
boost::asio::ip::address_v4 AddressV4
bool is_private(Address const &addr)
Returns true if the address is a private unroutable address.