xrpld
Loading...
Searching...
No Matches
IPAddressV4.h
1#pragma once
2
3#include <xrpl/beast/hash/hash_append.h>
4
5#include <boost/asio/ip/address_v4.hpp>
6
7namespace beast::IP {
8
9using AddressV4 = boost::asio::ip::address_v4;
10
12bool
13isPrivate(AddressV4 const& addr);
14
16bool
17isPublic(AddressV4 const& addr);
18
22char
23getClass(AddressV4 const& address);
24
25} // namespace beast::IP
char getClass(AddressV4 const &address)
Returns the address class for the given address.
bool isPublic(Address const &addr)
Returns true if the address is a public routable address.
Definition IPAddress.h:58
boost::asio::ip::address_v4 AddressV4
Definition IPAddressV4.h:9
bool isPrivate(Address const &addr)
Returns true if the address is a private unroutable address.
Definition IPAddress.h:51