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
flooding.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 #ifndef NDNSIM_FLOODING_H
23 #define NDNSIM_FLOODING_H
24 
25 #include "nacks.h"
26 #include "ns3/log.h"
27 
28 namespace ns3 {
29 namespace ndn {
30 namespace fw {
31 
46 class Flooding :
47  public Nacks
48 {
49 private:
50  typedef Nacks super;
51 
52 public:
53  static TypeId
54  GetTypeId ();
55 
59  static std::string
60  GetLogName ();
61 
65  Flooding ();
66 
67 protected:
68  // inherited from Nacks/ForwardingStrategy
69  virtual bool
70  DoPropagateInterest (Ptr<Face> inFace,
71  Ptr<const Interest> interest,
72  Ptr<pit::Entry> pitEntry);
73 
74 protected:
75  static LogComponent g_log;
76 };
77 
78 } // namespace fw
79 } // namespace ndn
80 } // namespace ns3
81 
82 #endif // NDNSIM_FLOODING
Simple flooding strategy.
Definition: flooding.h:46
static std::string GetLogName()
Helper function to retrieve logging name for the forwarding strategy.
Definition: flooding.cc:48
virtual bool DoPropagateInterest(Ptr< Face > inFace, Ptr< const Interest > interest, Ptr< pit::Entry > pitEntry)
Virtual method to perform Interest propagation according to the forwarding strategy logic...
Definition: flooding.cc:68
Flooding()
Default constructor.
Definition: flooding.cc:63
Implementation of experimental NACK messages (enables with EnableNACKs option)
Definition: nacks.h:33