24 #include "ns3/simple-ref-count.h"
27 #include "ns3/ndn-fib-entry.h"
33 typedef Interest InterestHeader;
44 class Fib :
public Object
71 virtual Ptr<fib::Entry>
80 virtual Ptr<fib::Entry>
92 virtual Ptr<fib::Entry>
93 Add (
const Name &prefix, Ptr<Face> face, int32_t metric) = 0;
104 virtual Ptr<fib::Entry>
105 Add (
const Ptr<const Name> &prefix, Ptr<Face> face, int32_t metric) = 0;
116 Remove (
const Ptr<const Name> &prefix) = 0;
135 Print (std::ostream &os)
const = 0;
146 virtual Ptr<const fib::Entry>
152 virtual Ptr<fib::Entry>
158 virtual Ptr<const fib::Entry>
164 virtual Ptr<fib::Entry>
170 virtual Ptr<const fib::Entry>
171 Next (Ptr<const fib::Entry>)
const = 0;
176 virtual Ptr<fib::Entry>
177 Next (Ptr<fib::Entry>) = 0;
186 static inline Ptr<Fib>
187 GetFib (Ptr<Object> node);
200 std::ostream& operator<< (std::ostream& os,
const Fib &fib);
205 return node->GetObject<
Fib> ();
211 #endif // _NDN_FIB_H_
virtual Ptr< const fib::Entry > Next(Ptr< const fib::Entry >) const =0
Advance the iterator.
virtual Ptr< fib::Entry > Add(const Name &prefix, Ptr< Face > face, int32_t metric)=0
Add or update FIB entry.
static TypeId GetTypeId()
Interface ID.
virtual void Print(std::ostream &os) const =0
Print out entries in FIB.
virtual void InvalidateAll()=0
Invalidate all FIB entries.
virtual Ptr< fib::Entry > LongestPrefixMatch(const Interest &interest)=0
Perform longest prefix match.
virtual void Remove(const Ptr< const Name > &prefix)=0
Remove FIB entry.
Fib()
Default constructor.
virtual ~Fib()
Virtual destructor.
Class implementing FIB functionality.
virtual Ptr< fib::Entry > Find(const Name &prefix)=0
Get FIB entry for the prefix (exact match)
virtual void RemoveFromAll(Ptr< Face > face)=0
Remove all references to a face from FIB.
NDN Interest (wire formats are defined in wire)
static Ptr< Fib > GetFib(Ptr< Object > node)
Static call to cheat python bindings.
virtual uint32_t GetSize() const =0
Get number of entries in FIB.
virtual Ptr< const fib::Entry > End() const =0
Return item next after last (no order guaranteed)
virtual Ptr< const fib::Entry > Begin() const =0
Return first element of FIB (no order guaranteed)