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::PitImpl< Policy > Class Template Reference

Class implementing Pending Interests Table. More...

#include <ndn-pit-impl.h>

Inheritance diagram for ns3::ndn::pit::PitImpl< Policy >:
Collaboration diagram for ns3::ndn::pit::PitImpl< Policy >:

Public Types

typedef
ndnSIM::trie_with_policy< Name,
ndnSIM::smart_pointer_payload_traits
< EntryImpl< PitImpl< Policy >
> >, Policy > 
super
 
typedef EntryImpl< PitImpl
< Policy > > 
entry
 

Public Member Functions

 PitImpl ()
 PIT constructor.
 
virtual ~PitImpl ()
 Destructor.
 
virtual Ptr< EntryLookup (const Data &header)
 Find corresponding PIT entry for the given content name. More...
 
virtual Ptr< EntryLookup (const Interest &header)
 Find a PIT entry for the given content interest. More...
 
virtual Ptr< EntryFind (const Name &prefix)
 Get PIT entry for the prefix (exact match) More...
 
virtual Ptr< EntryCreate (Ptr< const Interest > header)
 Creates a PIT entry for the given interest. More...
 
virtual void MarkErased (Ptr< Entry > entry)
 
virtual void Print (std::ostream &os) const
 Print out PIT contents for debugging purposes. More...
 
virtual uint32_t GetSize () const
 Get number of entries in PIT.
 
virtual Ptr< EntryBegin ()
 Return first element of FIB (no order guaranteed)
 
virtual Ptr< EntryEnd ()
 Return item next after last (no order guaranteed)
 
virtual Ptr< EntryNext (Ptr< Entry >)
 
const super::policy_container & GetPolicy () const
 
super::policy_container & GetPolicy ()
 
- Public Member Functions inherited from ns3::ndn::Pit
 Pit ()
 PIT constructor.
 
virtual ~Pit ()
 Destructor.
 
virtual void MarkErased (Ptr< pit::Entry > entry)=0
 Mark PIT entry deleted. More...
 
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 Public Member Functions inherited from ns3::ndn::Pit
static TypeId GetTypeId ()
 Interface ID. More...
 
static Ptr< PitGetPit (Ptr< Object > node)
 Static call to cheat python bindings.
 

Protected Member Functions

void RescheduleCleaning ()
 
void CleanExpired ()
 
virtual void NotifyNewAggregate ()
 Even when object is aggregated to another Object.
 
virtual void DoDispose ()
 Do cleanup.
 
- Protected Member Functions inherited from ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< Policy > > >, Policy >
 trie_with_policy (size_t bucketSize=1, size_t bucketIncrement=1)
 
std::pair< iterator, bool > insert (const Name &key, typename ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< Policy > > >::insert_type payload)
 
void erase (const Name &key)
 
void erase (iterator node)
 
void clear ()
 
bool modify (iterator position, Modifier mod)
 
iterator find_exact (const Name &key)
 Find a node that has the exact match with the key.
 
iterator longest_prefix_match (const Name &key)
 Find a node that has the longest common prefix with key (FIB/PIT lookup)
 
iterator longest_prefix_match_if (const Name &key, Predicate pred)
 Find a node that has the longest common prefix with key (FIB/PIT lookup)
 
iterator deepest_prefix_match (const Name &key)
 Const version of the longest common prefix match (semi-const, because there could be update of the policy anyways) More...
 
iterator deepest_prefix_match_if (const Name &key, Predicate pred)
 Find a node that has prefix at least as the key.
 
iterator deepest_prefix_match_if_next_level (const Name &key, Predicate pred)
 Find a node that has prefix at least as the key. More...
 
iterator end () const
 
const parent_triegetTrie () const
 
parent_triegetTrie ()
 
const policy_container & getPolicy () const
 
policy_container & getPolicy ()
 

Friends

class EntryImpl< PitImpl >
 

Additional Inherited Members

- Protected Types inherited from ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< Policy > > >, Policy >
typedef trie< Name,
ndnSIM::smart_pointer_payload_traits
< EntryImpl< PitImpl< Policy >
> >, typename
Policy::policy_hook_type > 
parent_trie
 
typedef parent_trie::iterator iterator
 
typedef parent_trie::const_iterator const_iterator
 
typedef Policy::template
policy< trie_with_policy< Name,
ndnSIM::smart_pointer_payload_traits
< EntryImpl< PitImpl< Policy >
> >, Policy >, parent_trie,
typename Policy::template
container_hook< parent_trie >
::type >::type 
policy_container
 
- Static Protected Member Functions inherited from ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl< PitImpl< Policy > > >, Policy >
static iterator s_iterator_to (typename parent_trie::iterator item)
 
- Protected Attributes inherited from ns3::ndn::Pit
Time m_PitEntryPruningTimout
 
Time m_maxPitEntryLifetime
 

Detailed Description

template<class Policy>
class ns3::ndn::pit::PitImpl< Policy >

Class implementing Pending Interests Table.

Definition at line 50 of file ndn-pit-impl.h.

Member Function Documentation

template<class Policy >
Ptr< Entry > ns3::ndn::pit::PitImpl< Policy >::Create ( Ptr< const Interest header)
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)

Implements ns3::ndn::Pit.

Definition at line 347 of file ndn-pit-impl.h.

template<class Policy >
Ptr< Entry > ns3::ndn::pit::PitImpl< Policy >::Find ( const Name prefix)
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)

Implements ns3::ndn::Pit.

Definition at line 334 of file ndn-pit-impl.h.

template<class Policy >
TypeId ns3::ndn::pit::PitImpl< Policy >::GetTypeId ( void  )
static

Interface ID.

Returns
interface ID

Definition at line 167 of file ndn-pit-impl.h.

template<class Policy >
Ptr< Entry > ns3::ndn::pit::PitImpl< Policy >::Lookup ( const Data header)
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
Todo:
use predicate to search with exclude filters

Implements ns3::ndn::Pit.

Definition at line 303 of file ndn-pit-impl.h.

References ns3::ndn::Data::GetName().

template<class Policy >
Ptr< Entry > ns3::ndn::pit::PitImpl< Policy >::Lookup ( const Interest header)
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

Implements ns3::ndn::Pit.

Definition at line 316 of file ndn-pit-impl.h.

References ns3::ndn::ndnSIM::trie< FullKey, PayloadTraits, PolicyHook >::find(), and ns3::ndn::Interest::GetName().

template<class Policy >
void ns3::ndn::pit::PitImpl< Policy >::Print ( std::ostream &  os) const
virtual

Print out PIT contents for debugging purposes.

Note that there is no definite order in which entries are printed out

Implements ns3::ndn::Pit.

Definition at line 396 of file ndn-pit-impl.h.


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