author | Craig Dowell <craigdo@ee.washington.edu> |
Fri, 27 Jul 2007 20:48:21 -0700 | |
changeset 1114 | 4bf5d1262aae |
parent 1113 | 5b63b39161e7 |
permissions | -rw-r--r-- |
1111 | 1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* This program is free software; you can redistribute it and/or modify |
|
4 |
* it under the terms of the GNU General Public License version 2 as |
|
5 |
* published by the Free Software Foundation; |
|
6 |
* |
|
7 |
* This program is distributed in the hope that it will be useful, |
|
8 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
9 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
10 |
* GNU General Public License for more details. |
|
11 |
* |
|
12 |
* You should have received a copy of the GNU General Public License |
|
13 |
* along with this program; if not, write to the Free Software |
|
14 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
15 |
*/ |
|
1112 | 16 |
|
1111 | 17 |
#ifndef GLOBAL_ROUTE_MANAGER_IMPL_H |
18 |
#define GLOBAL_ROUTE_MANAGER_IMPL_H |
|
19 |
||
20 |
#include <stdint.h> |
|
21 |
#include <list> |
|
22 |
#include <queue> |
|
23 |
#include <map> |
|
24 |
#include "ns3/object.h" |
|
25 |
#include "ns3/ptr.h" |
|
26 |
#include "ns3/ipv4-address.h" |
|
27 |
#include "global-router-interface.h" |
|
28 |
||
29 |
namespace ns3 { |
|
30 |
||
31 |
const uint32_t SPF_INFINITY = 0xffffffff; |
|
32 |
||
33 |
class CandidateQueue; |
|
34 |
||
35 |
/** |
|
36 |
* @brief Vertex used in shortest path first (SPF) computations. See RFC 2328, |
|
37 |
* Section 16. |
|
38 |
* |
|
39 |
* Each router in the simulation is associated with an SPFVertex object. When |
|
40 |
* calculating routes, each of these routers is, in turn, chosen as the "root" |
|
41 |
* of the calculation and routes to all of the other routers are eventually |
|
42 |
* saved in the routing tables of each of the chosen nodes. Each of these |
|
43 |
* routers in the calculation has an associated SPFVertex. |
|
44 |
* |
|
45 |
* The "Root" vertex is the SPFVertex representing the router that is having |
|
46 |
* its routing tables set. The SPFVertex objects representing other routers |
|
47 |
* or networks in the simulation are arranged in the SPF tree. It is this |
|
48 |
* tree that represents the Shortest Paths to the other networks. |
|
49 |
* |
|
50 |
* Each SPFVertex has a pointer to the Global Router Link State Advertisement |
|
51 |
* (LSA) that its underlying router has exported. Within these LSAs are |
|
52 |
* Global Router Link Records that describe the point to point links from the |
|
53 |
* underlying router to other nodes (represented by other SPFVertex objects) |
|
54 |
* in the simulation topology. The combination of the arrangement of the |
|
55 |
* SPFVertex objects in the SPF tree, along with the details of the link |
|
56 |
* records that connect them provide the information required to construct the |
|
57 |
* required routes. |
|
58 |
*/ |
|
59 |
class SPFVertex |
|
60 |
{ |
|
61 |
public: |
|
62 |
/** |
|
63 |
* @brief Enumeration of the possible types of SPFVertex objects. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
64 |
* @internal |
1111 | 65 |
* |
66 |
* Currently we use VertexRouter to identify objects that represent a router |
|
67 |
* in the simulation topology, and VertexNetwork to identify objects that |
|
68 |
* represent a network. |
|
69 |
*/ |
|
70 |
enum VertexType { |
|
71 |
VertexUnknown = 0, /**< Uninitialized Link Record */ |
|
72 |
VertexRouter, /**< Vertex representing a router in the topology */ |
|
73 |
VertexNetwork /**< Vertex representing a network in the topology */ |
|
74 |
}; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
75 |
|
1111 | 76 |
/** |
77 |
* @brief Construct an empty ("uninitialized") SPFVertex (Shortest Path First |
|
78 |
* Vertex). |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
79 |
* @internal |
1111 | 80 |
* |
81 |
* The Vertex Type is set to VertexUnknown, the Vertex ID is set to |
|
82 |
* 255.255.255.255, and the distance from root is set to infinity |
|
83 |
* (UINT32_MAX). The referenced Link State Advertisement (LSA) is set to |
|
84 |
* null as is the parent SPFVertex. The outgoing interface index is set to |
|
85 |
* infinity, the next hop address is set to 0.0.0.0 and the list of children |
|
86 |
* of the SPFVertex is initialized to empty. |
|
87 |
* |
|
88 |
* @see VertexType |
|
89 |
*/ |
|
90 |
SPFVertex(); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
91 |
|
1111 | 92 |
/** |
93 |
* @brief Construct an initialized SPFVertex (Shortest Path First Vertex). |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
94 |
* @internal |
1111 | 95 |
* |
96 |
* The Vertex Type is initialized to VertexRouter and the Vertex ID is found |
|
97 |
* from the Link State ID of the Link State Advertisement (LSA) passed as a |
|
98 |
* parameter. The Link State ID is set to the Router ID of the advertising |
|
99 |
* router. The referenced LSA (m_lsa) is set to the given LSA. Other than |
|
100 |
* these members, initialization is as in the default constructor. |
|
101 |
* of the SPFVertex is initialized to empty. |
|
102 |
* |
|
103 |
* @see SPFVertex::SPFVertex () |
|
104 |
* @see VertexType |
|
105 |
* @see GlobalRouterLSA |
|
106 |
* @param lsa The Link State Advertisement used for finding initial values. |
|
107 |
*/ |
|
108 |
SPFVertex(GlobalRouterLSA* lsa); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
109 |
|
1111 | 110 |
/** |
111 |
* @brief Destroy an SPFVertex (Shortest Path First Vertex). |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
112 |
* @internal |
1111 | 113 |
* |
114 |
* The children vertices of the SPFVertex are recursively deleted. |
|
115 |
* |
|
116 |
* @see SPFVertex::SPFVertex () |
|
117 |
*/ |
|
118 |
~SPFVertex(); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
119 |
|
1111 | 120 |
/** |
121 |
* @brief Get the Vertex Type field of a SPFVertex object. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
122 |
* @internal |
1111 | 123 |
* |
124 |
* The Vertex Type describes the kind of simulation object a given SPFVertex |
|
125 |
* represents. |
|
126 |
* |
|
127 |
* @see VertexType |
|
128 |
* @returns The VertexType of the current SPFVertex object. |
|
129 |
*/ |
|
130 |
VertexType GetVertexType (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
131 |
|
1111 | 132 |
/** |
133 |
* @brief Set the Vertex Type field of a SPFVertex object. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
134 |
* @internal |
1111 | 135 |
* |
136 |
* The Vertex Type describes the kind of simulation object a given SPFVertex |
|
137 |
* represents. |
|
138 |
* |
|
139 |
* @see VertexType |
|
140 |
* @param type The new VertexType for the current SPFVertex object. |
|
141 |
*/ |
|
142 |
void SetVertexType (VertexType type); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
143 |
|
1111 | 144 |
/** |
145 |
* @brief Get the Vertex ID field of a SPFVertex object. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
146 |
* @internal |
1111 | 147 |
* |
148 |
* The Vertex ID uniquely identifies the simulation object a given SPFVertex |
|
149 |
* represents. Typically, this is the Router ID for SPFVertex objects |
|
150 |
* representing routers, and comes from the Link State Advertisement of a |
|
151 |
* router aggregated to a node in the simulation. These IDs are allocated |
|
152 |
* automatically by the routing environment and look like IP addresses |
|
153 |
* beginning at 0.0.0.0 and monotonically increasing as new routers are |
|
154 |
* instantiated. |
|
155 |
* |
|
156 |
* @returns The Ipv4Address Vertex ID of the current SPFVertex object. |
|
157 |
*/ |
|
158 |
Ipv4Address GetVertexId (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
159 |
|
1111 | 160 |
/** |
161 |
* @brief Set the Vertex ID field of a SPFVertex object. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
162 |
* @internal |
1111 | 163 |
* |
164 |
* The Vertex ID uniquely identifies the simulation object a given SPFVertex |
|
165 |
* represents. Typically, this is the Router ID for SPFVertex objects |
|
166 |
* representing routers, and comes from the Link State Advertisement of a |
|
167 |
* router aggregated to a node in the simulation. These IDs are allocated |
|
168 |
* automatically by the routing environment and look like IP addresses |
|
169 |
* beginning at 0.0.0.0 and monotonically increase as new routers are |
|
170 |
* instantiated. This method is an explicit override of the automatically |
|
171 |
* generated value. |
|
172 |
* |
|
173 |
* @param id The new Ipv4Address Vertex ID for the current SPFVertex object. |
|
174 |
*/ |
|
175 |
void SetVertexId (Ipv4Address id); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
176 |
|
1111 | 177 |
/** |
178 |
* @brief Get the Global Router Link State Advertisement returned by the |
|
179 |
* Global Router represented by this SPFVertex during the route discovery |
|
180 |
* process. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
181 |
* @internal |
1111 | 182 |
* |
183 |
* @see GlobalRouter |
|
184 |
* @see GlobalRouterLSA |
|
185 |
* @see GlobalRouter::DiscoverLSAs () |
|
186 |
* @returns A pointer to the GlobalRouterLSA found by the router represented |
|
187 |
* by this SPFVertex object. |
|
188 |
*/ |
|
189 |
GlobalRouterLSA* GetLSA (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
190 |
|
1111 | 191 |
/** |
192 |
* @brief Set the Global Router Link State Advertisement returned by the |
|
193 |
* Global Router represented by this SPFVertex during the route discovery |
|
194 |
* process. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
195 |
* @internal |
1111 | 196 |
* |
197 |
* @see SPFVertex::GetLSA () |
|
198 |
* @see GlobalRouter |
|
199 |
* @see GlobalRouterLSA |
|
200 |
* @see GlobalRouter::DiscoverLSAs () |
|
201 |
* @warning Ownership of the LSA is transferred to the "this" SPFVertex. You |
|
202 |
* must not delete the LSA after calling this method. |
|
203 |
* @param lsa A pointer to the GlobalRouterLSA. |
|
204 |
*/ |
|
205 |
void SetLSA (GlobalRouterLSA* lsa); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
206 |
|
1111 | 207 |
/** |
208 |
* @brief Get the distance from the root vertex to "this" SPFVertex object. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
209 |
* @internal |
1111 | 210 |
* |
211 |
* Each router in the simulation is associated with an SPFVertex object. When |
|
212 |
* calculating routes, each of these routers is, in turn, chosen as the "root" |
|
213 |
* of the calculation and routes to all of the other routers are eventually |
|
214 |
* saved in the routing tables of each of the chosen nodes. Each of these |
|
215 |
* routers in the calculation has an associated SPFVertex. |
|
216 |
* |
|
217 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
218 |
* having its routing tables set. The "this" SPFVertex is the vertex to which |
|
219 |
* a route is being calculated from the root. The distance from the root that |
|
220 |
* we're asking for is the number of hops from the root vertex to the vertex |
|
221 |
* in question. |
|
222 |
* |
|
223 |
* The distance is calculated during route discovery and is stored in a |
|
224 |
* member variable. This method simply fetches that value. |
|
225 |
* |
|
226 |
* @returns The distance, in hops, from the root SPFVertex to "this" SPFVertex. |
|
227 |
*/ |
|
228 |
uint32_t GetDistanceFromRoot (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
229 |
|
1111 | 230 |
/** |
231 |
* @brief Set the distance from the root vertex to "this" SPFVertex object. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
232 |
* @internal |
1111 | 233 |
* |
234 |
* Each router in the simulation is associated with an SPFVertex object. When |
|
235 |
* calculating routes, each of these routers is, in turn, chosen as the "root" |
|
236 |
* of the calculation and routes to all of the other routers are eventually |
|
237 |
* saved in the routing tables of each of the chosen nodes. Each of these |
|
238 |
* routers in the calculation has an associated SPFVertex. |
|
239 |
* |
|
240 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
241 |
* having its routing tables set. The "this" SPFVertex is the vertex to which |
|
242 |
* a route is being calculated from the root. The distance from the root that |
|
243 |
* we're asking for is the number of hops from the root vertex to the vertex |
|
244 |
* in question. |
|
245 |
* |
|
246 |
* @param distance The distance, in hops, from the root SPFVertex to "this" |
|
247 |
* SPFVertex. |
|
248 |
*/ |
|
249 |
void SetDistanceFromRoot (uint32_t distance); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
250 |
|
1111 | 251 |
/** |
252 |
* @brief Get the interface ID that should be used to begin forwarding packets |
|
253 |
* from the root SPFVertex to "this" SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
254 |
* @internal |
1111 | 255 |
* |
256 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
257 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
258 |
* "root" of the calculation and routes to all of the other routers are |
|
259 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
260 |
* |
|
261 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
262 |
* having its routing tables set. The "this" SPFVertex is the vertex that |
|
263 |
* represents the host or network to which a route is being calculated from |
|
264 |
* the root. The outgoing interface that we're asking for is the interface |
|
265 |
* index on the root node that should be used to start packets along the |
|
266 |
* path to "this" vertex. |
|
267 |
* |
|
268 |
* When initializing the root SPFVertex, the interface ID is determined by |
|
269 |
* examining the Global Router Link Records of the Link State Advertisement |
|
270 |
* generated by the root node's GlobalRouter. These interfaces are used to |
|
271 |
* forward packets off of the root's network down those links. As other |
|
272 |
* vertices are discovered which are further away from the root, they will |
|
273 |
* be accessible down one of the paths begun by a Global Router Link Record. |
|
274 |
* |
|
275 |
* To forward packets to these hosts or networks, the root node must begin |
|
276 |
* the forwarding process by sending the packets to the interface of that |
|
277 |
* first hop. This means that the first hop address and interface ID must |
|
278 |
* be the same for all downstream SPFVertices. We call this "inheriting" |
|
279 |
* the interface and next hop. |
|
280 |
* |
|
281 |
* In this method, the root node is asking, "which of my local interfaces |
|
282 |
* should I use to get a packet to the network or host represented by 'this' |
|
283 |
* SPFVertex." |
|
284 |
* |
|
285 |
* @see GlobalRouter |
|
286 |
* @see GlobalRouterLSA |
|
287 |
* @see GlobalRouterLinkRecord |
|
288 |
* @returns The interface index to use when forwarding packets to the host |
|
289 |
* or network represented by "this" SPFVertex. |
|
290 |
*/ |
|
291 |
uint32_t GetOutgoingInterfaceId (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
292 |
|
1111 | 293 |
/** |
294 |
* @brief Set the interface ID that should be used to begin forwarding packets |
|
295 |
* from the root SPFVertex to "this" SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
296 |
* @internal |
1111 | 297 |
* |
298 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
299 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
300 |
* "root" of the calculation and routes to all of the other routers are |
|
301 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
302 |
* |
|
303 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
304 |
* having its routing tables set. The "this" SPFVertex is the vertex that |
|
305 |
* represents the host or network to which a route is being calculated from |
|
306 |
* the root. The outgoing interface that we're asking for is the interface |
|
307 |
* index on the root node that should be used to start packets along the |
|
308 |
* path to "this" vertex. |
|
309 |
* |
|
310 |
* When initializing the root SPFVertex, the interface ID is determined by |
|
311 |
* examining the Global Router Link Records of the Link State Advertisement |
|
312 |
* generated by the root node's GlobalRouter. These interfaces are used to |
|
313 |
* forward packets off of the root's network down those links. As other |
|
314 |
* vertices are discovered which are further away from the root, they will |
|
315 |
* be accessible down one of the paths begun by a Global Router Link Record. |
|
316 |
* |
|
317 |
* To forward packets to these hosts or networks, the root node must begin |
|
318 |
* the forwarding process by sending the packets to the interface of that |
|
319 |
* first hop. This means that the first hop address and interface ID must |
|
320 |
* be the same for all downstream SPFVertices. We call this "inheriting" |
|
321 |
* the interface and next hop. |
|
322 |
* |
|
323 |
* In this method, we are letting the root node know which of its local |
|
324 |
* interfaces it should use to get a packet to the network or host represented |
|
325 |
* by "this" SPFVertex. |
|
326 |
* |
|
327 |
* @see GlobalRouter |
|
328 |
* @see GlobalRouterLSA |
|
329 |
* @see GlobalRouterLinkRecord |
|
330 |
* @param id The interface index to use when forwarding packets to the host or |
|
331 |
* network represented by "this" SPFVertex. |
|
332 |
*/ |
|
333 |
void SetOutgoingInterfaceId (uint32_t id); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
334 |
|
1111 | 335 |
/** |
336 |
* @brief Get the IP address that should be used to begin forwarding packets |
|
337 |
* from the root SPFVertex to "this" SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
338 |
* @internal |
1111 | 339 |
* |
340 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
341 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
342 |
* "root" of the calculation and routes to all of the other routers are |
|
343 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
344 |
* |
|
345 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
346 |
* having its routing tables set. The "this" SPFVertex is the vertex that |
|
347 |
* represents the host or network to which a route is being calculated from |
|
348 |
* the root. The IP address that we're asking for is the address on the |
|
349 |
* remote side of a link off of the root node that should be used as the |
|
350 |
* destination for packets along the path to "this" vertex. |
|
351 |
* |
|
352 |
* When initializing the root SPFVertex, the IP address used when forwarding |
|
353 |
* packets is determined by examining the Global Router Link Records of the |
|
354 |
* Link State Advertisement generated by the root node's GlobalRouter. This |
|
355 |
* address is used to forward packets off of the root's network down those |
|
356 |
* links. As other vertices / nodes are discovered which are further away |
|
357 |
* from the root, they will be accessible down one of the paths via a link |
|
358 |
* described by one of these Global Router Link Records. |
|
359 |
* |
|
360 |
* To forward packets to these hosts or networks, the root node must begin |
|
361 |
* the forwarding process by sending the packets to a first hop router down |
|
362 |
* an interface. This means that the first hop address and interface ID must |
|
363 |
* be the same for all downstream SPFVertices. We call this "inheriting" |
|
364 |
* the interface and next hop. |
|
365 |
* |
|
366 |
* In this method, the root node is asking, "which router should I send a |
|
367 |
* packet to in order to get that packet to the network or host represented |
|
368 |
* by 'this' SPFVertex." |
|
369 |
* |
|
370 |
* @see GlobalRouter |
|
371 |
* @see GlobalRouterLSA |
|
372 |
* @see GlobalRouterLinkRecord |
|
373 |
* @returns The IP address to use when forwarding packets to the host |
|
374 |
* or network represented by "this" SPFVertex. |
|
375 |
*/ |
|
376 |
Ipv4Address GetNextHop (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
377 |
|
1111 | 378 |
/** |
379 |
* @brief Set the IP address that should be used to begin forwarding packets |
|
380 |
* from the root SPFVertex to "this" SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
381 |
* @internal |
1111 | 382 |
* |
383 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
384 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
385 |
* "root" of the calculation and routes to all of the other routers are |
|
386 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
387 |
* |
|
388 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
389 |
* having its routing tables set. The "this" SPFVertex is the vertex that |
|
390 |
* represents the host or network to which a route is being calculated from |
|
391 |
* the root. The IP address that we're asking for is the address on the |
|
392 |
* remote side of a link off of the root node that should be used as the |
|
393 |
* destination for packets along the path to "this" vertex. |
|
394 |
* |
|
395 |
* When initializing the root SPFVertex, the IP address used when forwarding |
|
396 |
* packets is determined by examining the Global Router Link Records of the |
|
397 |
* Link State Advertisement generated by the root node's GlobalRouter. This |
|
398 |
* address is used to forward packets off of the root's network down those |
|
399 |
* links. As other vertices / nodes are discovered which are further away |
|
400 |
* from the root, they will be accessible down one of the paths via a link |
|
401 |
* described by one of these Global Router Link Records. |
|
402 |
* |
|
403 |
* To forward packets to these hosts or networks, the root node must begin |
|
404 |
* the forwarding process by sending the packets to a first hop router down |
|
405 |
* an interface. This means that the first hop address and interface ID must |
|
406 |
* be the same for all downstream SPFVertices. We call this "inheriting" |
|
407 |
* the interface and next hop. |
|
408 |
* |
|
409 |
* In this method we are telling the root node which router it should send |
|
410 |
* should I send a packet to in order to get that packet to the network or |
|
411 |
* host represented by 'this' SPFVertex." |
|
412 |
* |
|
413 |
* @see GlobalRouter |
|
414 |
* @see GlobalRouterLSA |
|
415 |
* @see GlobalRouterLinkRecord |
|
416 |
* @param nextHop The IP address to use when forwarding packets to the host |
|
417 |
* or network represented by "this" SPFVertex. |
|
418 |
*/ |
|
419 |
void SetNextHop (Ipv4Address nextHop); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
420 |
|
1111 | 421 |
/** |
422 |
* @brief Get a pointer to the SPFVector that is the parent of "this" |
|
423 |
* SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
424 |
* @internal |
1111 | 425 |
* |
426 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
427 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
428 |
* "root" of the calculation and routes to all of the other routers are |
|
429 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
430 |
* |
|
431 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
432 |
* having its routing tables set and is the root of the SPF tree. |
|
433 |
* |
|
434 |
* This method returns a pointer to the parent node of "this" SPFVertex |
|
435 |
* (both of which reside in that SPF tree). |
|
436 |
* |
|
437 |
* @returns A pointer to the SPFVertex that is the parent of "this" SPFVertex |
|
438 |
* in the SPF tree. |
|
439 |
*/ |
|
440 |
SPFVertex* GetParent (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
441 |
|
1111 | 442 |
/** |
443 |
* @brief Set the pointer to the SPFVector that is the parent of "this" |
|
444 |
* SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
445 |
* @internal |
1111 | 446 |
* |
447 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
448 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
449 |
* "root" of the calculation and routes to all of the other routers are |
|
450 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
451 |
* |
|
452 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
453 |
* having its routing tables set and is the root of the SPF tree. |
|
454 |
* |
|
455 |
* This method sets the parent pointer of "this" SPFVertex (both of which |
|
456 |
* reside in that SPF tree). |
|
457 |
* |
|
458 |
* @param parent A pointer to the SPFVertex that is the parent of "this" |
|
459 |
* SPFVertex* in the SPF tree. |
|
460 |
*/ |
|
461 |
void SetParent (SPFVertex* parent); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
462 |
|
1111 | 463 |
/** |
464 |
* @brief Get the number of children of "this" SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
465 |
* @internal |
1111 | 466 |
* |
467 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
468 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
469 |
* "root" of the calculation and routes to all of the other routers are |
|
470 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
471 |
* |
|
472 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
473 |
* having its routing tables set and is the root of the SPF tree. Each vertex |
|
474 |
* in the SPF tree can have a number of children that represent host or |
|
475 |
* network routes available via that vertex. |
|
476 |
* |
|
477 |
* This method returns the number of children of "this" SPFVertex (which |
|
478 |
* reside in the SPF tree). |
|
479 |
* |
|
480 |
* @returns The number of children of "this" SPFVertex (which reside in the |
|
481 |
* SPF tree). |
|
482 |
*/ |
|
483 |
uint32_t GetNChildren (void) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
484 |
|
1111 | 485 |
/** |
486 |
* @brief Get a borrowed SPFVertex pointer to the specified child of "this" |
|
487 |
* SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
488 |
* @internal |
1111 | 489 |
* |
490 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
491 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
492 |
* "root" of the calculation and routes to all of the other routers are |
|
493 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
494 |
* |
|
495 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
496 |
* having its routing tables set and is the root of the SPF tree. Each vertex |
|
497 |
* in the SPF tree can have a number of children that represent host or |
|
498 |
* network routes available via that vertex. |
|
499 |
* |
|
500 |
* This method the number of children of "this" SPFVertex (which reside in |
|
501 |
* the SPF tree. |
|
502 |
* |
|
503 |
* @see SPFVertex::GetNChildren |
|
504 |
* @param n The index (from 0 to the number of children minus 1) of the |
|
505 |
* child SPFVertex to return. |
|
506 |
* @warning The pointer returned by GetChild () is a borrowed pointer. You |
|
507 |
* do not have any ownership of the underlying object and must not delete |
|
508 |
* that object. |
|
509 |
* @returns A pointer to the specified child SPFVertex (which resides in the |
|
510 |
* SPF tree). |
|
511 |
*/ |
|
512 |
SPFVertex* GetChild (uint32_t n) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
513 |
|
1111 | 514 |
/** |
515 |
* @brief Get a borrowed SPFVertex pointer to the specified child of "this" |
|
516 |
* SPFVertex. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
517 |
* @internal |
1111 | 518 |
* |
519 |
* Each router node in the simulation is associated with an SPFVertex object. |
|
520 |
* When calculating routes, each of these routers is, in turn, chosen as the |
|
521 |
* "root" of the calculation and routes to all of the other routers are |
|
522 |
* eventually saved in the routing tables of each of the chosen nodes. |
|
523 |
* |
|
524 |
* The "Root" vertex is then the SPFVertex representing the router that is |
|
525 |
* having its routing tables set and is the root of the SPF tree. Each vertex |
|
526 |
* in the SPF tree can have a number of children that represent host or |
|
527 |
* network routes available via that vertex. |
|
528 |
* |
|
529 |
* This method the number of children of "this" SPFVertex (which reside in |
|
530 |
* the SPF tree. |
|
531 |
* |
|
532 |
* @see SPFVertex::GetNChildren |
|
533 |
* @warning Ownership of the pointer added to the children of "this" |
|
534 |
* SPFVertex is transferred to the "this" SPFVertex. You must not delete the |
|
535 |
* (now) child SPFVertex after calling this method. |
|
536 |
* @param child A pointer to the SPFVertex (which resides in the SPF tree) to |
|
537 |
* be added to the list of children of "this" SPFVertex. |
|
538 |
* @returns The number of children of "this" SPFVertex after the addition of |
|
539 |
* the new child. |
|
540 |
*/ |
|
541 |
uint32_t AddChild (SPFVertex* child); |
|
542 |
||
543 |
private: |
|
544 |
VertexType m_vertexType; |
|
545 |
Ipv4Address m_vertexId; |
|
546 |
GlobalRouterLSA* m_lsa; |
|
547 |
uint32_t m_distanceFromRoot; |
|
548 |
uint32_t m_rootOif; |
|
549 |
Ipv4Address m_nextHop; |
|
550 |
SPFVertex* m_parent; |
|
551 |
typedef std::list<SPFVertex*> ListOfSPFVertex_t; |
|
552 |
ListOfSPFVertex_t m_children; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
553 |
|
1111 | 554 |
/** |
555 |
* @brief The SPFVertex copy construction is disallowed. There's no need for |
|
556 |
* it and a compiler provided shallow copy would be wrong. |
|
557 |
*/ |
|
558 |
SPFVertex (SPFVertex& v); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
559 |
|
1111 | 560 |
/** |
561 |
* @brief The SPFVertex copy assignment operator is disallowed. There's no |
|
562 |
* need for it and a compiler provided shallow copy would be wrong. |
|
563 |
*/ |
|
564 |
SPFVertex& operator= (SPFVertex& v); |
|
565 |
}; |
|
566 |
||
567 |
/** |
|
568 |
* @brief The Link State DataBase (LSDB) of the Global Route Manager. |
|
569 |
* |
|
570 |
* Each node in the simulation participating in global routing has a |
|
571 |
* GlobalRouter interface. The primary job of this interface is to export |
|
572 |
* Global Router Link State Advertisements (LSAs). These advertisements in |
|
573 |
* turn contain a number of Global Router Link Records that describe the |
|
574 |
* point to point links from the underlying node to other nodes (that will |
|
575 |
* also export their own LSAs. |
|
576 |
* |
|
577 |
* This class implements a searchable database of LSAs gathered from every |
|
578 |
* router in the simulation. |
|
579 |
*/ |
|
580 |
class GlobalRouteManagerLSDB |
|
581 |
{ |
|
582 |
public: |
|
583 |
/** |
|
584 |
* @brief Construct an empty Global Router Manager Link State Database. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
585 |
* @internal |
1111 | 586 |
* |
587 |
* The database map composing the Link State Database is initialized in |
|
588 |
* this constructor. |
|
589 |
*/ |
|
590 |
GlobalRouteManagerLSDB (); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
591 |
|
1111 | 592 |
/** |
593 |
* @brief Destroy an empty Global Router Manager Link State Database. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
594 |
* @internal |
1111 | 595 |
* |
596 |
* The database map is walked and all of the Link State Advertisements stored |
|
597 |
* in the database are freed; then the database map itself is clear ()ed to |
|
598 |
* release any remaining resources. |
|
599 |
*/ |
|
600 |
~GlobalRouteManagerLSDB (); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
601 |
|
1111 | 602 |
/** |
603 |
* @brief Insert an IP address / Link State Advertisement pair into the Link |
|
604 |
* State Database. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
605 |
* @internal |
1111 | 606 |
* |
607 |
* The IPV4 address and the GlobalRouterLSA given as parameters are converted |
|
608 |
* to an STL pair and are inserted into the database map. |
|
609 |
* |
|
610 |
* @see GlobalRouterLSA |
|
611 |
* @see Ipv4Address |
|
612 |
* @param addr The IP address associated with the LSA. Typically the Router |
|
613 |
* ID. |
|
614 |
* @param lsa A pointer to the Link State Advertisement for the router. |
|
615 |
*/ |
|
616 |
void Insert(Ipv4Address addr, GlobalRouterLSA* lsa); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
617 |
|
1111 | 618 |
/** |
619 |
* @brief Look up the Link State Advertisement associated with the given |
|
620 |
* IP Address. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
621 |
* @internal |
1111 | 622 |
* |
623 |
* The database map is searched for the given IPV4 address and corresponding |
|
624 |
* GlobalRouterLSA is returned. |
|
625 |
* |
|
626 |
* @see GlobalRouterLSA |
|
627 |
* @see Ipv4Address |
|
628 |
* @param addr The IP address associated with the LSA. Typically the Router |
|
629 |
* ID. |
|
630 |
* @returns A pointer to the Link State Advertisement for the router specified |
|
631 |
* by the IP address addr. |
|
632 |
*/ |
|
633 |
GlobalRouterLSA* GetLSA (Ipv4Address addr) const; |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
634 |
|
1111 | 635 |
/** |
636 |
* @brief Set all LSA flags to an initialized state, for SPF computation |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
637 |
* @internal |
1111 | 638 |
* |
639 |
* This function walks the database and resets the status flags of all of the |
|
640 |
* contained Link State Advertisements to LSA_SPF_NOT_EXPLORED. This is done |
|
641 |
* prior to each SPF calculation to reset the state of the SPFVertex structures |
|
642 |
* that will reference the LSAs during the calculation. |
|
643 |
* |
|
644 |
* @see GlobalRouterLSA |
|
645 |
* @see SPFVertex |
|
646 |
*/ |
|
647 |
void Initialize (); |
|
648 |
||
649 |
private: |
|
650 |
typedef std::map<Ipv4Address, GlobalRouterLSA*> LSDBMap_t; |
|
651 |
typedef std::pair<Ipv4Address, GlobalRouterLSA*> LSDBPair_t; |
|
652 |
||
653 |
LSDBMap_t m_database; |
|
654 |
/** |
|
655 |
* @brief GlobalRouteManagerLSDB copy construction is disallowed. There's no |
|
656 |
* need for it and a compiler provided shallow copy would be wrong. |
|
657 |
*/ |
|
658 |
GlobalRouteManagerLSDB (GlobalRouteManagerLSDB& lsdb); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
659 |
|
1111 | 660 |
/** |
661 |
* @brief The SPFVertex copy assignment operator is disallowed. There's no |
|
662 |
* need for it and a compiler provided shallow copy would be wrong. |
|
663 |
*/ |
|
664 |
GlobalRouteManagerLSDB& operator= (GlobalRouteManagerLSDB& lsdb); |
|
665 |
}; |
|
666 |
||
667 |
/** |
|
668 |
* @brief A global router implementation. |
|
669 |
* |
|
670 |
* This singleton object can query interface each node in the system |
|
671 |
* for a GlobalRouter interface. For those nodes, it fetches one or |
|
672 |
* more Link State Advertisements and stores them in a local database. |
|
673 |
* Then, it can compute shortest paths on a per-node basis to all routers, |
|
674 |
* and finally configure each of the node's forwarding tables. |
|
675 |
* |
|
676 |
* The design is guided by OSPFv2 RFC 2328 section 16.1.1 and quagga ospfd. |
|
677 |
*/ |
|
678 |
class GlobalRouteManagerImpl |
|
679 |
{ |
|
680 |
public: |
|
681 |
GlobalRouteManagerImpl (); |
|
682 |
virtual ~GlobalRouteManagerImpl (); |
|
683 |
/** |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
684 |
* @brief Select which nodes in the system are to be router nodes and |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
685 |
* aggregate the appropriate interfaces onto those nodes. |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
686 |
* @internal |
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
687 |
* |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
688 |
*/ |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
689 |
virtual void SelectRouterNodes (); |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
690 |
|
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
691 |
/** |
1111 | 692 |
* @brief Build the routing database by gathering Link State Advertisements |
693 |
* from each node exporting a GlobalRouter interface. |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
694 |
* @internal |
1111 | 695 |
*/ |
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
696 |
virtual void BuildGlobalRoutingDatabase (); |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
697 |
|
1111 | 698 |
/** |
699 |
* @brief Compute routes using a Dijkstra SPF computation and populate |
|
700 |
* per-node forwarding tables |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
701 |
* @internal |
1111 | 702 |
*/ |
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
703 |
virtual void InitializeRoutes (); |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
704 |
|
1111 | 705 |
/** |
706 |
* @brief Debugging routine; allow client code to supply a pre-built LSDB |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
707 |
* @internal |
1111 | 708 |
*/ |
709 |
void DebugUseLsdb (GlobalRouteManagerLSDB*); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
710 |
|
1111 | 711 |
/** |
712 |
* @brief Debugging routine; call the core SPF from the unit tests |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1113
diff
changeset
|
713 |
* @internal |
1111 | 714 |
*/ |
715 |
void DebugSPFCalculate (Ipv4Address root); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
716 |
|
1111 | 717 |
private: |
718 |
/** |
|
719 |
* @brief GlobalRouteManagerImpl copy construction is disallowed. |
|
720 |
* There's no need for it and a compiler provided shallow copy would be |
|
721 |
* wrong. |
|
722 |
*/ |
|
723 |
GlobalRouteManagerImpl (GlobalRouteManagerImpl& srmi); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
724 |
|
1111 | 725 |
/** |
726 |
* @brief Global Route Manager Implementation assignment operator is |
|
727 |
* disallowed. There's no need for it and a compiler provided shallow copy |
|
728 |
* would be hopelessly wrong. |
|
729 |
*/ |
|
730 |
GlobalRouteManagerImpl& operator= (GlobalRouteManagerImpl& srmi); |
|
731 |
||
732 |
SPFVertex* m_spfroot; |
|
733 |
GlobalRouteManagerLSDB* m_lsdb; |
|
734 |
void SPFCalculate (Ipv4Address root); |
|
735 |
void SPFNext (SPFVertex*, CandidateQueue&); |
|
736 |
int SPFNexthopCalculation (SPFVertex* v, SPFVertex* w, |
|
737 |
GlobalRouterLinkRecord* l, uint32_t distance); |
|
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
738 |
void SPFVertexAddParent (SPFVertex* v); |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
739 |
GlobalRouterLinkRecord* SPFGetNextLink (SPFVertex* v, SPFVertex* w, |
1111 | 740 |
GlobalRouterLinkRecord* prev_link); |
1113
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
741 |
void SPFIntraAddRouter (SPFVertex* v); |
5b63b39161e7
remove routing environment, move router interface creation to global-route-manager
Craig Dowell <craigdo@ee.washington.edu>
parents:
1112
diff
changeset
|
742 |
uint32_t FindOutgoingInterfaceId (Ipv4Address a); |
1111 | 743 |
}; |
744 |
||
745 |
} // namespace ns3 |
|
746 |
||
747 |
#endif /* GLOBAL_ROUTE_MANAGER_IMPL_H */ |