author | Antti Makela <zarhan@cc.hut.fi> |
Mon, 31 Aug 2009 23:35:16 -0700 | |
changeset 4747 | 3dc675bb8b20 |
parent 4674 | 6dc56539a891 |
child 4757 | 1b7c28a1c131 |
permissions | -rw-r--r-- |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
2 |
/* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
3 |
* Copyright (c) 2006 Georgia Tech Research Corporation |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
4 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
8 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
13 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
17 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
18 |
* Author: George F. Riley<riley@ece.gatech.edu> |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
19 |
* Gustavo Carneiro <gjc@inescporto.pt> |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
20 |
*/ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
21 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
22 |
#ifndef IPV4_STATIC_ROUTING_H |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
23 |
#define IPV4_STATIC_ROUTING_H |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
24 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
25 |
#include <list> |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
26 |
#include <utility> |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
27 |
#include <stdint.h> |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
28 |
#include "ns3/ipv4-address.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
29 |
#include "ns3/ipv4-header.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
30 |
#include "ns3/socket.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
31 |
#include "ns3/ptr.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
32 |
#include "ns3/ipv4.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
33 |
#include "ns3/ipv4-routing-protocol.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
34 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
35 |
namespace ns3 { |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
36 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
37 |
class Packet; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
38 |
class NetDevice; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
39 |
class Ipv4Interface; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
40 |
class Ipv4Address; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
41 |
class Ipv4Header; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
42 |
class Ipv4RoutingTableEntry; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
43 |
class Ipv4MulticastRoutingTableEntry; |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
44 |
class Node; |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
45 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
46 |
/** |
4673 | 47 |
* \ingroup routing |
4674 | 48 |
* \defgroup ipv4StaticRouting Ipv4StaticRouting |
49 |
*/ |
|
50 |
/** |
|
51 |
* \ingroup ipv4StaticRouting |
|
4482 | 52 |
* |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
53 |
* \brief Static routing protocol for IP version 4 stacks. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
54 |
* |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
55 |
* This class provides a basic set of methods for inserting static |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
56 |
* unicast and multicast routes into the Ipv4 routing system. |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
57 |
* This particular protocol is designed to be inserted into an |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
58 |
* Ipv4ListRouting protocol and at present cannot be inserted as the |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
59 |
* only routing protocol into Ipv4 (i.e. it must be added to an |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
60 |
* Ipv4ListRouting). |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
61 |
* |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
62 |
* The Ipv4StaticRouting class inherits from the abstract base class |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
63 |
* Ipv4RoutingProtocol that defines the interface methods that a routing |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
64 |
* protocol must support. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
65 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
66 |
* \see Ipv4RoutingProtocol |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
67 |
* \see Ipv4ListRouting |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
68 |
* \see Ipv4ListRouting::AddRoutingProtocol |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
69 |
*/ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
70 |
class Ipv4StaticRouting : public Ipv4RoutingProtocol |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
71 |
{ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
72 |
public: |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
73 |
static TypeId GetTypeId (void); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
74 |
|
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
75 |
Ipv4StaticRouting (); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
76 |
virtual ~Ipv4StaticRouting (); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
77 |
|
4603
67a0a49c1db4
bug 592: Ipv4RoutingProtocol::RouteOutput needs a packet pointer argument for reactive protocols
Josh Pelkey <joshpelkey@gmail.com>
parents:
4573
diff
changeset
|
78 |
virtual Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, uint32_t oif, Socket::SocketErrno &sockerr); |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
79 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
80 |
virtual bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev, |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
81 |
UnicastForwardCallback ucb, MulticastForwardCallback mcb, |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
82 |
LocalDeliverCallback lcb, ErrorCallback ecb); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
83 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
84 |
virtual void NotifyInterfaceUp (uint32_t interface); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
85 |
virtual void NotifyInterfaceDown (uint32_t interface); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
86 |
virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
87 |
virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
88 |
virtual void SetIpv4 (Ptr<Ipv4> ipv4); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
89 |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
90 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
91 |
* \brief Add a network route to the static routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
92 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
93 |
* \param network The Ipv4Address network for this route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
94 |
* \param networkMask The Ipv4Mask to extract the network. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
95 |
* \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:
diff
changeset
|
96 |
* \param interface The network interface index used to send packets to the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
97 |
* destination. |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
98 |
* \param metric Metric of route in case of multiple routes to same destination |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
99 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
100 |
* \see Ipv4Address |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
101 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
102 |
void AddNetworkRouteTo (Ipv4Address network, |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
103 |
Ipv4Mask networkMask, |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
104 |
Ipv4Address nextHop, |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
105 |
uint32_t interface, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
106 |
uint32_t metric = 0); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
107 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
108 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
109 |
* \brief Add a network route to the static routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
110 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
111 |
* \param network The Ipv4Address network for this route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
112 |
* \param networkMask The Ipv4Mask to extract the network. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
113 |
* \param interface The network interface index used to send packets to the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
114 |
* destination. |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
115 |
* \param metric Metric of route in case of multiple routes to same destination |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
116 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
117 |
* \see Ipv4Address |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
118 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
119 |
void AddNetworkRouteTo (Ipv4Address network, |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
120 |
Ipv4Mask networkMask, |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
121 |
uint32_t interface, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
122 |
uint32_t metric = 0); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
123 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
124 |
/** |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
125 |
* \brief Add a host route to the static routing table. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
126 |
* |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
127 |
* \param dest The Ipv4Address destination for this route. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
128 |
* \param nextHop The Ipv4Address of the next hop in the route. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
129 |
* \param interface The network interface index used to send packets to the |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
130 |
* destination. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
131 |
* \param metric Metric of route in case of multiple routes to same destination |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
132 |
* |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
133 |
* \see Ipv4Address |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
134 |
*/ |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
135 |
void AddHostRouteTo (Ipv4Address dest, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
136 |
Ipv4Address nextHop, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
137 |
uint32_t interface, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
138 |
uint32_t metric = 0); |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
139 |
/** |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
140 |
* \brief Add a host route to the static routing table. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
141 |
* |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
142 |
* \param dest The Ipv4Address destination for this route. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
143 |
* \param interface The network interface index used to send packets to the |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
144 |
* destination. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
145 |
* \param metric Metric of route in case of multiple routes to same destination |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
146 |
* |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
147 |
* \see Ipv4Address |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
148 |
*/ |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
149 |
void AddHostRouteTo (Ipv4Address dest, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
150 |
uint32_t interface, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
151 |
uint32_t metric = 0); |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
152 |
/** |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
153 |
* \brief Add a default route to the static routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
154 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
155 |
* This method tells the routing system what to do in the case where a specific |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
156 |
* route to a destination is not found. The system forwards packets to the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
157 |
* specified node in the hope that it knows better how to route the packet. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
158 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
159 |
* If the default route is set, it is returned as the selected route from |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
160 |
* LookupStatic irrespective of destination address if no specific route is |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
161 |
* found. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
162 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
163 |
* \param nextHop The Ipv4Address to send packets to in the hope that they |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
164 |
* will be forwarded correctly. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
165 |
* \param interface The network interface index used to send packets. |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
166 |
* \param metric Metric of route in case of multiple routes to same destination |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
167 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
168 |
* \see Ipv4Address |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
169 |
* \see Ipv4StaticRouting::Lookup |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
170 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
171 |
void SetDefaultRoute (Ipv4Address nextHop, |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
172 |
uint32_t interface, |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
173 |
uint32_t metric = 0); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
174 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
175 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
176 |
* \brief Get the number of individual unicast routes that have been added |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
177 |
* to the routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
178 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
179 |
* \warning The default route counts as one of the routes. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
180 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
181 |
uint32_t GetNRoutes (void); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
182 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
183 |
/** |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
184 |
* \brief Get the default route with lowest metric from the static routing table. |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
185 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
186 |
* \return If the default route is set, a pointer to that Ipv4RoutingTableEntry is |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
187 |
* returned, otherwise an empty routing table entry is returned. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
188 |
* If multiple default routes exist, the one with lowest metric is returned. |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
189 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
190 |
* \see Ipv4RoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
191 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
192 |
Ipv4RoutingTableEntry GetDefaultRoute (void); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
193 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
194 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
195 |
* \brief Get a route from the static unicast routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
196 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
197 |
* Externally, the unicast static routing table appears simply as a table with |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
198 |
* n entries. |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
199 |
* |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
200 |
* \param i The index (into the routing table) of the route to retrieve. |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
201 |
* \return If route is set, a pointer to that Ipv4RoutingTableEntry is returned, otherwise |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
202 |
* a zero pointer is returned. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
203 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
204 |
* \see Ipv4RoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
205 |
* \see Ipv4StaticRouting::RemoveRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
206 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
207 |
Ipv4RoutingTableEntry GetRoute (uint32_t i); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
208 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
209 |
/** |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
210 |
* \brief Get a metric for route from the static unicast routing table. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
211 |
* |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
212 |
* \param i The index (into the routing table) of the route to retrieve. |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
213 |
* \return If route is set, the metric is returned. If not, an infinity metric (0xffffffff) is returned |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
214 |
* |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
215 |
*/ |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
216 |
uint32_t GetMetric (uint32_t index); |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
217 |
|
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
218 |
/** |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
219 |
* \brief Remove a route from the static unicast routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
220 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
221 |
* Externally, the unicast static routing table appears simply as a table with |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
222 |
* n entries. |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
223 |
* |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
224 |
* \param i The index (into the routing table) of the route to remove. |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
225 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
226 |
* \see Ipv4RoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
227 |
* \see Ipv4StaticRouting::GetRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
228 |
* \see Ipv4StaticRouting::AddRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
229 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
230 |
void RemoveRoute (uint32_t i); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
231 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
232 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
233 |
* \brief Add a multicast route to the static routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
234 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
235 |
* A multicast route must specify an origin IP address, a multicast group and |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
236 |
* an input network interface index as conditions and provide a vector of |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
237 |
* output network interface indices over which packets matching the conditions |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
238 |
* are sent. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
239 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
240 |
* Typically there are two main types of multicast routes: routes of the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
241 |
* first kind are used during forwarding. All of the conditions must be |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
242 |
* exlicitly provided. The second kind of routes are used to get packets off |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
243 |
* of a local node. The difference is in the input interface. Routes for |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
244 |
* forwarding will always have an explicit input interface specified. Routes |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
245 |
* off of a node will always set the input interface to a wildcard specified |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
246 |
* by the index Ipv4RoutingProtocol::INTERFACE_ANY. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
247 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
248 |
* For routes off of a local node wildcards may be used in the origin and |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
249 |
* multicast group addresses. The wildcard used for Ipv4Adresses is that |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
250 |
* address returned by Ipv4Address::GetAny () -- typically "0.0.0.0". Usage |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
251 |
* of a wildcard allows one to specify default behavior to varying degrees. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
252 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
253 |
* For example, making the origin address a wildcard, but leaving the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
254 |
* multicast group specific allows one (in the case of a node with multiple |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
255 |
* interfaces) to create different routes using different output interfaces |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
256 |
* for each multicast group. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
257 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
258 |
* If the origin and multicast addresses are made wildcards, you have created |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
259 |
* essentially a default multicast address that can forward to multiple |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
260 |
* interfaces. Compare this to the actual default multicast address that is |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
261 |
* limited to specifying a single output interface for compatibility with |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
262 |
* existing functionality in other systems. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
263 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
264 |
* \param origin The Ipv4Address of the origin of packets for this route. May |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
265 |
* be Ipv4Address:GetAny for open groups. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
266 |
* \param group The Ipv4Address of the multicast group or this route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
267 |
* \param inputInterface The input network interface index over which to |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
268 |
* expect packets destined for this route. May be |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
269 |
* Ipv4RoutingProtocol::INTERFACE_ANY for packets of local origin. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
270 |
* \param outputInterfaces A vector of network interface indices used to specify |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
271 |
* how to send packets to the destination(s). |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
272 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
273 |
* \see Ipv4Address |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
274 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
275 |
void AddMulticastRoute (Ipv4Address origin, |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
276 |
Ipv4Address group, |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
277 |
uint32_t inputInterface, |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
278 |
std::vector<uint32_t> outputInterfaces); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
279 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
280 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
281 |
* \brief Add a default multicast route to the static routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
282 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
283 |
* This is the multicast equivalent of the unicast version SetDefaultRoute. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
284 |
* We tell the routing system what to do in the case where a specific route |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
285 |
* to a destination multicast group is not found. The system forwards |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
286 |
* packets out the specified interface in the hope that "something out there" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
287 |
* knows better how to route the packet. This method is only used in |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
288 |
* initially sending packets off of a host. The default multicast route is |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
289 |
* not consulted during forwarding -- exact routes must be specified using |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
290 |
* AddMulticastRoute for that case. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
291 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
292 |
* Since we're basically sending packets to some entity we think may know |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
293 |
* better what to do, we don't pay attention to "subtleties" like origin |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
294 |
* address, nor do we worry about forwarding out multiple interfaces. If the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
295 |
* default multicast route is set, it is returned as the selected route from |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
296 |
* LookupStatic irrespective of origin or multicast group if another specific |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
297 |
* route is not found. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
298 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
299 |
* \param outputInterface The network interface index used to specify where |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
300 |
* to send packets in the case of unknown routes. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
301 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
302 |
* \see Ipv4Address |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
303 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
304 |
void SetDefaultMulticastRoute (uint32_t outputInterface); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
305 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
306 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
307 |
* \brief Get the number of individual multicast routes that have been added |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
308 |
* to the routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
309 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
310 |
* \warning The default multicast route counts as one of the routes. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
311 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
312 |
uint32_t GetNMulticastRoutes (void) const; |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
313 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
314 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
315 |
* \brief Get a route from the static multicast routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
316 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
317 |
* Externally, the multicast static routing table appears simply as a table |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
318 |
* with n entries. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
319 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
320 |
* \param i The index (into the routing table) of the multicast route to |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
321 |
* retrieve. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
322 |
* \return If route \e i is set, a pointer to that Ipv4MulticastRoutingTableEntry is |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
323 |
* returned, otherwise a zero pointer is returned. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
324 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
325 |
* \see Ipv4MulticastRoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
326 |
* \see Ipv4StaticRouting::RemoveRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
327 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
328 |
Ipv4MulticastRoutingTableEntry GetMulticastRoute (uint32_t i) const; |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
329 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
330 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
331 |
* \brief Remove a route from the static multicast routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
332 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
333 |
* Externally, the multicast static routing table appears simply as a table |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
334 |
* with n entries. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
335 |
* This method causes the multicast routing table to be searched for the first |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
336 |
* route that matches the parameters and removes it. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
337 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
338 |
* Wildcards may be provided to this function, but the wildcards are used to |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
339 |
* exacly match wildcards in the routes (see AddMulticastRoute). That is, |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
340 |
* calling RemoveMulticastRoute with the origin set to "0.0.0.0" will not |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
341 |
* remove routes with any address in the origin, but will only remove routes |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
342 |
* with "0.0.0.0" set as the the origin. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
343 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
344 |
* \param origin The IP address specified as the origin of packets for the |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
345 |
* route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
346 |
* \param group The IP address specified as the multicast group addres of |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
347 |
* the route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
348 |
* \param inputInterface The network interface index specified as the expected |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
349 |
* input interface for the route. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
350 |
* \returns true if a route was found and removed, false otherwise. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
351 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
352 |
* \see Ipv4MulticastRoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
353 |
* \see Ipv4StaticRouting::AddMulticastRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
354 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
355 |
bool RemoveMulticastRoute (Ipv4Address origin, |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
356 |
Ipv4Address group, |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
357 |
uint32_t inputInterface); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
358 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
359 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
360 |
* \brief Remove a route from the static multicast routing table. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
361 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
362 |
* Externally, the multicast static routing table appears simply as a table |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
363 |
* with n entries. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
364 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
365 |
* \param index The index (into the multicast routing table) of the route to |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
366 |
* remove. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
367 |
* |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
368 |
* \see Ipv4RoutingTableEntry |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
369 |
* \see Ipv4StaticRouting::GetRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
370 |
* \see Ipv4StaticRouting::AddRoute |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
371 |
*/ |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
372 |
void RemoveMulticastRoute (uint32_t index); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
373 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
374 |
protected: |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
375 |
virtual void DoDispose (void); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
376 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
377 |
private: |
4747
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
378 |
typedef std::list<std::pair <Ipv4RoutingTableEntry *, uint32_t> > NetworkRoutes; |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
379 |
typedef std::list<std::pair <Ipv4RoutingTableEntry *, uint32_t> >::const_iterator NetworkRoutesCI; |
3dc675bb8b20
Static routing with support for metrics and longest prefix match
Antti Makela <zarhan@cc.hut.fi>
parents:
4674
diff
changeset
|
380 |
typedef std::list<std::pair <Ipv4RoutingTableEntry *, uint32_t> >::iterator NetworkRoutesI; |
4573
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
381 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
382 |
typedef std::list<Ipv4MulticastRoutingTableEntry *> MulticastRoutes; |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
383 |
typedef std::list<Ipv4MulticastRoutingTableEntry *>::const_iterator MulticastRoutesCI; |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
384 |
typedef std::list<Ipv4MulticastRoutingTableEntry *>::iterator MulticastRoutesI; |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
385 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
386 |
Ptr<Ipv4Route> LookupStatic (Ipv4Address dest); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
387 |
Ptr<Ipv4MulticastRoute> LookupStatic (Ipv4Address origin, Ipv4Address group, |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
388 |
uint32_t interface); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
389 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
390 |
Ipv4Address SourceAddressSelection (uint32_t interface, Ipv4Address dest); |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
391 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
392 |
NetworkRoutes m_networkRoutes; |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
393 |
MulticastRoutes m_multicastRoutes; |
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
394 |
|
01e876191f2e
move list routing and static routing to src/routing directories
Tom Henderson <tomh@tomh.org>
parents:
4560
diff
changeset
|
395 |
Ptr<Ipv4> m_ipv4; |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
396 |
}; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
397 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
398 |
} // Namespace ns3 |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
399 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
400 |
#endif /* IPV4_STATIC_ROUTING_H */ |