blob: 051901cca14345c2cda85bd3dc048c0694033466 [file] [log] [blame]
Alexander Afanasyeve74cc1c2012-11-21 13:10:03 -08001/* -*- 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
12namespace ns3 {
13namespace ndn {
14namespace fw {
15
16typedef ForwardingStrategy BaseStrategy;
17
18class CustomStrategy:
19 public BaseStrategy
20{
21public:
22 static TypeId
23 GetTypeId ();
24
25 static std::string
26 GetLogName ();
27
28 CustomStrategy ();
29
30protected:
31 virtual bool
32 DoPropagateInterest (Ptr<Face> incomingFace,
Alexander Afanasyevfaa01f92013-07-10 18:34:31 -070033 Ptr<const Interest> interest,
Alexander Afanasyeve74cc1c2012-11-21 13:10:03 -080034 Ptr<pit::Entry> pitEntry);
35
36public:
37 virtual void
Alexander Afanasyev932d3312012-11-26 23:55:01 -080038 DidSendOutInterest (Ptr<Face> inFace, Ptr<Face> outFace,
Alexander Afanasyevfaa01f92013-07-10 18:34:31 -070039 Ptr<const Interest> interest,
Alexander Afanasyeve74cc1c2012-11-21 13:10:03 -080040 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
49protected:
50 static LogComponent g_log;
51
52// private:
53// std::string m_variable;
54
55private:
56 uint32_t m_counter;
57};
58
59
60
61} // namespace fw
62} // namespace ndn
63} // namespace ns3
64
65#endif // CUSTOM_STRATEGY_H