Implementation network-layer of NDN stack. More...
#include <ndn-l3-protocol.h>
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< Face > | GetFace (uint32_t face) const |
Get face by face index. More... | |
virtual Ptr< Face > | GetFaceById (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< Face > | GetFaceByNetDevice (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. | |
Implementation network-layer of NDN stack.
This class defines the API to manipulate the following aspects of the NDN stack implementation:
Each Face-derived object has conceptually a single NDN interface associated with it.
In addition, this class defines NDN packet coding constants
Definition at line 64 of file ndn-l3-protocol.h.
ns3::ndn::L3Protocol::L3Protocol | ( | ) |
Default constructor.
Creates an empty stack without forwarding strategy set
Definition at line 71 of file ndn-l3-protocol.cc.
|
virtual |
Add face to Ndn stack.
face | smart pointer to NdnFace-derived object (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().
|
virtual |
Get face by face index.
face | The face number (number in face list) |
Definition at line 182 of file ndn-l3-protocol.cc.
|
virtual |
Get face by face ID.
face | The face ID number |
Definition at line 189 of file ndn-l3-protocol.cc.
|
virtual |
Get current number of faces added to Ndn stack.
Definition at line 214 of file ndn-l3-protocol.cc.
|
static |