blob: 24fb5926b88e28d465558213fad68cbb6a364b04 [file] [log] [blame]
Alexander Afanasyev1e7bcaf2012-09-05 10:17:53 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2011 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 */
20
21
22#ifndef NDNSIM_SIMPLE_LIMITS_H
23#define NDNSIM_SIMPLE_LIMITS_H
24
25#include "ns3/event-id.h"
26#include "best-route.h"
27
28namespace ns3 {
29namespace ndn {
30namespace fw {
31
32/**
33 * \ingroup ndn
34 * \brief Strategy implementing per-FIB entry limits
35 */
36class SimpleLimits :
37 public BestRoute
38{
39private:
40 typedef BestRoute super;
41
42public:
43 static TypeId
44 GetTypeId ();
45
46 /**
47 * @brief Default constructor
48 */
49 SimpleLimits ();
50
51 virtual void
52 WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry);
53
54protected:
55 virtual bool
56 TrySendOutInterest (Ptr<Face> inFace,
57 Ptr<Face> outFace,
58 Ptr<const InterestHeader> header,
59 Ptr<const Packet> origPacket,
60 Ptr<pit::Entry> pitEntry);
61
62 virtual void
63 WillSatisfyPendingInterest (Ptr<Face> inFace,
64 Ptr<pit::Entry> pitEntry);
65
66private:
67 // from Object
68 virtual void
69 NotifyNewAggregate (); ///< @brief Even when object is aggregated to another Object
70
71 virtual void
72 DoDispose ();
73};
74
75
76} // namespace fw
77} // namespace ndn
78} // namespace ns3
79
80#endif // NDNSIM_SIMPLE_LIMITS_H