Class implementing FIB functionality. More...
#include <ndn-fib-impl.h>
Public Types | |
typedef ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits < EntryImpl > , ndnSIM::counting_policy_traits > | super |
Public Member Functions | |
FibImpl () | |
Constructor. | |
virtual Ptr< Entry > | LongestPrefixMatch (const Interest &interest) |
Perform longest prefix match. More... | |
virtual Ptr< fib::Entry > | Find (const Name &prefix) |
Get FIB entry for the prefix (exact match) More... | |
virtual Ptr< Entry > | Add (const Name &prefix, Ptr< Face > face, int32_t metric) |
Add or update FIB entry. More... | |
virtual Ptr< Entry > | Add (const Ptr< const Name > &prefix, Ptr< Face > face, int32_t metric) |
Add or update FIB entry using smart pointer to prefix. More... | |
virtual void | Remove (const Ptr< const Name > &prefix) |
Remove FIB entry. More... | |
virtual void | InvalidateAll () |
Invalidate all FIB entries. | |
virtual void | RemoveFromAll (Ptr< Face > face) |
Remove all references to a face from FIB. More... | |
virtual void | Print (std::ostream &os) const |
Print out entries in FIB. | |
virtual uint32_t | GetSize () const |
Get number of entries in FIB. | |
virtual Ptr< const Entry > | Begin () const |
Return first element of FIB (no order guaranteed) | |
virtual Ptr< Entry > | Begin () |
Return first element of FIB (no order guaranteed) | |
virtual Ptr< const Entry > | End () const |
Return item next after last (no order guaranteed) | |
virtual Ptr< Entry > | End () |
Return item next after last (no order guaranteed) | |
virtual Ptr< const Entry > | Next (Ptr< const Entry > item) const |
virtual Ptr< Entry > | Next (Ptr< Entry > item) |
Public Member Functions inherited from ns3::ndn::Fib | |
Fib () | |
Default constructor. | |
virtual | ~Fib () |
Virtual destructor. | |
virtual Ptr< const fib::Entry > | Next (Ptr< const fib::Entry >) const =0 |
Advance the iterator. | |
virtual Ptr< fib::Entry > | Next (Ptr< fib::Entry >)=0 |
Advance the iterator. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Interface ID. More... | |
Static Public Member Functions inherited from ns3::ndn::Fib | |
static TypeId | GetTypeId () |
Interface ID. More... | |
static Ptr< Fib > | GetFib (Ptr< Object > node) |
Static call to cheat python bindings. | |
Protected Member Functions | |
virtual void | NotifyNewAggregate () |
Notify when object is aggregated. | |
virtual void | DoDispose () |
Perform cleanup. | |
Protected Member Functions inherited from ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl >, ndnSIM::counting_policy_traits > | |
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 >::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_trie & | getTrie () const |
parent_trie & | getTrie () |
const policy_container & | getPolicy () const |
policy_container & | getPolicy () |
Additional Inherited Members | |
Protected Types inherited from ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl >, ndnSIM::counting_policy_traits > | |
typedef trie< Name, ndnSIM::smart_pointer_payload_traits < EntryImpl >, typename ndnSIM::counting_policy_traits::policy_hook_type > | parent_trie |
typedef parent_trie::iterator | iterator |
typedef parent_trie::const_iterator | const_iterator |
typedef ndnSIM::counting_policy_traits::template policy< trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits < EntryImpl > , ndnSIM::counting_policy_traits > , parent_trie, typename ndnSIM::counting_policy_traits::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 >, ndnSIM::counting_policy_traits > | |
static iterator | s_iterator_to (typename parent_trie::iterator item) |
Class implementing FIB functionality.
Definition at line 70 of file ndn-fib-impl.h.
|
virtual |
Add or update FIB entry.
If the entry exists, metric will be updated. Otherwise, new entry will be created
name | Prefix |
face | Forwarding face |
metric | Routing metric |
Implements ns3::ndn::Fib.
Definition at line 99 of file ndn-fib-impl.cc.
|
virtual |
Add or update FIB entry using smart pointer to prefix.
If the entry exists, metric will be updated. Otherwise, new entry will be created
name | Smart pointer to prefix |
face | Forwarding face |
metric | Routing metric |
Implements ns3::ndn::Fib.
Definition at line 105 of file ndn-fib-impl.cc.
References ns3::ndn::fib::Entry::AddOrUpdateRoutingMetric().
|
virtual |
Get FIB entry for the prefix (exact match)
prefix | Name for FIB entry |
Implements ns3::ndn::Fib.
Definition at line 87 of file ndn-fib-impl.cc.
|
static |
Perform longest prefix match.
interest | Interest packet header |
Implements ns3::ndn::Fib.
Definition at line 75 of file ndn-fib-impl.cc.
References ns3::ndn::Interest::GetName(), and ns3::ndn::ndnSIM::trie_with_policy< Name, ndnSIM::smart_pointer_payload_traits< EntryImpl >, ndnSIM::counting_policy_traits >::longest_prefix_match().
|
virtual |
Remove FIB entry.
! ATTENTION ! Use with caution. All PIT entries referencing the corresponding FIB entry will become invalid. So, simulation may crash.
name | Smart pointer to prefix |
Implements ns3::ndn::Fib.
Definition at line 137 of file ndn-fib-impl.cc.
|
virtual |
Remove all references to a face from FIB.
If for some enty that face was the only element, this FIB entry will be removed.
Implements ns3::ndn::Fib.
Definition at line 196 of file ndn-fib-impl.cc.