blob: 057669a87444166ea59cf5670dcd9a6520bc7fd0 [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 Afanasyeveae83ee2013-03-15 15:01:10 -070033 Ptr<const Interest> header,
Alexander Afanasyeve74cc1c2012-11-21 13:10:03 -080034 Ptr<const Packet> origPacket,
35 Ptr<pit::Entry> pitEntry);
36
37public:
38 virtual void
Alexander Afanasyev932d3312012-11-26 23:55:01 -080039 DidSendOutInterest (Ptr<Face> inFace, Ptr<Face> outFace,
Alexander Afanasyeveae83ee2013-03-15 15:01:10 -070040 Ptr<const Interest> header,
Alexander Afanasyeve74cc1c2012-11-21 13:10:03 -080041 Ptr<const Packet> origPacket,
42 Ptr<pit::Entry> pitEntry);
43
44 virtual void
45 WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry);
46
47 virtual void
48 WillSatisfyPendingInterest (Ptr<Face> inFace,
49 Ptr<pit::Entry> pitEntry);
50
51protected:
52 static LogComponent g_log;
53
54// private:
55// std::string m_variable;
56
57private:
58 uint32_t m_counter;
59};
60
61
62
63} // namespace fw
64} // namespace ndn
65} // namespace ns3
66
67#endif // CUSTOM_STRATEGY_H