NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::net Namespace Reference

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< NetworkMonitorImplmakeNetworkMonitorImpl (boost::asio::io_service &io)
 

Enumeration Type Documentation

◆ AddressFamily

Enumerator
UNSPECIFIED 
V4 
V6 

Definition at line 34 of file network-address.hpp.

◆ AddressScope

Enumerator
NOWHERE 
HOST 
LINK 
GLOBAL 

Definition at line 40 of file network-address.hpp.

◆ InterfaceType

Indicates the hardware type of a network interface.

Enumerator
UNKNOWN 
LOOPBACK 
ETHERNET 

Definition at line 38 of file network-interface.hpp.

◆ InterfaceState

Indicates the state of a network interface.

Enumerator
UNKNOWN 

interface is in an unknown state

DOWN 

interface is administratively down

NO_CARRIER 

interface is administratively up but has no carrier

DORMANT 

interface has a carrier but it cannot send or receive normal user traffic yet

RUNNING 

interface can be used to send and receive packets

Definition at line 50 of file network-interface.hpp.

Function Documentation

◆ getAttributeLength() [1/3]

template<typename T >
constexpr size_t ndn::net::getAttributeLength ( const T *  attr)
constexpr

◆ getAttributeLength() [2/3]

template<>
constexpr size_t ndn::net::getAttributeLength ( const nlattr *  attr)
constexpr

Definition at line 52 of file netlink-message.hpp.

◆ getAttributeLength() [3/3]

template<>
constexpr size_t ndn::net::getAttributeLength ( const rtattr *  attr)
constexpr

Definition at line 59 of file netlink-message.hpp.

◆ getAttributeLengthAligned() [1/3]

template<typename T >
constexpr size_t ndn::net::getAttributeLengthAligned ( const T *  attr)
constexpr

◆ getAttributeLengthAligned() [2/3]

template<>
constexpr size_t ndn::net::getAttributeLengthAligned ( const nlattr *  attr)
constexpr

Definition at line 70 of file netlink-message.hpp.

◆ getAttributeLengthAligned() [3/3]

template<>
constexpr size_t ndn::net::getAttributeLengthAligned ( const rtattr *  attr)
constexpr

Definition at line 77 of file netlink-message.hpp.

◆ getAttributeType() [1/3]

template<typename T >
constexpr uint16_t ndn::net::getAttributeType ( const T *  attr)
constexpr

◆ getAttributeType() [2/3]

template<>
constexpr uint16_t ndn::net::getAttributeType ( const nlattr *  attr)
constexpr

Definition at line 88 of file netlink-message.hpp.

◆ getAttributeType() [3/3]

template<>
constexpr uint16_t ndn::net::getAttributeType ( const rtattr *  attr)
constexpr

Definition at line 95 of file netlink-message.hpp.

◆ getAttributeValue() [1/3]

template<typename T >
const uint8_t* ndn::net::getAttributeValue ( const T *  attr)

◆ getAttributeValue() [2/3]

template<>
const uint8_t* ndn::net::getAttributeValue ( const nlattr *  attr)
inline

Definition at line 106 of file netlink-message.hpp.

◆ getAttributeValue() [3/3]

template<>
const uint8_t* ndn::net::getAttributeValue ( const rtattr *  attr)
inline

Definition at line 113 of file netlink-message.hpp.

◆ getAttributeValueLength() [1/3]

template<typename T >
constexpr size_t ndn::net::getAttributeValueLength ( const T *  attr)
constexpr

◆ getAttributeValueLength() [2/3]

template<>
constexpr size_t ndn::net::getAttributeValueLength ( const nlattr *  attr)
constexpr

Definition at line 124 of file netlink-message.hpp.

◆ getAttributeValueLength() [3/3]

template<>
constexpr size_t ndn::net::getAttributeValueLength ( const rtattr *  attr)
constexpr

Definition at line 131 of file netlink-message.hpp.

◆ ifiTypeToInterfaceType()

static InterfaceType ndn::net::ifiTypeToInterfaceType ( uint16_t  type)
static

Definition at line 173 of file network-monitor-impl-netlink.cpp.

References ETHERNET, LOOPBACK, and UNKNOWN.

◆ ifaFamilyToAddressFamily()

static AddressFamily ndn::net::ifaFamilyToAddressFamily ( uint8_t  family)
static

Definition at line 186 of file network-monitor-impl-netlink.cpp.

References UNSPECIFIED, V4, and V6.

◆ ifaScopeToAddressScope()

static AddressScope ndn::net::ifaScopeToAddressScope ( uint8_t  scope)
static

Definition at line 199 of file network-monitor-impl-netlink.cpp.

References GLOBAL, HOST, LINK, and NOWHERE.

◆ updateInterfaceState()

static void ndn::net::updateInterfaceState ( NetworkInterface interface,
uint8_t  operState 
)
static

◆ computePrefixLength()

template<typename AddressBytes >
static uint8_t ndn::net::computePrefixLength ( const AddressBytes &  mask)
static

Definition at line 281 of file network-monitor-impl-osx.cpp.

◆ operator<<() [1/5]

std::ostream & ndn::net::operator<< ( std::ostream &  os,
AddressScope  scope 
)

Definition at line 29 of file network-address.cpp.

References GLOBAL, HOST, LINK, and NOWHERE.

◆ operator<<() [2/5]

std::ostream & ndn::net::operator<< ( std::ostream &  os,
const NetworkAddress addr 
)

◆ operator<<() [3/5]

std::ostream & ndn::net::operator<< ( std::ostream &  os,
InterfaceType  type 
)

Definition at line 128 of file network-interface.cpp.

◆ operator<<() [4/5]

std::ostream & ndn::net::operator<< ( std::ostream &  os,
InterfaceState  state 
)

Definition at line 142 of file network-interface.cpp.

◆ printFlag()

static void ndn::net::printFlag ( std::ostream &  os,
uint32_t &  flags,
uint32_t  flagVal,
const char *  flagStr 
)
static

Definition at line 161 of file network-interface.cpp.

◆ operator<<() [5/5]

◆ makeNetworkMonitorImpl()

static unique_ptr<NetworkMonitorImpl> ndn::net::makeNetworkMonitorImpl ( boost::asio::io_service &  io)
static

Definition at line 46 of file network-monitor.cpp.

References NDN_LOG_WARN, and NETWORK_MONITOR_IMPL_TYPE.