Alexander Afanasyev | e74cc1c | 2012-11-21 13:10:03 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | |
| 3 | // custom-strategy.h |
| 4 | |
| 5 | #ifndef CUSTOM_STRATEGY_H |
| 6 | #define CUSTOM_STRATEGY_H |
| 7 | |
| 8 | #include "ns3/log.h" |
| 9 | #include "ns3/ndn-forwarding-strategy.h" |
| 10 | #include "ns3/ndn-l3-protocol.h" |
| 11 | |
| 12 | namespace ns3 { |
| 13 | namespace ndn { |
| 14 | namespace fw { |
| 15 | |
| 16 | typedef ForwardingStrategy BaseStrategy; |
| 17 | |
| 18 | class CustomStrategy: |
| 19 | public BaseStrategy |
| 20 | { |
| 21 | public: |
| 22 | static TypeId |
| 23 | GetTypeId (); |
| 24 | |
| 25 | static std::string |
| 26 | GetLogName (); |
| 27 | |
| 28 | CustomStrategy (); |
| 29 | |
| 30 | protected: |
| 31 | virtual bool |
| 32 | DoPropagateInterest (Ptr<Face> incomingFace, |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 33 | Ptr<const Interest> interest, |
Alexander Afanasyev | e74cc1c | 2012-11-21 13:10:03 -0800 | [diff] [blame] | 34 | Ptr<pit::Entry> pitEntry); |
| 35 | |
| 36 | public: |
| 37 | virtual void |
Alexander Afanasyev | 932d331 | 2012-11-26 23:55:01 -0800 | [diff] [blame] | 38 | DidSendOutInterest (Ptr<Face> inFace, Ptr<Face> outFace, |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 39 | Ptr<const Interest> interest, |
Alexander Afanasyev | e74cc1c | 2012-11-21 13:10:03 -0800 | [diff] [blame] | 40 | Ptr<pit::Entry> pitEntry); |
| 41 | |
| 42 | virtual void |
| 43 | WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry); |
| 44 | |
| 45 | virtual void |
| 46 | WillSatisfyPendingInterest (Ptr<Face> inFace, |
| 47 | Ptr<pit::Entry> pitEntry); |
| 48 | |
| 49 | protected: |
| 50 | static LogComponent g_log; |
| 51 | |
| 52 | // private: |
| 53 | // std::string m_variable; |
| 54 | |
| 55 | private: |
| 56 | uint32_t m_counter; |
| 57 | }; |
| 58 | |
| 59 | |
| 60 | |
| 61 | } // namespace fw |
| 62 | } // namespace ndn |
| 63 | } // namespace ns3 |
| 64 | |
| 65 | #endif // CUSTOM_STRATEGY_H |