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
ndn-global-routing-helper.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2 /*
3  * Copyright (c) 2011 UCLA
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 #ifndef NDN_GLOBAL_ROUTING_HELPER_H
22 #define NDN_GLOBAL_ROUTING_HELPER_H
23 
24 #include "ns3/ptr.h"
25 
26 namespace ns3 {
27 
28 class Node;
29 class NodeContainer;
30 class Channel;
31 
32 namespace ndn {
33 
39 {
40 public:
48  void
49  Install (Ptr<Node> node);
50 
51 
59  void
60  Install (const NodeContainer &nodes);
61 
65  void
66  InstallAll ();
67 
73  void
74  AddOrigin (const std::string &prefix, Ptr<Node> node);
75 
81  void
82  AddOrigins (const std::string &prefix, const NodeContainer &nodes);
83 
89  void
90  AddOrigin (const std::string &prefix, const std::string &nodeName);
91 
95  void
97 
103  static void
104  CalculateRoutes (bool invalidatedRoutes = true);
105 
115  static void
116  CalculateAllPossibleRoutes (bool invalidatedRoutes = true);
117 
118 private:
119  void
120  Install (Ptr<Channel> channel);
121 };
122 
123 } // namespace ndn
124 } // namespace ns3
125 
126 #endif // NDN_GLOBAL_ROUTING_HELPER_H
void InstallAll()
Install GlobalRouter interface on all nodes.
static void CalculateRoutes(bool invalidatedRoutes=true)
Calculate for every node shortest path trees and install routes to all prefix origins.
void AddOrigins(const std::string &prefix, const NodeContainer &nodes)
Add `prefix' as origin on all `nodes'.
static void CalculateAllPossibleRoutes(bool invalidatedRoutes=true)
Calculate all possible next-hop independent alternative routes.
void Install(Ptr< Node > node)
Install GlobalRouter interface on a node.
Helper for GlobalRouter interface.
void AddOrigin(const std::string &prefix, Ptr< Node > node)
Add `prefix' as origin on `node'.
void AddOriginsForAll()
Add origin to each node based on the node's name (using Names class)