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  IfAddrs
 
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  NetworkMonitorImplNoop
 
class  NetworkMonitorImplOsx
 
class  NetworkMonitorImplRtnl
 
class  NetworkMonitorImplStub
 
class  NetworkMonitorStub
 a stub NetworkMonitor for unit testing More...
 

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

static std::string convertToStdString (CFStringRef cfStr)
 
template<typename AddressBytes >
static uint8_t computePrefixLength (const AddressBytes &mask)
 
static const char * nlmsgTypeToString (uint16_t type)
 
static InterfaceType ifiTypeToInterfaceType (uint16_t type)
 
static AddressFamily ifaFamilyToAddressFamily (uint8_t family)
 
static AddressScope ifaScopeToAddressScope (uint8_t scope)
 
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)
 

Variables

ndn NetworkMonitor
 

Enumeration Type Documentation

◆ AddressFamily

Enumerator
UNSPECIFIED 
V4 
V6 

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

◆ AddressScope

Enumerator
NOWHERE 
HOST 
LINK 
GLOBAL 

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

◆ InterfaceType

Indicates the hardware type of a network interface.

Enumerator
UNKNOWN 
LOOPBACK 
ETHERNET 

Definition at line 37 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 49 of file network-interface.hpp.

Function Documentation

◆ convertToStdString()

static std::string ndn::net::convertToStdString ( CFStringRef  cfStr)
static

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

◆ computePrefixLength()

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

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

◆ nlmsgTypeToString()

static const char* ndn::net::nlmsgTypeToString ( uint16_t  type)
static

Definition at line 155 of file network-monitor-impl-rtnl.cpp.

References NLMSG_STRINGIFY, and RTM_STRINGIFY.

◆ ifiTypeToInterfaceType()

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

Definition at line 178 of file network-monitor-impl-rtnl.cpp.

References ETHERNET, LOOPBACK, and UNKNOWN.

◆ ifaFamilyToAddressFamily()

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

Definition at line 191 of file network-monitor-impl-rtnl.cpp.

References UNSPECIFIED, V4, and V6.

◆ ifaScopeToAddressScope()

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

Definition at line 204 of file network-monitor-impl-rtnl.cpp.

References GLOBAL, HOST, LINK, and NOWHERE.

◆ operator<<() [1/5]

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

Definition at line 30 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 129 of file network-interface.cpp.

◆ operator<<() [4/5]

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

Definition at line 143 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]

Variable Documentation

◆ NetworkMonitor

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