NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::face Namespace Reference

Classes

class  DatagramTransport
 Implements Transport for datagram-based protocols. More...
 
class  DECL_CLASS_FINAL
 A multicast Transport that uses raw Ethernet II frames. More...
 
class  FaceCounters
 gives access to counters provided by Face More...
 
class  FaceLogHelper
 for internal use by FaceLogging macros More...
 
class  GenericLinkService
 GenericLinkService is a LinkService that implements the NDNLPv2 protocol. More...
 
class  GenericLinkServiceCounters
 counters provided by GenericLinkService More...
 
class  InternalClientTransport
 implements a client-side transport that can be paired with another More...
 
class  InternalForwarderTransport
 implements a forwarder-side transport that can be paired with another More...
 
class  InternalTransportBase
 abstracts a transport that can be paired with another More...
 
class  LinkService
 the upper part of a Face More...
 
class  LinkServiceCounters
 counters provided by LinkService More...
 
class  LpFragmenter
 fragments network-layer packets into NDNLPv2 link-layer packets More...
 
class  LpReassembler
 reassembles fragmented network-layer packets More...
 
struct  Multicast
 
class  StreamTransport
 Implements Transport for stream-based protocols. More...
 
class  Transport
 the lower part of a Face More...
 
class  TransportCounters
 counters provided by Transport More...
 
struct  Unicast
 
class  WebSocketTransportCounters
 counters provided by WebSocketTransport More...
 

Typedefs

typedef uint64_t FaceId
 identifies a face More...
 
typedef TransportState FaceState
 indicates the state of a face More...
 

Enumerations

enum  TransportState {
  TransportState::NONE, TransportState::UP, TransportState::DOWN, TransportState::CLOSING,
  TransportState::FAILED, TransportState::CLOSED
}
 indicates the state of a transport More...
 

Functions

std::ostream & operator<< (std::ostream &os, const Face &face)
 
std::ostream & operator<< (std::ostream &os, const FaceLogHelper< Face > &flh)
 
template<typename T >
std::enable_if< std::is_base_of< Face, T >::value, std::ostream & >::type operator<< (std::ostream &os, const FaceLogHelper< T > &flh)
 
std::tuple< shared_ptr< Face >, shared_ptr< ndn::Face > > makeInternalFace (ndn::KeyChain &clientKeyChain)
 make a pair of forwarder-side face and client-side face that are connected with each other More...
 
 NFD_LOG_INCLASS_DEFINE (InternalForwarderTransport, "InternalForwarderTransport")
 
 NFD_LOG_INCLASS_DEFINE (InternalClientTransport, "InternalClientTransport")
 
static void asyncReceive (InternalTransportBase *recipient, const Block &packet)
 
std::ostream & operator<< (std::ostream &os, const FaceLogHelper< LinkService > &flh)
 
template<typename T >
std::enable_if< std::is_base_of< LinkService, T >::value &&!std::is_same< LinkService, T >::value, std::ostream & >::type operator<< (std::ostream &os, const FaceLogHelper< T > &flh)
 
std::ostream & operator<< (std::ostream &os, const FaceLogHelper< LpFragmenter > &flh)
 
std::ostream & operator<< (std::ostream &os, const FaceLogHelper< LpReassembler > &flh)
 
shared_ptr< Face > makeNullFace (const FaceUri &uri)
 
std::ostream & operator<< (std::ostream &os, TransportState state)
 
std::ostream & operator<< (std::ostream &os, const FaceLogHelper< Transport > &flh)
 
template<typename T >
std::enable_if< std::is_base_of< Transport, T >::value &&!std::is_same< Transport, T >::value, std::ostream & >::type operator<< (std::ostream &os, const FaceLogHelper< T > &flh)
 

Variables

 EthernetTransport
 
const FaceId INVALID_FACEID = 0
 indicates an invalid FaceId More...
 
const FaceId FACEID_INTERNAL_FACE = 1
 identifies the InternalFace used in management More...
 
const FaceId FACEID_CONTENT_STORE = 254
 identifies a packet comes from the ContentStore More...
 
const FaceId FACEID_NULL = 255
 identifies the NullFace that drops every packet More...
 
const FaceId FACEID_RESERVED_MAX = 255
 upper bound of reserved FaceIds More...
 
 GenericLinkService
 
 LinkService
 
 LpFragmenter
 
