rippled
Loading...
Searching...
No Matches
IPAddressV4.h
1#ifndef BEAST_NET_IPADDRESSV4_H_INCLUDED
2#define BEAST_NET_IPADDRESSV4_H_INCLUDED
3
4#include <xrpl/beast/hash/hash_append.h>
5
6#include <boost/asio/ip/address_v4.hpp>
7
8namespace beast {
9namespace IP {
10
11using AddressV4 = boost::asio::ip::address_v4;
12
14bool
15is_private(AddressV4 const& addr);
16
18bool
19is_public(AddressV4 const& addr);
20
24char
25get_class(AddressV4 const& address);
26
27} // namespace IP
28} // namespace beast
29
30#endif
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.
Definition IPAddress.h:59
boost::asio::ip::address_v4 AddressV4
Definition IPAddressV4.h:11
bool is_private(Address const &addr)
Returns true if the address is a private unroutable address.
Definition IPAddress.h:52