27 #include <linux/if_addr.h>
37 return os <<
"nowhere";
43 return os <<
"global";
49 const boost::asio::ip::address& ip,
50 const boost::asio::ip::address& broadcast,
56 , m_broadcast(broadcast)
57 , m_prefixLength(prefixLength)
67 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)