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::Pit Class Referenceabstract

Class implementing Pending Interests Table. More...

#include <ndn-pit.h>

Inheritance diagram for ns3::ndn::Pit:
Collaboration diagram for ns3::ndn::Pit:

Public Member Functions

 Pit ()
 PIT constructor.
 
virtual ~Pit ()
 Destructor.
 
virtual Ptr< pit::EntryLookup (const Data &header)=0
 Find corresponding PIT entry for the given content name. More...
 
virtual Ptr< pit::EntryLookup (const Interest &header)=0
 Find a PIT entry for the given content interest. More...
 
virtual Ptr< pit::EntryFind (const Name &prefix)=0
 Get PIT entry for the prefix (exact match) More...
 
virtual Ptr< pit::EntryCreate (Ptr< const Interest > header)=0
 Creates a PIT entry for the given interest. More...
 
virtual void MarkErased (Ptr< pit::Entry > entry)=0
 Mark PIT entry deleted. More...
 
virtual void Print (std::ostream &os) const =0
 Print out PIT contents for debugging purposes. More...
 
virtual uint32_t GetSize () const =0
 Get number of entries in PIT.
 
virtual Ptr< pit::EntryBegin ()=0
 Return first element of FIB (no order guaranteed)
 
virtual Ptr< pit::EntryEnd ()=0
 Return item next after last (no order guaranteed)
 
virtual Ptr< pit::EntryNext (Ptr< pit::Entry >)=0
 Advance the iterator.
 
const Time & GetMaxPitEntryLifetime () const
 Get maximum PIT entry lifetime.
 
void SetMaxPitEntryLifetime (const Time &maxLifetime)
 Set maximum PIT entry lifetime.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Interface ID. More...
 
static Ptr< PitGetPit (Ptr< Object > node)
 Static call to cheat python bindings.
 

Protected Attributes

Time m_PitEntryPruningTimout
 
Time m_maxPitEntryLifetime
 

Detailed Description

Class implementing Pending Interests Table.

Doxygen introspection did not find any typical Config paths.

Attributes

  • PitEntryPruningTimout: Timeout for PIT entry to live after being satisfied. To make sure recently satisfied interest will not be satisfied again
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +0.0ns
    • Flags: construct write read
  • MaxPitEntryLifetime: Maximum amount of time for which a router is willing to maintain a PIT entry. Actual PIT lifetime should be minimum of MaxPitEntryLifetime and InterestLifetime specified in the Interest packet
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +0.0ns
    • Flags: construct write read

No TraceSources are defined for this type.

Definition at line 60 of file ndn-pit.h.

Member Function Documentation

virtual Ptr<pit::Entry> ns3::ndn::Pit::Create ( Ptr< const Interest header)
pure virtual

Creates a PIT entry for the given interest.

Parameters
headerparsed interest header
Returns
iterator to Pit entry. If record could not be created (e.g., limit reached), return end() iterator

Note. This call assumes that the entry does not exist (i.e., there was a Lookup call before)

Implemented in ns3::ndn::pit::PitImpl< Policy >, ns3::ndn::pit::PitImpl< persistent_policy_traits >, ns3::ndn::pit::PitImpl< serialized_size_policy_traits >, ns3::ndn::pit::PitImpl< random_policy_traits >, and ns3::ndn::pit::PitImpl< lru_policy_traits >.

virtual Ptr<pit::Entry> ns3::ndn::Pit::Find ( const Name prefix)
pure virtual

Get PIT entry for the prefix (exact match)

Parameters
prefixName for PIT entry
Returns
If entry is found, a valid iterator (Ptr<pit::Entry>) will be returned. Otherwise End () (==0)

Implemented in ns3::ndn::pit::PitImpl< Policy >, ns3::ndn::pit::PitImpl< persistent_policy_traits >, ns3::ndn::pit::PitImpl< serialized_size_policy_traits >, ns3::ndn::pit::PitImpl< random_policy_traits >, and ns3::ndn::pit::PitImpl< lru_policy_traits >.

TypeId ns3::ndn::Pit::GetTypeId ( void  )
static

Interface ID.

Returns
interface ID

Definition at line 43 of file ndn-pit.cc.

References GetMaxPitEntryLifetime(), and SetMaxPitEntryLifetime().

virtual Ptr<pit::Entry> ns3::ndn::Pit::Lookup ( const Data header)
pure virtual

Find corresponding PIT entry for the given content name.

Not that this call should be repeated enough times until it return 0. This way all records with shorter or equal prefix as in content object will be found and satisfied.

Parameters
prefixPrefix for which to lookup the entry
Returns
smart pointer to PIT entry. If record not found, returns 0

Implemented in ns3::ndn::pit::PitImpl< Policy >, ns3::ndn::pit::PitImpl< persistent_policy_traits >, ns3::ndn::pit::PitImpl< serialized_size_policy_traits >, ns3::ndn::pit::PitImpl< random_policy_traits >, and ns3::ndn::pit::PitImpl< lru_policy_traits >.

virtual Ptr<pit::Entry> ns3::ndn::Pit::Lookup ( const Interest header)
pure virtual

Find a PIT entry for the given content interest.

Parameters
headerparsed interest header
Returns
iterator to Pit entry. If record not found, return end() iterator

Implemented in ns3::ndn::pit::PitImpl< Policy >, ns3::ndn::pit::PitImpl< persistent_policy_traits >, ns3::ndn::pit::PitImpl< serialized_size_policy_traits >, ns3::ndn::pit::PitImpl< random_policy_traits >, and ns3::ndn::pit::PitImpl< lru_policy_traits >.

virtual void ns3::ndn::Pit::MarkErased ( Ptr< pit::Entry entry)
pure virtual

Mark PIT entry deleted.

Parameters
entryPIT entry

Effectively, this method removes all incoming/outgoing faces and set lifetime +m_PitEntryDefaultLifetime from Now ()

virtual void ns3::ndn::Pit::Print ( std::ostream &  os) const
pure virtual

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