author | Tom Henderson <tomh@tomh.org> |
Mon, 20 Dec 2010 16:34:59 -0800 | |
changeset 6701 | a590022a1536 |
parent 6648 | d1785ce489c5 |
permissions | -rw-r--r-- |
3962 | 1 |
// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- |
2 |
// |
|
3 |
// Copyright (c) 2008 University of Washington |
|
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 |
// |
|
19 |
||
20 |
#ifndef IPV4_GLOBAL_ROUTING_H |
|
21 |
#define IPV4_GLOBAL_ROUTING_H |
|
22 |
||
23 |
#include <list> |
|
24 |
#include <stdint.h> |
|
25 |
#include "ns3/ipv4-address.h" |
|
26 |
#include "ns3/ipv4-header.h" |
|
27 |
#include "ns3/ptr.h" |
|
28 |
#include "ns3/ipv4.h" |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
29 |
#include "ns3/ipv4-routing-protocol.h" |
5858
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5856
diff
changeset
|
30 |
#include "ns3/random-variable.h" |
3962 | 31 |
|
32 |
namespace ns3 { |
|
33 |
||
34 |
class Packet; |
|
35 |
class NetDevice; |
|
36 |
class Ipv4Interface; |
|
37 |
class Ipv4Address; |
|
38 |
class Ipv4Header; |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
39 |
class Ipv4RoutingTableEntry; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
40 |
class Ipv4MulticastRoutingTableEntry; |
3962 | 41 |
class Node; |
42 |
||
43 |
||
44 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
45 |
* \brief Global routing protocol for IP version 4 stacks. |
3962 | 46 |
* |
47 |
* In ns-3 we have the concept of a pluggable routing protocol. Routing |
|
48 |
* protocols are added to a list maintained by the Ipv4L3Protocol. Every |
|
49 |
* stack gets one routing protocol for free -- the Ipv4StaticRouting routing |
|
50 |
* protocol is added in the constructor of the Ipv4L3Protocol (this is the |
|
51 |
* piece of code that implements the functionality of the IP layer). |
|
52 |
* |
|
53 |
* As an option to running a dynamic routing protocol, a GlobalRouteManager |
|
54 |
* object has been created to allow users to build routes for all participating |
|
55 |
* nodes. One can think of this object as a "routing oracle"; it has |
|
56 |
* an omniscient view of the topology, and can construct shortest path |
|
57 |
* routes between all pairs of nodes. These routes must be stored |
|
58 |
* somewhere in the node, so therefore this class Ipv4GlobalRouting |
|
59 |
* is used as one of the pluggable routing protocols. It is kept distinct |
|
60 |
* from Ipv4StaticRouting because these routes may be dynamically cleared |
|
61 |
* and rebuilt in the middle of the simulation, while manually entered |
|
62 |
* routes into the Ipv4StaticRouting may need to be kept distinct. |
|
63 |
* |
|
64 |
* This class deals with Ipv4 unicast routes only. |
|
65 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
66 |
* \see Ipv4RoutingProtocol |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
67 |
* \see GlobalRouteManager |
3962 | 68 |
*/ |
69 |
class Ipv4GlobalRouting : public Ipv4RoutingProtocol |
|
70 |
{ |
|
71 |
public: |
|
72 |
static TypeId GetTypeId (void); |
|
73 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
74 |
* \brief Construct an empty Ipv4GlobalRouting routing protocol, |
3962 | 75 |
* |
76 |
* The Ipv4GlobalRouting class supports host and network unicast routes. |
|
77 |
* This method initializes the lists containing these routes to empty. |
|
78 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
79 |
* \see Ipv4GlobalRouting |
3962 | 80 |
*/ |
81 |
Ipv4GlobalRouting (); |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
82 |
virtual ~Ipv4GlobalRouting (); |
3962 | 83 |
|
6317
e4a750adf12c
bug 702: make global routing robust to link/device events
Tom Henderson <tomh@tomh.org>
parents:
6273
diff
changeset
|
84 |
// These methods inherited from base class |
5856
7fd20c798a7d
bug 742: Implementation of SO_BINDTODEVICE
Antti Mäkelä <zarhan@cc.hut.fi>
parents:
4745
diff
changeset
|
85 |
virtual Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
86 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
87 |
virtual bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev, |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
88 |
UnicastForwardCallback ucb, MulticastForwardCallback mcb, |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
89 |
LocalDeliverCallback lcb, ErrorCallback ecb); |
4560
2f106fd728ab
Remove static routing dependencies in code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4527
diff
changeset
|
90 |
virtual void NotifyInterfaceUp (uint32_t interface); |
2f106fd728ab
Remove static routing dependencies in code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4527
diff
changeset
|
91 |
virtual void NotifyInterfaceDown (uint32_t interface); |
2f106fd728ab
Remove static routing dependencies in code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4527
diff
changeset
|
92 |
virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); |
2f106fd728ab
Remove static routing dependencies in code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4527
diff
changeset
|
93 |
virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); |
2f106fd728ab
Remove static routing dependencies in code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4527
diff
changeset
|
94 |
virtual void SetIpv4 (Ptr<Ipv4> ipv4); |
6701
a590022a1536
[bug 947] Pretty-print IPv4 routing tables (patch originated by Hemanth Narra)
Tom Henderson <tomh@tomh.org>
parents:
6648
diff
changeset
|
95 |
virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const; |
3962 | 96 |
|
97 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
98 |
* \brief Add a host route to the global routing table. |
3962 | 99 |
* |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
100 |
* \param dest The Ipv4Address destination for this route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
101 |
* \param nextHop The Ipv4Address of the next hop in the route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
102 |
* \param interface The network interface index used to send packets to the |
3962 | 103 |
* destination. |
104 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
105 |
* \see Ipv4Address |
3962 | 106 |
*/ |
107 |
void AddHostRouteTo (Ipv4Address dest, |
|
108 |
Ipv4Address nextHop, |
|
109 |
uint32_t interface); |
|
110 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
111 |
* \brief Add a host route to the global routing table. |
3962 | 112 |
* |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
113 |
* \param dest The Ipv4Address destination for this route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
114 |
* \param interface The network interface index used to send packets to the |
3962 | 115 |
* destination. |
116 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
117 |
* \see Ipv4Address |
3962 | 118 |
*/ |
119 |
void AddHostRouteTo (Ipv4Address dest, |
|
120 |
uint32_t interface); |
|
121 |
||
122 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
123 |
* \brief Add a network route to the global routing table. |
3962 | 124 |
* |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
125 |
* \param network The Ipv4Address network for this route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
126 |
* \param networkMask The Ipv4Mask to extract the network. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
127 |
* \param nextHop The next hop in the route to the destination network. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
128 |
* \param interface The network interface index used to send packets to the |
3962 | 129 |
* destination. |
130 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
131 |
* \see Ipv4Address |
3962 | 132 |
*/ |
133 |
void AddNetworkRouteTo (Ipv4Address network, |
|
134 |
Ipv4Mask networkMask, |
|
135 |
Ipv4Address nextHop, |
|
136 |
uint32_t interface); |
|
137 |
||
138 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
139 |
* \brief Add a network route to the global routing table. |
3962 | 140 |
* |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
141 |
* \param network The Ipv4Address network for this route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
142 |
* \param networkMask The Ipv4Mask to extract the network. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
143 |
* \param interface The network interface index used to send packets to the |
3962 | 144 |
* destination. |
145 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
146 |
* \see Ipv4Address |
3962 | 147 |
*/ |
148 |
void AddNetworkRouteTo (Ipv4Address network, |
|
149 |
Ipv4Mask networkMask, |
|
150 |
uint32_t interface); |
|
151 |
||
152 |
/** |
|
4745
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
153 |
* \brief Add an external route to the global routing table. |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
154 |
* |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
155 |
* \param network The Ipv4Address network for this route. |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
156 |
* \param networkMask The Ipv4Mask to extract the network. |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
157 |
* \param nextHop The next hop Ipv4Address |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
158 |
* \param interface The network interface index used to send packets to the |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
159 |
* destination. |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
160 |
*/ |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
161 |
void AddASExternalRouteTo (Ipv4Address network, |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
162 |
Ipv4Mask networkMask, |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
163 |
Ipv4Address nextHop, |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
164 |
uint32_t interface); |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
165 |
|
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
166 |
/** |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
167 |
* \brief Get the number of individual unicast routes that have been added |
3962 | 168 |
* to the routing table. |
169 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
170 |
* \warning The default route counts as one of the routes. |
3962 | 171 |
*/ |
6701
a590022a1536
[bug 947] Pretty-print IPv4 routing tables (patch originated by Hemanth Narra)
Tom Henderson <tomh@tomh.org>
parents:
6648
diff
changeset
|
172 |
uint32_t GetNRoutes (void) const; |
3962 | 173 |
|
174 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
175 |
* \brief Get a route from the global unicast routing table. |
3962 | 176 |
* |
177 |
* Externally, the unicast global routing table appears simply as a table with |
|
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
5858
diff
changeset
|
178 |
* n entries. The one subtlety of note is that if a default route has been set |
3962 | 179 |
* it will appear as the zeroth entry in the table. This means that if you |
180 |
* add only a default route, the table will have one entry that can be accessed |
|
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
5858
diff
changeset
|
181 |
* either by explicitly calling GetDefaultRoute () or by calling GetRoute (0). |
3962 | 182 |
* |
183 |
* Similarly, if the default route has been set, calling RemoveRoute (0) will |
|
184 |
* remove the default route. |
|
185 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
186 |
* \param i The index (into the routing table) of the route to retrieve. If |
3962 | 187 |
* the default route has been set, it will occupy index zero. |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
188 |
* \return If route is set, a pointer to that Ipv4RoutingTableEntry is returned, otherwise |
3962 | 189 |
* a zero pointer is returned. |
190 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
191 |
* \see Ipv4RoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
192 |
* \see Ipv4GlobalRouting::RemoveRoute |
3962 | 193 |
*/ |
6701
a590022a1536
[bug 947] Pretty-print IPv4 routing tables (patch originated by Hemanth Narra)
Tom Henderson <tomh@tomh.org>
parents:
6648
diff
changeset
|
194 |
Ipv4RoutingTableEntry *GetRoute (uint32_t i) const; |
3962 | 195 |
|
196 |
/** |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
197 |
* \brief Remove a route from the global unicast routing table. |
3962 | 198 |
* |
199 |
* Externally, the unicast global routing table appears simply as a table with |
|
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
5858
diff
changeset
|
200 |
* n entries. The one subtlety of note is that if a default route has been set |
3962 | 201 |
* it will appear as the zeroth entry in the table. This means that if the |
202 |
* default route has been set, calling RemoveRoute (0) will remove the |
|
203 |
* default route. |
|
204 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
205 |
* \param i The index (into the routing table) of the route to remove. If |
3962 | 206 |
* the default route has been set, it will occupy index zero. |
207 |
* |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
208 |
* \see Ipv4RoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
209 |
* \see Ipv4GlobalRouting::GetRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
210 |
* \see Ipv4GlobalRouting::AddRoute |
3962 | 211 |
*/ |
212 |
void RemoveRoute (uint32_t i); |
|
213 |
||
214 |
protected: |
|
215 |
void DoDispose (void); |
|
216 |
||
217 |
private: |
|
5858
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5856
diff
changeset
|
218 |
/// Set to true if packets are randomly routed among ECMP; set to false for using only one route consistently |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5856
diff
changeset
|
219 |
bool m_randomEcmpRouting; |
6317
e4a750adf12c
bug 702: make global routing robust to link/device events
Tom Henderson <tomh@tomh.org>
parents:
6273
diff
changeset
|
220 |
/// Set to true if this interface should respond to interface events by globallly recomputing routes |
e4a750adf12c
bug 702: make global routing robust to link/device events
Tom Henderson <tomh@tomh.org>
parents:
6273
diff
changeset
|
221 |
bool m_respondToInterfaceEvents; |
5858
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5856
diff
changeset
|
222 |
/// A uniform random number generator for randomly routing packets among ECMP |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5856
diff
changeset
|
223 |
UniformVariable m_rand; |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5856
diff
changeset
|
224 |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
225 |
typedef std::list<Ipv4RoutingTableEntry *> HostRoutes; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
226 |
typedef std::list<Ipv4RoutingTableEntry *>::const_iterator HostRoutesCI; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
227 |
typedef std::list<Ipv4RoutingTableEntry *>::iterator HostRoutesI; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
228 |
typedef std::list<Ipv4RoutingTableEntry *> NetworkRoutes; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
229 |
typedef std::list<Ipv4RoutingTableEntry *>::const_iterator NetworkRoutesCI; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
230 |
typedef std::list<Ipv4RoutingTableEntry *>::iterator NetworkRoutesI; |
4745
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
231 |
typedef std::list<Ipv4RoutingTableEntry *> ASExternalRoutes; |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
232 |
typedef std::list<Ipv4RoutingTableEntry *>::const_iterator ASExternalRoutesCI; |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
233 |
typedef std::list<Ipv4RoutingTableEntry *>::iterator ASExternalRoutesI; |
3962 | 234 |
|
5856
7fd20c798a7d
bug 742: Implementation of SO_BINDTODEVICE
Antti Mäkelä <zarhan@cc.hut.fi>
parents:
4745
diff
changeset
|
235 |
Ptr<Ipv4Route> LookupGlobal (Ipv4Address dest, Ptr<NetDevice> oif = 0); |
3962 | 236 |
|
237 |
HostRoutes m_hostRoutes; |
|
238 |
NetworkRoutes m_networkRoutes; |
|
4745
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
239 |
ASExternalRoutes m_ASexternalRoutes; // External routes imported |
a0e27af57c8d
Allow injection of routes to Ipv4GlobalRouting
Antti Makela <zarhan@cc.hut.fi>
parents:
4603
diff
changeset
|
240 |
|
4560
2f106fd728ab
Remove static routing dependencies in code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4527
diff
changeset
|
241 |
Ptr<Ipv4> m_ipv4; |
3962 | 242 |
}; |
243 |
||
244 |
} // Namespace ns3 |
|
245 |
||
246 |
#endif /* IPV4_GLOBAL_ROUTING_H */ |