static const size_t MAX_SINGLE_FRAG_OVERHEAD
 maximum overhead on a single fragment, not counting other NDNLPv2 headers More...
 
static const size_t MAX_FRAG_OVERHEAD
 maximum overhead of adding fragmentation to payload, not counting other NDNLPv2 headers More...
 
 LpReassembler
 
 DatagramTransport
 
 Multicast
 
 MulticastUdpTransport
 
 StreamTransport
 
 TcpTransport
 
 Transport
 
const ssize_t MTU_UNLIMITED = -1
 indicates the transport has no limit on payload size More...
 
const ssize_t MTU_INVALID = -2
 (for internal use) indicates MTU field is unset More...
 
 UnicastUdpTransport
 
 UnixStreamTransport
 
 WebSocketTransport
 

Typedef Documentation

§ FaceId

typedef uint64_t nfd::face::FaceId

identifies a face

Definition at line 39 of file face.hpp.

§ FaceState

indicates the state of a face

Definition at line 54 of file face.hpp.

Enumeration Type Documentation

§ TransportState

indicates the state of a transport

Enumerator
NONE 
UP 

the transport is up

DOWN 

the transport is down temporarily, and is being recovered

CLOSING 

the transport is requested to be closed

FAILED 

the transport is being closed due to a failure

CLOSED 

the transport is closed, and can be safely deallocated

Definition at line 41 of file transport.hpp.

Function Documentation

§ operator<<() [1/10]

std::ostream& nfd::face::operator<< ( std::ostream &  os,
const Face &  face 
)
inline

Definition at line 89 of file ndn-common.hpp.

§ operator<<() [2/10]

std::ostream & nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< Face > &  flh 
)

Definition at line 48 of file face.cpp.

§ operator<<() [3/10]

template<typename T >
std::enable_if<std::is_base_of<Face, T>::value, std::ostream&>::type nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< T > &  flh 
)

Definition at line 317 of file face.hpp.

§ makeInternalFace()

std::tuple< shared_ptr< Face >, shared_ptr< ndn::Face > > nfd::face::makeInternalFace ( ndn::KeyChain clientKeyChain)

make a pair of forwarder-side face and client-side face that are connected with each other

Network-layer packets sent by one face will be received by the other face after io.poll().

Parameters
clientKeyChainA KeyChain used by client-side face to sign prefix registration commands.
Returns
a forwarder-side face and a client-side face connected with each other

Definition at line 35 of file internal-face.cpp.

References nfd::face::GenericLinkService::Options::allowLocalFields.

Referenced by nfd::ignoreRibAndLogSections(), and ns3::ndn::L3Protocol::setCsReplacementPolicy().

§ NFD_LOG_INCLASS_DEFINE() [1/2]

nfd::face::NFD_LOG_INCLASS_DEFINE ( InternalForwarderTransport  ,
"InternalForwarderTransport"   
)

§ NFD_LOG_INCLASS_DEFINE() [2/2]

nfd::face::NFD_LOG_INCLASS_DEFINE ( InternalClientTransport  ,
"InternalClientTransport"   
)

§ asyncReceive()

static void nfd::face::asyncReceive ( InternalTransportBase recipient,
const Block packet 
)
static

§ operator<<() [4/10]

std::ostream & nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< LinkService > &  flh 
)

Definition at line 124 of file link-service.cpp.

§ operator<<() [5/10]

template<typename T >
std::enable_if<std::is_base_of<LinkService, T>::value && !std::is_same<LinkService, T>::value, std::ostream&>::type nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< T > &  flh 
)

Definition at line 248 of file link-service.hpp.

§ operator<<() [6/10]

std::ostream & nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< LpFragmenter > &  flh 
)

Definition at line 150 of file lp-fragmenter.cpp.

§ operator<<() [7/10]

std::ostream & nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< LpReassembler > &  flh 
)

Definition at line 164 of file lp-reassembler.cpp.

§ makeNullFace()

shared_ptr< Face > nfd::face::makeNullFace ( const FaceUri uri = FaceUri("null://"))
Returns
a Face that has no underlying transport and drops every packet

Definition at line 37 of file null-face.cpp.

References ndn::nfd::FACE_SCOPE_LOCAL.

Referenced by nfd::Nfd::initialize(), and ns3::ndn::L3Protocol::~L3Protocol().

§ operator<<() [8/10]

std::ostream & nfd::face::operator<< ( std::ostream &  os,
TransportState  state 
)

