NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-fib-helper.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_FIB_HELPER_H
21 #define NDN_FIB_HELPER_H
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 
25 #include "ns3/node.h"
26 #include "ns3/object-vector.h"
27 #include "ns3/pointer.h"
28 
29 #include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
30 
31 namespace ns3 {
32 namespace ndn {
33 
35 
44 class FibHelper {
45 public:
54  static void
55  AddRoute(Ptr<Node> node, const Name& prefix, shared_ptr<Face> face, int32_t metric);
56 
65  static void
66  AddRoute(const std::string& nodeName, const Name& prefix, uint32_t faceId, int32_t metric);
67 
76  static void
77  AddRoute(Ptr<Node> node, const Name& prefix, uint32_t faceId, int32_t metric);
78 
87  static void
88  AddRoute(Ptr<Node> node, const Name& prefix, Ptr<Node> otherNode, int32_t metric);
89 
99  static void
100  AddRoute(const std::string& nodeName, const Name& prefix, const std::string& otherNodeName,
101  int32_t metric);
102 
110  static void
111  RemoveRoute(Ptr<Node> node, const Name& prefix, shared_ptr<Face> face);
112 
120  static void
121  RemoveRoute(Ptr<Node> node, const Name& prefix, uint32_t faceId);
122 
130  static void
131  RemoveRoute(const std::string& nodeName, const Name& prefix, uint32_t faceId);
132 
140  static void
141  RemoveRoute(Ptr<Node> node, const Name& prefix, Ptr<Node> otherNode);
142 
150  static void
151  RemoveRoute(const std::string& nodeName, const Name& prefix, const std::string& otherNodeName);
152 
153 private:
154  static void
155  GenerateCommand(Interest& interest);
156 
157  static void
158  AddNextHop(const ControlParameters& parameters, Ptr<Node> node);
159 
160  static void
161  RemoveNextHop(const ControlParameters& parameters, Ptr<Node> node);
162 };
163 
164 } // namespace ndn
165 
166 } // namespace ns3
167 
168 #endif // NDN_FIB_HELPER_H
Copyright (c) 2011-2015 Regents of the University of California.
static void AddRoute(Ptr< Node > node, const Name &prefix, shared_ptr< Face > face, int32_t metric)
Add forwarding entry to FIB.
Copyright (c) 2011-2015 Regents of the University of California.
Forwarding Information Base (FIB) helper.
static void RemoveRoute(Ptr< Node > node, const Name &prefix, shared_ptr< Face > face)
remove forwarding entry in FIB