NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::L3Protocol Class Reference

Implementation network-layer of NDN stack. More...

#include <ndn-l3-protocol.h>

Inheritance diagram for ns3::ndn::L3Protocol:
Collaboration diagram for ns3::ndn::L3Protocol:

Public Types

typedef std::vector< Ptr< Face > > FaceList

Public Member Functions

 L3Protocol ()
 Default constructor. More...
virtual uint32_t AddFace (const Ptr< Face > &face)
 Add face to Ndn stack. More...
virtual uint32_t GetNFaces () const
 Get current number of faces added to Ndn stack. More...
virtual Ptr< FaceGetFace (uint32_t face) const
 Get face by face index. More...
virtual Ptr< FaceGetFaceById (uint32_t face) const
 Get face by face ID. More...
virtual void RemoveFace (Ptr< Face > face)
 Remove face from ndn stack (remove callbacks)
virtual Ptr< FaceGetFaceByNetDevice (Ptr< NetDevice > netDevice) const
 Get face for NetDevice.

Static Public Member Functions

static TypeId GetTypeId ()
 Interface ID. More...

Static Public Attributes

static const uint16_t ETHERNET_FRAME_TYPE = 0x7777
 Ethernet Frame Type of Ndn.
static const uint16_t IP_STACK_PORT = 9695
 TCP/UDP port for NDN stack.

Protected Member Functions

virtual void DoDispose (void)
 Do cleanup.
virtual void NotifyNewAggregate ()
 This function will notify other components connected to the node that a new stack member is now connected This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together.

Detailed Description

Implementation network-layer of NDN stack.

This class defines the API to manipulate the following aspects of the NDN stack implementation:

  1. register a face (Face-derived object) for use by the NDN layer

Each Face-derived object has conceptually a single NDN interface associated with it.

In addition, this class defines NDN packet coding constants

See also
Face, ForwardingStrategy

Definition at line 64 of file ndn-l3-protocol.h.

Constructor & Destructor Documentation

ns3::ndn::L3Protocol::L3Protocol ( )

Default constructor.

Creates an empty stack without forwarding strategy set

Definition at line 71 of file ndn-l3-protocol.cc.

Member Function Documentation

uint32_t ns3::ndn::L3Protocol::AddFace ( const Ptr< Face > &  face)

Add face to Ndn stack.

facesmart pointer to NdnFace-derived object (NdnLocalFace, NdnNetDeviceFace, NdnUdpFace)
the index of the Ndn interface added.
See also
NdnLocalFace, NdnNetDeviceFace, NdnUdpFace

Definition at line 126 of file ndn-l3-protocol.cc.

References ns3::ndn::ForwardingStrategy::OnData(), and ns3::ndn::ForwardingStrategy::OnInterest().

Referenced by ns3::ndn::IpFaceStack::CreateOrGetUdpFace().

Ptr< Face > ns3::ndn::L3Protocol::GetFace ( uint32_t  face) const

Get face by face index.

faceThe face number (number in face list)
The NdnFace associated with the Ndn face number.

Definition at line 182 of file ndn-l3-protocol.cc.

Ptr< Face > ns3::ndn::L3Protocol::GetFaceById ( uint32_t  face) const

Get face by face ID.

faceThe face ID number
The NdnFace associated with the Ndn face number.

Definition at line 189 of file ndn-l3-protocol.cc.

uint32_t ns3::ndn::L3Protocol::GetNFaces ( void  ) const

Get current number of faces added to Ndn stack.

the number of faces

Definition at line 214 of file ndn-l3-protocol.cc.

TypeId ns3::ndn::L3Protocol::GetTypeId ( void  )

Interface ID.

interface ID

Definition at line 57 of file ndn-l3-protocol.cc.

The documentation for this class was generated from the following files: