27 #include <linux/if_addr.h>
38 return os <<
"nowhere";
44 return os <<
"global";
50 const boost::asio::ip::address& ip,
51 const boost::asio::ip::address& broadcast,
57 , m_broadcast(broadcast)
58 , m_prefixLength(prefixLength)
68 return m_flags & IFA_F_DEPRECATED;
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)
boost::asio::ip::address getIp() const
Returns the IP address (v4 or v6)
bool isDeprecated() const
Returns true if the address is deprecated.
uint8_t getPrefixLength() const
Returns the prefix length.
std::ostream & operator<<(std::ostream &os, AddressScope scope)