21 #ifndef NDN_FORWARDING_STRATEGY_H 
   22 #define NDN_FORWARDING_STRATEGY_H 
   24 #include "ns3/packet.h" 
   25 #include "ns3/callback.h" 
   26 #include "ns3/object.h" 
   27 #include "ns3/traced-callback.h" 
   54 namespace fib { 
class Entry; }
 
   65   static TypeId GetTypeId ();
 
   87               Ptr<Interest> interest);
 
  155                      Ptr<const Interest> interest,
 
  156                      Ptr<pit::Entry> pitEntry);
 
  169                           Ptr<const Interest> interest);
 
  184                                Ptr<const Interest> interest,
 
  185                                Ptr<pit::Entry> pitEntry);
 
  200                               Ptr<const Interest> interest,
 
  201                               Ptr<pit::Entry> pitEntry);
 
  216                              Ptr<const Interest> interest,
 
  217                              Ptr<pit::Entry> pitEntry);
 
  233                                Ptr<const Interest> interest,
 
  234                                Ptr<pit::Entry> pitEntry);
 
  251                                Ptr<const Interest> interest,
 
  252                                Ptr<pit::Entry> pitEntry);
 
  264                               Ptr<pit::Entry> pitEntry);
 
  277                           Ptr<const Data> data,
 
  278                           Ptr<pit::Entry> pitEntry);
 
  291                   Ptr<const Data> data,
 
  292                   Ptr<pit::Entry> pitEntry);
 
  303                            Ptr<const Data> data,
 
  304                            bool didCreateCacheEntry);
 
  318                              Ptr<const Data> data,
 
  319                              bool didCreateCacheEntry);
 
  335                                   Ptr<const Interest> interest,
 
  336                                   Ptr<pit::Entry> pitEntry);
 
  356                       Ptr<const Interest> interest,
 
  357                       Ptr<pit::Entry> pitEntry);
 
  374                       Ptr<const Interest> interest,
 
  375                       Ptr<pit::Entry> pitEntry);
 
  388                       Ptr<const Interest> interest,
 
  389                       Ptr<pit::Entry> pitEntry);
 
  405                      Ptr<const Interest> interest,
 
  406                      Ptr<pit::Entry> pitEntry);
 
  428                        Ptr<const Interest> interest,
 
  429                        Ptr<pit::Entry> pitEntry) = 0;
 
  441   bool m_cacheUnsolicitedDataFromApps;
 
  442   bool m_cacheUnsolicitedData;
 
  443   bool m_detectRetransmissions;
 
  445   TracedCallback<Ptr<const Interest>,
 
  448   TracedCallback<Ptr<const Interest>,
 
  451   TracedCallback<Ptr<const Interest>,
 
  458   TracedCallback<Ptr<const Data>,
 
  462   TracedCallback<Ptr<const Data>,
 
  465   TracedCallback<Ptr<const Data>,
 
  472   TracedCallback< Ptr<const pit::Entry> > m_satisfiedInterests;
 
  473   TracedCallback< Ptr<const pit::Entry> > m_timedOutInterests;
 
virtual bool DetectRetransmittedInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Method that implements logic to distinguish between new and retransmitted interest. 
 
