NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
best-route.h
1 /* -*- 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  * Ilya Moiseenko <iliamo@cs.ucla.edu>
20  */
21 
22 
23 #ifndef NDNSIM_BEST_ROUTE_H
24 #define NDNSIM_BEST_ROUTE_H
25 
26 #include "green-yellow-red.h"
27 #include "ns3/log.h"
28 
29 namespace ns3 {
30 namespace ndn {
31 namespace fw {
32 
37 class BestRoute :
38  public GreenYellowRed
39 {
40 private:
41  typedef GreenYellowRed super;
42 
43 public:
44  static TypeId
45  GetTypeId ();
46 
50  static std::string
51  GetLogName ();
52 
56  BestRoute ();
57 
58  // from super
59  virtual bool
60  DoPropagateInterest (Ptr<Face> incomingFace,
61  Ptr<const Interest> interest,
62  Ptr<pit::Entry> pitEntry);
63 protected:
64  static LogComponent g_log;
65 };
66 
67 } // namespace fw
68 } // namespace ndn
69 } // namespace ns3
70 
71 #endif // NDNSIM_BEST_ROUTE_H
Forwarding strategy extensions to track simple link status based on data plane performance.
virtual bool DoPropagateInterest(Ptr< Face > incomingFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Virtual method to perform Interest propagation according to the forwarding strategy logic...
Definition: best-route.cc:67
static std::string GetLogName()
Helper function to retrieve logging name for the forwarding strategy.
Definition: best-route.cc:45
Best route strategy.
Definition: best-route.h:37
BestRoute()
Default constructor.
Definition: best-route.cc:62