Definition at line 35 of file transport.cpp.

References CLOSED, CLOSING, DOWN, FAILED, and UP.

§ operator<<() [9/10]

std::ostream & nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< Transport > &  flh 
)

§ operator<<() [10/10]

template<typename T >
std::enable_if<std::is_base_of<Transport, T>::value && !std::is_same<Transport, T>::value, std::ostream&>::type nfd::face::operator<< ( std::ostream &  os,
const FaceLogHelper< T > &  flh 
)

Definition at line 446 of file transport.hpp.

Variable Documentation

§ EthernetTransport

nfd::face::EthernetTransport

Definition at line 62 of file ethernet-transport.cpp.

Referenced by nfd::face::DECL_CLASS_FINAL::Error::Error().

§ INVALID_FACEID

§ FACEID_INTERNAL_FACE

const FaceId nfd::face::FACEID_INTERNAL_FACE = 1

identifies the InternalFace used in management

Definition at line 44 of file face.hpp.

Referenced by nfd::ignoreRibAndLogSections(), and ns3::ndn::L3Protocol::setCsReplacementPolicy().

§ FACEID_CONTENT_STORE

const FaceId nfd::face::FACEID_CONTENT_STORE = 254

identifies a packet comes from the ContentStore

Definition at line 46 of file face.hpp.

Referenced by nfd::Forwarder::Forwarder(), nfd::Nfd::initialize(), nfd::Forwarder::startProcessNack(), and ns3::ndn::L3Protocol::~L3Protocol().

§ FACEID_NULL

const FaceId nfd::face::FACEID_NULL = 255

identifies the NullFace that drops every packet

Definition at line 48 of file face.hpp.

Referenced by nfd::Nfd::initialize(), and ns3::ndn::L3Protocol::~L3Protocol().

§ FACEID_RESERVED_MAX

const FaceId nfd::face::FACEID_RESERVED_MAX = 255

upper bound of reserved FaceIds

Definition at line 50 of file face.hpp.

Referenced by nfd::FaceTable::add(), and nfd::FaceTable::addReserved().

§ GenericLinkService

§ LinkService

Definition at line 32 of file link-service.cpp.

§ LpFragmenter

Definition at line 33 of file lp-fragmenter.cpp.

§ MAX_SINGLE_FRAG_OVERHEAD

const size_t nfd::face::MAX_SINGLE_FRAG_OVERHEAD
static
Initial value:
=
1 + 9 +
1 + 1 + 8 +
1 + 9

maximum overhead on a single fragment, not counting other NDNLPv2 headers

Definition at line 44 of file lp-fragmenter.cpp.

§ MAX_FRAG_OVERHEAD

const size_t nfd::face::MAX_FRAG_OVERHEAD
static
Initial value:
=
1 + 9 +
1 + 1 + 8 +
1 + 1 + 8 +
1 + 1 + 8 +
1 + 9

maximum overhead of adding fragmentation to payload, not counting other NDNLPv2 headers

Definition at line 52 of file lp-fragmenter.cpp.

Referenced by nfd::face::LpFragmenter::fragmentPacket().

§ LpReassembler

Definition at line 33 of file lp-reassembler.cpp.

§ DatagramTransport

§ Multicast

§ MulticastUdpTransport

nfd::face::MulticastUdpTransport

Definition at line 32 of file multicast-udp-transport.cpp.

§ StreamTransport

Definition at line 31 of file tcp-transport.cpp.

§ TcpTransport

nfd::face::TcpTransport

Definition at line 31 of file tcp-transport.cpp.

§ Transport

Definition at line 32 of file transport.cpp.

§ MTU_UNLIMITED

const ssize_t nfd::face::MTU_UNLIMITED = -1

§ MTU_INVALID

const ssize_t nfd::face::MTU_INVALID = -2

(for internal use) indicates MTU field is unset

Definition at line 99 of file transport.hpp.

§ UnicastUdpTransport

nfd::face::UnicastUdpTransport

Definition at line 39 of file unicast-udp-transport.cpp.

Referenced by nfd::UdpChannel::listen().

§ UnixStreamTransport

nfd::face::UnixStreamTransport

Definition at line 31 of file unix-stream-transport.cpp.

§ WebSocketTransport

nfd::face::WebSocketTransport

Definition at line 31 of file websocket-transport.cpp.

Referenced by nfd::WebSocketChannel::WebSocketChannel().