virtual void FailedToCreatePitEntry(Ptr< Face > inFace, Ptr< const Interest > interest)
An event that is fired every time a new PIT entry cannot be created (e.g., PIT container imposes a li...
 
virtual void OnInterest(Ptr< Face > face, Ptr< Interest > interest)
Actual processing of incoming Ndn interests. 
 
TracedCallback< Ptr< const Interest >, Ptr< const Face > > m_outInterests
Transmitted interests trace. 
 
virtual bool CanSendOutInterest(Ptr< Face > inFace, Ptr< Face > outFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Method to check whether Interest can be send out on the particular face or not. 
 
virtual bool DoPropagateInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)=0
Virtual method to perform Interest propagation according to the forwarding strategy logic...
 
virtual void DidReceiveSolicitedData(Ptr< Face > inFace, Ptr< const Data > data, bool didCreateCacheEntry)
Event which is fired every time a requested (solicited) DATA packet (there is an active PIT entry) is...
 
virtual void DidExhaustForwardingOptions(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
An even that is fired when Interest cannot be forwarded. 
 
virtual void DidReceiveUnsolicitedData(Ptr< Face > inFace, Ptr< const Data > data, bool didCreateCacheEntry)
Event which is fired every time an unsolicited DATA packet (no active PIT entry) is received...
 
virtual void WillSatisfyPendingInterest(Ptr< Face > inFace, Ptr< pit::Entry > pitEntry)
Even fired just before Interest will be satisfied. 
 
virtual void NotifyNewAggregate()
Even when object is aggregated to another Object. 
 
virtual void DidSuppressSimilarInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
An event that is fired every time when a similar Interest is received and suppressed (collapsed) ...
 
static std::string GetLogName()
Helper function to retrieve logging name for the forwarding strategy. 
 
virtual void DidSendOutData(Ptr< Face > inFace, Ptr< Face > outFace, Ptr< const Data > data, Ptr< pit::Entry > pitEntry)
Event which is fired just after data was send out on the face. 
 
virtual void DidReceiveDuplicateInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
An event that is fired every time a duplicated Interest is received. 
 
virtual bool ShouldSuppressIncomingInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Method implementing logic to suppress (collapse) similar Interests. 
 
TracedCallback< Ptr< const Data >, bool, Ptr< const Face > > m_outData
trace of outgoing Data 
 
virtual void WillEraseTimedOutPendingInterest(Ptr< pit::Entry > pitEntry)
Event fired just before PIT entry is removed by timeout. 
 
TracedCallback< Ptr< const Interest >, Ptr< const Face > > m_dropInterests
trace of dropped Interests 
 
Class implementing FIB functionality. 
 
virtual void RemoveFace(Ptr< Face > face)
Event fired every time face is removed from NDN stack. 
 
virtual void DoDispose()
Do cleanup. 
 
virtual void DidSendOutInterest(Ptr< Face > inFace, Ptr< Face > outFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Event fired just after forwarding the Interest. 
 
TracedCallback< Ptr< const Data >, Ptr< const Face > > m_dropData
trace of dropped Data 
 
ForwardingStrategy()
Default constructor. 
 
virtual void DidCreatePitEntry(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
An event that is fired every time a new PIT entry is created. 
 
virtual void OnData(Ptr< Face > face, Ptr< Data > data)
Actual processing of incoming Ndn content objects. 
 
virtual void PropagateInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Wrapper method, which performs general tasks and calls DoPropagateInterest method. 
 
virtual void WillRemoveFibEntry(Ptr< fib::Entry > fibEntry)
Fired just before FIB entry will be removed from FIB. 
 
Ptr< ContentStore > m_contentStore
Content store (for caching purposes only) 
 
virtual void DidAddFibEntry(Ptr< fib::Entry > fibEntry)
Event fired every time a FIB entry is added to FIB. 
 
Ptr< Pit > m_pit
Reference to PIT to which this forwarding strategy is associated. 
 
TracedCallback< Ptr< const Interest >, Ptr< const Face > > m_inInterests
trace of incoming Interests 
 
virtual void DidForwardSimilarInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
An event that is fired every time when a similar Interest is received and further forwarded (not supp...
 
Abstract base class for Ndn forwarding strategies. 
 
virtual void AddFace(Ptr< Face > face)
Event fired every time face is added to NDN stack. 
 
virtual bool TrySendOutInterest(Ptr< Face > inFace, Ptr< Face > outFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Method implementing actual interest forwarding, taking into account CanSendOutInterest decision...
 
TracedCallback< Ptr< const Data >, Ptr< const Face > > m_inData
trace of incoming Data 
 
virtual void SatisfyPendingInterest(Ptr< Face > inFace, Ptr< const Data > data, Ptr< pit::Entry > pitEntry)
Actual procedure to satisfy Interest.