View | Details | Raw Unified | Return to bug 600
Collapse All | Expand All

(-)a/bindings/python/ns3_module_list_routing.py (-5 lines)
 Lines 120-130   def register_Ns3Ipv4ListRouting_methods( Link Here 
120
                   'void', 
120
                   'void', 
121
                   [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], 
121
                   [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], 
122
                   is_virtual=True)
122
                   is_virtual=True)
123
    ## ipv4-list-routing.h: ns3::Ptr<ns3::Ipv4StaticRouting> ns3::Ipv4ListRouting::GetStaticRouting() const [member function]
124
    cls.add_method('GetStaticRouting', 
125
                   'ns3::Ptr< ns3::Ipv4StaticRouting >', 
126
                   [], 
127
                   is_const=True, is_virtual=True)
128
    ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::DoDispose() [member function]
123
    ## ipv4-list-routing.h: void ns3::Ipv4ListRouting::DoDispose() [member function]
129
    cls.add_method('DoDispose', 
124
    cls.add_method('DoDispose', 
130
                   'void', 
125
                   'void', 
(-)a/src/helper/internet-stack-helper.cc (-2 / +2 lines)
 Lines 178-185   InternetStackHelper::InternetStackHelper Link Here 
178
  static Ipv4StaticRoutingHelper staticRouting;
178
  static Ipv4StaticRoutingHelper staticRouting;
179
  static Ipv4GlobalRoutingHelper globalRouting;
179
  static Ipv4GlobalRoutingHelper globalRouting;
180
  static Ipv4ListRoutingHelper listRouting;
180
  static Ipv4ListRoutingHelper listRouting;
181
  listRouting.Add (staticRouting,0);
181
  listRouting.Add (staticRouting, 0);
182
  listRouting.Add (globalRouting,3);
182
  listRouting.Add (globalRouting, -10);
183
  SetRoutingHelper (listRouting);
183
  SetRoutingHelper (listRouting);
184
}
184
}
185
185
(-)a/src/helper/ipv4-global-routing-helper.cc (-2 / +5 lines)
 Lines 29-40   void Link Here 
29
void 
29
void 
30
Ipv4GlobalRoutingHelper::PopulateRoutingTables (void)
30
Ipv4GlobalRoutingHelper::PopulateRoutingTables (void)
31
{
31
{
32
  GlobalRouteManager::PopulateRoutingTables ();
32
  GlobalRouteManager::BuildGlobalRoutingDatabase ();
33
  GlobalRouteManager::InitializeRoutes ();
33
}
34
}
34
void 
35
void 
35
Ipv4GlobalRoutingHelper::RecomputeRoutingTables (void)
36
Ipv4GlobalRoutingHelper::RecomputeRoutingTables (void)
36
{
37
{
37
  GlobalRouteManager::RecomputeRoutingTables ();
38
  GlobalRouteManager::DeleteGlobalRoutes ();
39
  GlobalRouteManager::BuildGlobalRoutingDatabase ();
40
  GlobalRouteManager::InitializeRoutes ();
38
}
41
}
39
42
40
43
(-)a/src/internet-stack/ipv4-l3-protocol.h (-3 lines)
 Lines 155-163   public: Link Here 
155
155
156
  Ptr<NetDevice> GetNetDevice (uint32_t i);
156
  Ptr<NetDevice> GetNetDevice (uint32_t i);
157
157
158
  void AddRoutingProtocol (Ptr<Ipv4RoutingProtocol> routingProtocol,
159
                           int16_t priority);
160
161
protected:
158
protected:
162
159
163
  virtual void DoDispose (void);
160
  virtual void DoDispose (void);
(-)a/src/routing/global-routing/global-route-manager.h (-7 / +7 lines)
 Lines 22-27    Link Here 
