Namespaces | |
detail | |
Classes | |
class | GenlFamilyResolver |
class | GenlSocket |
class | IfAddrs |
class | NetlinkMessage |
class | NetlinkMessageAttributes |
class | NetlinkSocket |
class | NetlinkSocketOption |
class | NetworkAddress |
Stores one IP address supported by a network interface. More... | |
class | NetworkInterface |
Represents one network interface attached to the host. More... | |
class | NetworkMonitor |
Network interface monitor. More... | |
class | NetworkMonitorImpl |
class | NetworkMonitorImplNetlink |
class | NetworkMonitorImplNoop |
class | NetworkMonitorImplOsx |
class | NetworkMonitorImplStub |
class | NetworkMonitorStub |
a stub NetworkMonitor for unit testing More... | |
class | RtnlSocket |
Enumerations | |
enum | AddressFamily { AddressFamily::UNSPECIFIED, AddressFamily::V4, AddressFamily::V6 } |
enum | AddressScope { AddressScope::NOWHERE, AddressScope::HOST, AddressScope::LINK, AddressScope::GLOBAL } |
enum | InterfaceType { InterfaceType::UNKNOWN, InterfaceType::LOOPBACK, InterfaceType::ETHERNET } |
Indicates the hardware type of a network interface. More... | |
enum | InterfaceState { InterfaceState::UNKNOWN, InterfaceState::DOWN, InterfaceState::NO_CARRIER, InterfaceState::DORMANT, InterfaceState::RUNNING } |
Indicates the state of a network interface. More... | |
Functions | |
template<typename T > | |
constexpr size_t | getAttributeLength (const T *attr) |
template<> | |
constexpr size_t | getAttributeLength (const nlattr *attr) |
template<> | |
constexpr size_t | getAttributeLength (const rtattr *attr) |
template<typename T > | |
constexpr size_t | getAttributeLengthAligned (const T *attr) |
template<> | |
constexpr size_t | getAttributeLengthAligned (const nlattr *attr) |
template<> | |
constexpr size_t | getAttributeLengthAligned (const rtattr *attr) |
template<typename T > | |
constexpr uint16_t | getAttributeType (const T *attr) |
template<> | |
constexpr uint16_t | getAttributeType (const nlattr *attr) |
template<> | |
constexpr uint16_t | getAttributeType (const rtattr *attr) |
template<typename T > | |
const uint8_t * | getAttributeValue (const T *attr) |
template<> | |
const uint8_t * | getAttributeValue (const nlattr *attr) |
template<> | |
const uint8_t * | getAttributeValue (const rtattr *attr) |
template<typename T > | |
constexpr size_t | getAttributeValueLength (const T *attr) |
template<> | |
constexpr size_t | getAttributeValueLength (const nlattr *attr) |
template<> | |
constexpr size_t | getAttributeValueLength (const rtattr *attr) |
static InterfaceType | ifiTypeToInterfaceType (uint16_t type) |
static AddressFamily | ifaFamilyToAddressFamily (uint8_t family) |
static AddressScope | ifaScopeToAddressScope (uint8_t scope) |
static void | updateInterfaceState (NetworkInterface &interface, uint8_t operState) |
template<typename AddressBytes > | |
static uint8_t | computePrefixLength (const AddressBytes &mask) |
std::ostream & | operator<< (std::ostream &os, AddressScope scope) |
std::ostream & | operator<< (std::ostream &os, const NetworkAddress &addr) |
std::ostream & | operator<< (std::ostream &os, InterfaceType type) |
std::ostream & | operator<< (std::ostream &os, InterfaceState state) |
static void | printFlag (std::ostream &os, uint32_t &flags, uint32_t flagVal, const char *flagStr) |
std::ostream & | operator<< (std::ostream &os, const NetworkInterface &netif) |
static unique_ptr< NetworkMonitorImpl > | makeNetworkMonitorImpl (boost::asio::io_service &io) |
|
strong |
Enumerator | |
---|---|
UNSPECIFIED | |
V4 | |
V6 |
Definition at line 34 of file network-address.hpp.
|
strong |
Enumerator | |
---|---|
NOWHERE | |
HOST | |
LINK | |
GLOBAL |
Definition at line 40 of file network-address.hpp.
|
strong |
Indicates the hardware type of a network interface.
Enumerator | |
---|---|
UNKNOWN | |
LOOPBACK | |
ETHERNET |
Definition at line 38 of file network-interface.hpp.
|
strong |
Indicates the state of a network interface.
Definition at line 50 of file network-interface.hpp.
constexpr size_t ndn::net::getAttributeLength | ( | const T * | attr | ) |
constexpr size_t ndn::net::getAttributeLength | ( | const nlattr * | attr | ) |
Definition at line 53 of file netlink-message.hpp.
constexpr size_t ndn::net::getAttributeLength | ( | const rtattr * | attr | ) |
Definition at line 60 of file netlink-message.hpp.
References getAttributeLengthAligned().
constexpr size_t ndn::net::getAttributeLengthAligned | ( | const T * | attr | ) |
Referenced by ndn::net::NetlinkMessageAttributes< T >::getAttributeByType(), and getAttributeLength().
constexpr size_t ndn::net::getAttributeLengthAligned | ( | const nlattr * | attr | ) |
Definition at line 71 of file netlink-message.hpp.
constexpr size_t ndn::net::getAttributeLengthAligned | ( | const rtattr * | attr | ) |
Definition at line 78 of file netlink-message.hpp.
References getAttributeType().
constexpr uint16_t ndn::net::getAttributeType | ( | const T * | attr | ) |
constexpr uint16_t ndn::net::getAttributeType | ( | const nlattr * | attr | ) |
Definition at line 89 of file netlink-message.hpp.
constexpr uint16_t ndn::net::getAttributeType | ( | const rtattr * | attr | ) |
Definition at line 96 of file netlink-message.hpp.
References getAttributeValue().
const uint8_t* ndn::net::getAttributeValue | ( | const T * | attr | ) |
Referenced by ndn::net::NetlinkMessageAttributes< T >::getAttributeByType(), and getAttributeType().
|
inline |
Definition at line 107 of file netlink-message.hpp.
|
inline |
Definition at line 114 of file netlink-message.hpp.
References getAttributeValueLength().
constexpr size_t ndn::net::getAttributeValueLength | ( | const T * | attr | ) |
Referenced by getAttributeValue().
constexpr size_t ndn::net::getAttributeValueLength | ( | const nlattr * | attr | ) |
Definition at line 125 of file netlink-message.hpp.
constexpr size_t ndn::net::getAttributeValueLength | ( | const rtattr * | attr | ) |
Definition at line 132 of file netlink-message.hpp.
|
static |
Definition at line 173 of file network-monitor-impl-netlink.cpp.
References ETHERNET, LOOPBACK, and UNKNOWN.
Referenced by updateInterfaceState().
|
static |
Definition at line 186 of file network-monitor-impl-netlink.cpp.
References UNSPECIFIED, V4, and V6.
Referenced by updateInterfaceState().
|
static |
Definition at line 199 of file network-monitor-impl-netlink.cpp.
References GLOBAL, HOST, LINK, and NOWHERE.
Referenced by updateInterfaceState().
|
static |
Definition at line 214 of file network-monitor-impl-netlink.cpp.
References ndn::time::abs(), DORMANT, DOWN, emitSignal, ndn::net::NetlinkMessageAttributes< T >::getAttributeByType(), ndn::net::NetlinkMessage::getAttributes(), ndn::net::NetworkAddress::getFamily(), ndn::net::NetworkInterface::getFlags(), ndn::net::NetlinkMessage::getPayload(), ifaFamilyToAddressFamily(), ifaScopeToAddressScope(), ifiTypeToInterfaceType(), ndn::net::NetworkMonitorImpl::makeNetworkInterface(), NDN_LOG_DEBUG, NDN_LOG_ERROR, NDN_LOG_TRACE, NDN_LOG_WARN, NO_CARRIER, ndn::net::NetworkMonitorImpl::onInterfaceAdded, ndn::net::NetworkMonitorImpl::onInterfaceRemoved, RUNNING, ndn::net::NetworkInterface::setState(), ndn::net::NetlinkMessageAttributes< T >::size(), UNKNOWN, and UNSPECIFIED.
|
static |
Definition at line 281 of file network-monitor-impl-osx.cpp.
References ndn::net::NetworkInterface::addNetworkAddress(), ndn::ethernet::ADDR_LEN, ndn::Name::at(), ndn::net::NetworkInterface::canBroadcast(), emitSignal, ETHERNET, ndn::net::IfAddrs::get(), ndn::ethernet::getBroadcastAddress(), ndn::net::NetworkInterface::getEthernetAddress(), ndn::net::NetworkInterface::getName(), ndn::net::NetworkInterface::getNetworkAddresses(), ndn::net::NetworkInterface::getState(), GLOBAL, HOST, LINK, LOOPBACK, ndn::net::NetworkMonitorImpl::makeNetworkInterface(), NDN_LOG_DEBUG, NDN_LOG_TRACE, ndn::net::NetworkMonitorImpl::onInterfaceRemoved, ndn::net::NetworkInterface::removeNetworkAddress(), ndn::net::NetworkInterface::setEthernetAddress(), ndn::net::NetworkInterface::setEthernetBroadcastAddress(), ndn::net::NetworkInterface::setFlags(), ndn::net::NetworkInterface::setIndex(), ndn::net::NetworkInterface::setMtu(), ndn::net::NetworkInterface::setState(), ndn::net::NetworkInterface::setType(), ndn::detail::cfstring::toStdString(), ndn::name::Component::toUri(), UNKNOWN, UNSPECIFIED, V4, and V6.
std::ostream & ndn::net::operator<< | ( | std::ostream & | os, |
AddressScope | scope | ||
) |
std::ostream & ndn::net::operator<< | ( | std::ostream & | os, |
const NetworkAddress & | addr | ||
) |
Definition at line 77 of file network-address.cpp.
References ndn::net::NetworkAddress::getIp(), and ndn::net::NetworkAddress::getPrefixLength().
std::ostream & ndn::net::operator<< | ( | std::ostream & | os, |
InterfaceType | type | ||
) |
Definition at line 129 of file network-interface.cpp.
References websocketpp::session::fail::status::UNKNOWN.
std::ostream & ndn::net::operator<< | ( | std::ostream & | os, |
InterfaceState | state | ||
) |
Definition at line 143 of file network-interface.cpp.
References websocketpp::session::fail::status::UNKNOWN.
|
static |
Definition at line 161 of file network-interface.cpp.
std::ostream & ndn::net::operator<< | ( | std::ostream & | os, |
const NetworkInterface & | netif | ||
) |
Definition at line 170 of file network-interface.cpp.
References ndn::net::NetworkInterface::canBroadcast(), DORMANT, ndn::net::NetworkInterface::getEthernetAddress(), ndn::net::NetworkInterface::getEthernetBroadcastAddress(), ndn::net::NetworkInterface::getFlags(), ndn::net::NetworkInterface::getIndex(), ndn::net::NetworkInterface::getMtu(), ndn::net::NetworkInterface::getName(), ndn::net::NetworkInterface::getNetworkAddresses(), ndn::net::NetworkInterface::getState(), ndn::net::NetworkInterface::getType(), LOOPBACK, PRINT_IFF, and RUNNING.
|
static |
Definition at line 46 of file network-monitor.cpp.
References NDN_LOG_WARN, and NETWORK_MONITOR_IMPL_TYPE.