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::IpFaceStack Class Reference

Application that provides functionality of creating IP-based faces on NDN nodes. More...

#include <ndn-ip-face-stack.h>

Inheritance diagram for ns3::ndn::IpFaceStack:
Collaboration diagram for ns3::ndn::IpFaceStack:

Public Member Functions

 IpFaceStack ()
 Default constructor.
 
Ptr< TcpFaceGetTcpFaceByAddress (const Ipv4Address &addr)
 Lookup TcpFace for a given address.
 
void DestroyTcpFace (Ptr< TcpFace > face)
 Destroy TcpFace, e.g., after TCP connection got dropped.
 
Ptr< UdpFaceGetUdpFaceByAddress (const Ipv4Address &addr)
 Lookup UdpFace for a given address.
 
Ptr< TcpFaceCreateOrGetTcpFace (Ipv4Address address, Callback< void, Ptr< Face > > onCreate=NULL_CREATE_CALLBACK)
 Method allowing creation and lookup of faces. More...
 
Ptr< UdpFaceCreateOrGetUdpFace (Ipv4Address address)
 Method allowing creation and lookup of faces. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 

Static Public Attributes

static const Callback< void,
Ptr< Face > > 
NULL_CREATE_CALLBACK = MakeNullCallback< void, Ptr<Face> > ()
 

Protected Types

typedef std::map< Ipv4Address,
Ptr< TcpFace > > 
TcpFaceMap
 
typedef std::map< Ipv4Address,
Ptr< UdpFace > > 
UdpFaceMap
 

Protected Member Functions

void NotifyNewAggregate ()
 

Protected Attributes

Ptr< Node > m_node
 
bool m_enableTcp
 
bool m_enableUdp
 
Ptr< Socket > m_tcpServer
 
Ptr< Socket > m_udpServer
 
TcpFaceMap m_tcpFaceMap
 
UdpFaceMap m_udpFaceMap
 

Detailed Description

Application that provides functionality of creating IP-based faces on NDN nodes.

The class implements virtual calls onInterest, onNack, and onData

Doxygen introspection did not find any typical Config paths.

Attributes

  • EnableTCP: Enable ability to create TCP faces
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • EnableUDP: Enable ability to create UDP faces
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read

No TraceSources are defined for this type.

Definition at line 49 of file ndn-ip-face-stack.h.

Member Function Documentation

Ptr< TcpFace > ns3::ndn::IpFaceStack::CreateOrGetTcpFace ( Ipv4Address  address,
Callback< void, Ptr< Face > >  onCreate = NULL_CREATE_CALLBACK 
)

Method allowing creation and lookup of faces.

All created UDP faces are stored internally in the map, and if the same face is created, it will simply be looked up

Definition at line 177 of file ndn-ip-face-stack.cc.

References ns3::ndn::L3Protocol::IP_STACK_PORT.

Ptr< UdpFace > ns3::ndn::IpFaceStack::CreateOrGetUdpFace ( Ipv4Address  address)

Method allowing creation and lookup of faces.

All created TCP faces are stored internally in the map, and if the same face is created, it will simply be looked up

Definition at line 200 of file ndn-ip-face-stack.cc.

References ns3::ndn::L3Protocol::AddFace(), and ns3::ndn::L3Protocol::IP_STACK_PORT.


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