24 #ifndef NDN_CXX_NET_NETWORK_ADDRESS_HPP
25 #define NDN_CXX_NET_NETWORK_ADDRESS_HPP
29 #include <boost/asio/ip/address.hpp>
57 const boost::asio::ip::address& ip,
58 const boost::asio::ip::address& broadcast,
75 boost::asio::ip::address
84 boost::asio::ip::address
96 return m_prefixLength;
128 return a.m_ip < b.m_ip;
133 boost::asio::ip::address m_ip;
134 boost::asio::ip::address m_broadcast;
135 uint8_t m_prefixLength;
141 operator<<(std::ostream& os,
const NetworkAddress& address);
Stores one IP address supported by a network interface.
NetworkAddress(AddressFamily family, const boost::asio::ip::address &ip, const boost::asio::ip::address &broadcast, uint8_t prefixLength, AddressScope scope, uint32_t flags)
uint32_t getFlags() const
Returns a bitset of platform-specific flags enabled on the address.
AddressFamily getFamily() const
Returns the address family.
boost::asio::ip::address getBroadcast() const
Returns the IP broadcast address.
friend bool operator<(const NetworkAddress &a, const NetworkAddress &b)
boost::asio::ip::address getIp() const
Returns the IP address (v4 or v6)
AddressScope getScope() const
Returns the address scope.
bool isDeprecated() const
Returns true if the address is deprecated.
uint8_t getPrefixLength() const
Returns the prefix length.
Common includes and macros used throughout the library.
std::ostream & operator<<(std::ostream &os, AddressScope scope)