22
#ifndef GLOBAL_ROUTE_MANAGER_H
22
#ifndef GLOBAL_ROUTE_MANAGER_H
23
#define GLOBAL_ROUTE_MANAGER_H
23
#define GLOBAL_ROUTE_MANAGER_H
24
24
25
#include "ns3/deprecated.h"
26
25
namespace ns3 {
27
namespace ns3 {
26
28
27
/**
29
/**
 Lines 43-57   public: Link Here 
43
 * the nodes in the simulation.  Makes all nodes in the simulation into
45
 * the nodes in the simulation.  Makes all nodes in the simulation into
44
 * routers.
46
 * routers.
45
 *
47
 *
46
 * All this function does is call the three functions
48
 * All this function does is call the functions
47
 * SelectRouterNodes (), BuildGlobalRoutingDatabase (), and
49
 * BuildGlobalRoutingDatabase () and  InitializeRoutes ().
48
 * InitializeRoutes ().
49
 *
50
 *
50
 * @see SelectRouterNodes ();
51
 * @see BuildGlobalRoutingDatabase ();
51
 * @see BuildGlobalRoutingDatabase ();
52
 * @see InitializeRoutes ();
52
 * @see InitializeRoutes ();
53
 */
53
 */
54
  static void PopulateRoutingTables ();
54
  static void PopulateRoutingTables () NS_DEPRECATED;
55
55
56
 /**
56
 /**
57
  *@brief Remove all routes that were previously installed in a prior call
57
  *@brief Remove all routes that were previously installed in a prior call
 Lines 68-74   public: Link Here 
68
 * @see BuildGlobalRoutingDatabase ();
68
 * @see BuildGlobalRoutingDatabase ();
69
 * @see InitializeRoutes ();
69
 * @see InitializeRoutes ();
70
 */
70
 */
71
 static void RecomputeRoutingTables ();
71
 static void RecomputeRoutingTables () NS_DEPRECATED;
72
72
73
public:
73
public:
74
/**
74
/**
 Lines 76-82   public: Link Here 
76
 */
76
 */
77
  static uint32_t AllocateRouterId ();
77
  static uint32_t AllocateRouterId ();
78
78
79
private:
80
/**
79
/**
81
 * @brief Delete all static routes on all nodes that have a 
80
 * @brief Delete all static routes on all nodes that have a 
82
 * GlobalRouterInterface
81
 * GlobalRouterInterface
 Lines 99-104   private: Link Here 
99
 */
98
 */
100
  static void InitializeRoutes ();
99
  static void InitializeRoutes ();
101
100
101
private:
102
/**
102
/**
103
 * @brief Global Route Manager copy construction is disallowed.  There's no 
103
 * @brief Global Route Manager copy construction is disallowed.  There's no 
104
 * need for it and a compiler provided shallow copy would be wrong.
104
 * need for it and a compiler provided shallow copy would be wrong.
(-)a/src/routing/list-routing/ipv4-list-routing.cc (-21 lines)
 Lines 295-321   Ipv4ListRouting::GetRoutingProtocol (uin Link Here 
295
  return 0;
295
  return 0;
296
}
296
}
297
297
298
Ptr<Ipv4StaticRouting>
299
Ipv4ListRouting::GetStaticRouting (void) const
300
{
301
  NS_LOG_FUNCTION (this);
302
  Ipv4StaticRouting* srp;
303
  for (Ipv4RoutingProtocolList::const_iterator rprotoIter = m_routingProtocols.begin ();
304
       rprotoIter != m_routingProtocols.end (); rprotoIter++)
305
    {
306
      NS_LOG_LOGIC ("Searching for static routing");
307
      srp = dynamic_cast<Ipv4StaticRouting*> (PeekPointer((*rprotoIter).second));
308
      if (srp)
309
        {
310
          NS_LOG_LOGIC ("Found static routing");
311
          return Ptr<Ipv4StaticRouting> (srp);
312
        }
313
    }
314
  NS_LOG_LOGIC ("Static routing not found");
315
  return 0;
316
317
}
318
319
bool 
298
bool 
320
Ipv4ListRouting::Compare (const Ipv4RoutingProtocolEntry& a, const Ipv4RoutingProtocolEntry& b)
299
Ipv4ListRouting::Compare (const Ipv4RoutingProtocolEntry& a, const Ipv4RoutingProtocolEntry& b)
321
{
300
{
(-)a/src/routing/list-routing/ipv4-list-routing.h (-4 lines)
 Lines 23-30    Link Here 
23
#include "ns3/ipv4-routing-protocol.h"
23
#include "ns3/ipv4-routing-protocol.h"
24
24
25
namespace ns3 {
25
namespace ns3 {
26
27
class Ipv4StaticRouting;
28
26
29
/**
27
/**
30
 * \ingroup ipv4Routing 
28
 * \ingroup ipv4Routing 
 Lines 84-91   public: Link Here 
84
  virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
82
  virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
85
  virtual void SetIpv4 (Ptr<Ipv4> ipv4);
83
  virtual void SetIpv4 (Ptr<Ipv4> ipv4);
86
84
87
  virtual Ptr<Ipv4StaticRouting> GetStaticRouting (void) const;
88
89
protected:
85
protected:
90
  void DoDispose (void);
86
  void DoDispose (void);
91
private:
87
private:

Return to bug 600