blob: 4a4476d155bbaffc8c0ef0baa652d151d229c733 [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,
33 Ptr<const InterestHeader> header,
34 Ptr<const Packet> origPacket,
35 Ptr<pit::Entry> pitEntry);
36
37public:
38 virtual void
39 DidSendOutInterest (Ptr<Face> outFace,
40 Ptr<const InterestHeader> header,
41 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