author | Tom Henderson <tomh@tomh.org> |
Sun, 12 Apr 2009 22:40:31 -0700 | |
changeset 4377 | 2a05a47dba22 |
parent 4375 | db81fdcb06e7 |
child 4472 | e20a31541404 |
permissions | -rw-r--r-- |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
2 |
/* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
3 |
* Copyright (c) 2007 INRIA |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
4 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
*/ |
752
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
751
diff
changeset
|
20 |
#ifndef IPV4_H |
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
751
diff
changeset
|
21 |
#define IPV4_H |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
|
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
#include <stdint.h> |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
#include "ns3/ipv4-address.h" |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
25 |
#include "ns3/ipv4-interface-address.h" |
710
2a9c061219a7
port code from Interface to Object
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
638
diff
changeset
|
26 |
#include "ns3/object.h" |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
27 |
#include "ns3/callback.h" |
757 | 28 |
#include "ipv4-route.h" |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
29 |
|
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
namespace ns3 { |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
|
1316
f357c6a2bb37
Provide two new Ipv4 convenience functions: GetIfIndexByIpv4Address() and GetIpv4RouteToDestination (), and align global routing code to use the first function
Tom Henderson <tomh@tomh.org>
parents:
1308
diff
changeset
|
32 |
class Node; |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
33 |
class NetDevice; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
class Packet; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
35 |
class Ipv4Route; |
3216
b36bb98d766e
bug 207: ipv4-header.h needed in src/node module.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3183
diff
changeset
|
36 |
class Ipv4Header; |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
37 |
|
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
38 |
/** |
3183 | 39 |
* \ingroup node |
40 |
* \defgroup ipv4 Ipv4 |
|
41 |
*/ |
|
42 |
||
43 |
/** |
|
44 |
* \ingroup ipv4 |
|
45 |
* |
|
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
46 |
* \brief Base class for IPv4 routing protocols. |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
47 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
48 |
* This class represents the interface between the IPv4 routing core |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
49 |
* and a specific IPv4 routing protocol. The interface is |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
50 |
* asynchronous (callback based) in order to support reactive routing |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
51 |
* protocols (e.g. AODV). |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
52 |
*/ |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
53 |
class Ipv4RoutingProtocol : public Object |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
54 |
{ |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
55 |
public: |
1308
5c5937a4150d
backout 9856d1175cbb:642d6798feaa:27dd3e15308a
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1303
diff
changeset
|
56 |
// void (*RouteReply) (bool found, Ipv4Route route, Packet packet, Ipv4Header const &ipHeader); |
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
57 |
|
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
58 |
|
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
59 |
/** |
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
60 |
* \brief Callback to be invoked when route discovery is completed |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
61 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
62 |
* \param bool flag indicating whether a route was actually found; |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
63 |
* when this is false, the Ipv4Route parameter is ignored |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
64 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
65 |
* \param Ipv4Route the route found |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
66 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
67 |
* \param Packet the packet for which a route was requested; can be |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
68 |
* modified by the routing protocol |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
69 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
70 |
* \param Ipv4Header the IP header supplied to the route request |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
71 |
* method (possibly modified in case a new routing header is |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
72 |
* inserted and consequently the protocol type has to change). |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
73 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
74 |
*/ |
1866
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1452
diff
changeset
|
75 |
typedef Callback<void, bool, const Ipv4Route&, Ptr<Packet>, const Ipv4Header&> RouteReplyCallback; |
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
76 |
|
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
77 |
/** |
3258
232368ff7dec
documentation to resolve bug 75
Craig Dowell <craigdo@ee.washington.edu>
parents:
3216
diff
changeset
|
78 |
* \brief Request that a packet be routed. |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
79 |
* |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
80 |
* \param interface The interface index on which the packet was received. |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
81 |
* \param ipHeader IP header of the packet |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
82 |
* \param packet packet that is being sent or forwarded |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
83 |
* \param routeReply callback that will receive the route reply |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
84 |
* |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
85 |
* \returns true if the routing protocol should be able to get the |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
86 |
* route, false otherwise. |
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
87 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
88 |
* This method is called whenever a node's IPv4 forwarding engine |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
89 |
* needs to lookup a route for a given packet and IP header. |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
90 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
91 |
* The routing protocol implementation may determine immediately it |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
92 |
* should not be handling this particular the route request. For |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
93 |
* instance, a routing protocol may decline to search for routes for |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
94 |
* certain classes of addresses, like link-local. In this case, |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
95 |
* RequestRoute() should return false and the routeReply callback |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
96 |
* must not be invoked. |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
97 |
* |
3258
232368ff7dec
documentation to resolve bug 75
Craig Dowell <craigdo@ee.washington.edu>
parents:
3216
diff
changeset
|
98 |
* If the routing protocol implementation assumes that it can provide |
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
99 |
* the requested route, then it should return true, and the |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
100 |
* routeReply callback must be invoked, either immediately before |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
101 |
* returning true (synchronously), or in the future (asynchronous). |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
102 |
* The routing protocol may use any information available in the IP |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
103 |
* header and packet as routing key, although most routing protocols |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
104 |
* use only the destination address (as given by |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
105 |
* ipHeader.GetDestination ()). The routing protocol is also |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
106 |
* allowed to add a new header to the packet, which will appear |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
107 |
* immediately after the IP header, although most routing do not |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
108 |
* insert any extra header. |
3258
232368ff7dec
documentation to resolve bug 75
Craig Dowell <craigdo@ee.washington.edu>
parents:
3216
diff
changeset
|
109 |
* |
232368ff7dec
documentation to resolve bug 75
Craig Dowell <craigdo@ee.washington.edu>
parents:
3216
diff
changeset
|
110 |
* Multicast routing is expected to be supported in this method. If a |
232368ff7dec
documentation to resolve bug 75
Craig Dowell <craigdo@ee.washington.edu>
parents:
3216
diff
changeset
|
111 |
* multicast route is encountered, all routes to a given multicast |
232368ff7dec
documentation to resolve bug 75
Craig Dowell <craigdo@ee.washington.edu>
parents:
3216
diff
changeset
|
112 |
* destination will be serviced by cloning the packet and calling the |
232368ff7dec
documentation to resolve bug 75
Craig Dowell <craigdo@ee.washington.edu>
parents:
3216
diff
changeset
|
113 |
* route reply callback once for each outgoing interface in the route. |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
114 |
*/ |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
115 |
virtual bool RequestRoute (uint32_t interface, |
1432
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
116 |
const Ipv4Header &ipHeader, |
1866
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1452
diff
changeset
|
117 |
Ptr<Packet> packet, |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
118 |
RouteReplyCallback routeReply) = 0; |
1452
973c456d3684
socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents:
1449
diff
changeset
|
119 |
|
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
120 |
/** |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
121 |
* \brief Synchronously check to see if we can determine the interface index |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
122 |
* that will be used if a packet is sent to this destination. |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
123 |
* |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
124 |
* This method addresses a problem in the IP stack where a destination address |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
125 |
* must be present and checksummed into the IP header before the actual |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
126 |
* interface over which the packet is sent can be determined. The answer is |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
127 |
* to implement a known and intentional cross-layer violation. This is the |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
128 |
* endpoint of a call chain that started up quite high in the stack (sockets) |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
129 |
* and has found its way down to the Ipv4L3Protocol which is consulting the |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
130 |
* routing protocols for what they would do if presented with a packet of the |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
131 |
* given destination. |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
132 |
* |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
133 |
* Note that the a single interface index is returned. This means that if |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
134 |
* the destination address is a multicast, and an explicit route is present |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
135 |
* that includeds multiple output interfaces, that route cannot be used. |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
136 |
* |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
137 |
* If there are multiple paths out of the node, the resolution is performed |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
138 |
* by Ipv4L3Protocol::GetInterfaceforDestination which has access to more |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
139 |
* contextual information that is useful for making a determination. |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
140 |
* |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
141 |
* \param destination The Ipv4Address if the destination of a hypothetical |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
142 |
* packet. This may be a multicast group address. |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
143 |
* \param interface A reference to the interface index over which a packet |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
144 |
* sent to this destination would be sent. |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
145 |
* \return Returns true if a route is found to the destination that involves |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
146 |
* a single output interface index, otherwise false. |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
147 |
* |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
148 |
* \see Ipv4StaticRouting |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
149 |
* \see Ipv4RoutingProtocol |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
150 |
* \see Ipv4L3Protocol |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
151 |
*/ |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
152 |
virtual bool RequestInterface (Ipv4Address destination, |
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
153 |
uint32_t& interface) = 0; |
1432
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
154 |
|
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
155 |
static const uint32_t INTERFACE_ANY = 0xffffffff; |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
156 |
}; |
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
157 |
|
633
ecedbcb39fb7
Some dox additions/fixes
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
593
diff
changeset
|
158 |
/** |
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
159 |
* \brief Access to the Ipv4 forwarding table and to the ipv4 interfaces |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
160 |
* |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
161 |
* This class allows you to create ipv4 interfaces based on a NetDevice. |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
162 |
* Multiple interfaces can be created for a single NetDevice, hence |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
163 |
* achieving multihoming. |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
164 |
* |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
165 |
* This class also allows you to control the content of the ipv4 |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
166 |
* forwarding table. |
633
ecedbcb39fb7
Some dox additions/fixes
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
593
diff
changeset
|
167 |
*/ |
752
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
751
diff
changeset
|
168 |
class Ipv4 : public Object |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
169 |
{ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
170 |
public: |
2251
04963d8cca51
iid (void) -> GetTypeId (void)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2250
diff
changeset
|
171 |
static TypeId GetTypeId (void); |
752
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
751
diff
changeset
|
172 |
Ipv4 (); |
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
751
diff
changeset
|
173 |
virtual ~Ipv4 (); |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
174 |
|
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
175 |
/** |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
176 |
* \brief Register a new routing protocol to be used in this IPv4 stack |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
177 |
* |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
178 |
* \param routingProtocol new routing protocol implementation object |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
179 |
* \param priority priority to give to this routing protocol. |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
180 |
* Values may range between -32768 and +32767. The priority 0 |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
181 |
* corresponds to static routing table lookups, higher values have |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
182 |
* more priority. The order by which routing protocols with the |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
183 |
* same priority value are consulted is undefined. |
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
184 |
*/ |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
185 |
virtual void AddRoutingProtocol (Ptr<Ipv4RoutingProtocol> routingProtocol, |
985
b15a6fa08c14
Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
983
diff
changeset
|
186 |
int16_t priority) = 0; |
983
47c42bd66fb7
Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
757
diff
changeset
|
187 |
|
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
188 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
189 |
* \param dest destination address |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
190 |
* \param nextHop address of next hop. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
191 |
* \param interface interface of next hop. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
192 |
* |
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
193 |
* Add route to host dest through host nextHop |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
194 |
* on interface. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
195 |
*/ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
196 |
virtual void AddHostRouteTo (Ipv4Address dest, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
197 |
Ipv4Address nextHop, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
198 |
uint32_t interface) = 0; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
199 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
200 |
* \param dest destination address |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
201 |
* \param interface of next hop |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
202 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
203 |
* add route to host dest on interface. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
204 |
*/ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
205 |
virtual void AddHostRouteTo (Ipv4Address dest, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
206 |
uint32_t interface) = 0; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
207 |
|
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
208 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
209 |
* \param network destination network |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
210 |
* \param networkMask netmask of destination network |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
211 |
* \param nextHop address of next hop |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
212 |
* \param interface interface of next hop |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
213 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
214 |
* add route to network dest with netmask |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
215 |
* through host nextHop on interface |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
216 |
*/ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
217 |
virtual void AddNetworkRouteTo (Ipv4Address network, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
218 |
Ipv4Mask networkMask, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
219 |
Ipv4Address nextHop, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
220 |
uint32_t interface) = 0; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
221 |
|
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
222 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
223 |
* \param network destination network |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
224 |
* \param networkMask netmask of destination network |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
225 |
* \param interface interface of next hop |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
226 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
227 |
* add route to network dest with netmask |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
228 |
* on interface |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
229 |
*/ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
230 |
virtual void AddNetworkRouteTo (Ipv4Address network, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
231 |
Ipv4Mask networkMask, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
232 |
uint32_t interface) = 0; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
233 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
234 |
* \param nextHop address of default next hop |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
235 |
* \param interface interface of default next hop. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
236 |
* |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
237 |
* set the default route to host nextHop on |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
238 |
* interface. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
239 |
*/ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
240 |
virtual void SetDefaultRoute (Ipv4Address nextHop, |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
241 |
uint32_t interface) = 0; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
242 |
|
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
243 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
244 |
* \returns the number of entries in the routing table. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
245 |
*/ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
246 |
virtual uint32_t GetNRoutes (void) = 0; |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
247 |
|
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
248 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
249 |
* \param i index of route to return |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
250 |
* \returns the route whose index is i |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
251 |
*/ |
757 | 252 |
virtual Ipv4Route GetRoute (uint32_t i) = 0; |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
253 |
|
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
254 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
255 |
* \param i index of route to remove from routing table. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
256 |
*/ |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
257 |
virtual void RemoveRoute (uint32_t i) = 0; |
1428
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
258 |
|
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
259 |
/** |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
260 |
* \brief Add a static multicast route for a given multicast source and |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
261 |
* group. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
262 |
* |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
263 |
* \param origin The Ipv4 address of the multicast source. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
264 |
* \param group The multicast group address. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
265 |
* \param inputInterface The interface index over which the packet arrived. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
266 |
* \param outputInterfaces The list of output interface indices over which |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
267 |
* the packet should be sent (excluding the inputInterface). |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
268 |
*/ |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
269 |
virtual void AddMulticastRoute (Ipv4Address origin, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
270 |
Ipv4Address group, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
271 |
uint32_t inputInterface, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
272 |
std::vector<uint32_t> outputInterfaces) = 0; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
273 |
/** |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
274 |
* \brief Remove a static multicast route for a given multicast source and |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
275 |
* group. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
276 |
* |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
277 |
* \param origin The Ipv4 address of the multicast source. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
278 |
* \param group The multicast group address. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
279 |
* \param inputInterface The interface index over which the packet arrived. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
280 |
*/ |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
281 |
virtual void RemoveMulticastRoute (Ipv4Address origin, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
282 |
Ipv4Address group, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
283 |
uint32_t inputInterface) = 0; |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
284 |
|
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
285 |
/** |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
286 |
* \brief Set the default static multicast route. |
1442
bb5cf98c0c64
real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents:
1440
diff
changeset
|
287 |
* |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
288 |
* \param outputInterface The network output interface index over which |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
289 |
* packets without specific routes should be sent. |
1442
bb5cf98c0c64
real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents:
1440
diff
changeset
|
290 |
*/ |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
291 |
virtual void SetDefaultMulticastRoute (uint32_t outputInterface) = 0; |
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
292 |
|
1442
bb5cf98c0c64
real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents:
1440
diff
changeset
|
293 |
/** |
1428
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
294 |
* \returns the number of entries in the multicast routing table. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
295 |
*/ |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
296 |
virtual uint32_t GetNMulticastRoutes (void) const = 0; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
297 |
|
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
298 |
/** |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
299 |
* \param i index of route to return |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
300 |
* \returns the route whose index is i |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
301 |
*/ |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
302 |
virtual Ipv4MulticastRoute GetMulticastRoute (uint32_t i) const = 0; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
303 |
|
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
304 |
/** |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
305 |
* \param i index of route to remove from routing table. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
306 |
*/ |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
307 |
virtual void RemoveMulticastRoute (uint32_t i) = 0; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
308 |
|
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
309 |
/** |
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
310 |
* \param device device to add to the list of ipv4 interfaces |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
311 |
* which can be used as output interfaces during packet forwarding. |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
312 |
* \returns the index of the ipv4 interface added. |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
313 |
* |
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
314 |
* Once a device has been added, it can never be removed: if you want |
755
64403472ab29
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
752
diff
changeset
|
315 |
* to disable it, you can invoke Ipv4::SetDown which will |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
316 |
* make sure that it is never used during packet forwarding. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
317 |
*/ |
568
e1660959ecbb
use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
525
diff
changeset
|
318 |
virtual uint32_t AddInterface (Ptr<NetDevice> device) = 0; |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
319 |
|
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
320 |
/** |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
321 |
* \returns the number of interfaces added by the user. |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
322 |
*/ |
4377 | 323 |
virtual uint32_t GetNInterfaces (void) const = 0; |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
324 |
|
540
507eababb124
Separate address assignment from routing in PointToPoint topology code
Tom Henderson <tomh@tomh.org>
parents:
525
diff
changeset
|
325 |
/** |
1440
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
326 |
* \brief Find and return the interface ID of the interface that has been |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
327 |
* assigned the specified IP address. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
328 |
* \param addr The IP address assigned to the interface of interest. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
329 |
* \returns The index of the ipv4 interface with the given address. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
330 |
* |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
331 |
* Each IP interface has an IP address associated with it. It is often |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
332 |
* useful to search the list of interfaces for one that corresponds to |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
333 |
* a known IP Address. This call takes an IP address as a parameter and |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
334 |
* returns the interface index of the first interface that has been assigned |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
335 |
* that address. If the address is not found, this function asserts. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
336 |
*/ |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
337 |
virtual uint32_t FindInterfaceForAddr (Ipv4Address addr) const = 0; |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
338 |
|
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
339 |
/** |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
340 |
* \brief Find and return the interface ID of the interface that has been |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
341 |
* assigned the specified (masked) IP address. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
342 |
* \param addr The IP address assigned to the interface of interest. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
343 |
* \param mask The address mask to be used in address matching. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
344 |
* \returns The index of the ipv4 interface with the given address. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
345 |
* |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
346 |
* Each IP interface has an IP address associated with it. It is often |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
347 |
* useful to search the list of interfaces for one that corresponds to |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
348 |
* a known IP Address. This call takes an IP address and an IP address |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
349 |
* mask as parameters and returns the interface index of the first interface |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
350 |
* that matches the masked IP address. |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
351 |
*/ |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
352 |
virtual uint32_t FindInterfaceForAddr (Ipv4Address addr, |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
353 |
Ipv4Mask mask) const = 0; |
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
354 |
|
c77745b2731c
add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents:
1434
diff
changeset
|
355 |
/** |
2711
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
356 |
* \brief Find and return the interface ID of the interface that has been |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
357 |
* associated with the specified (masked) NetDevice |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
358 |
* \param nd The net device of the interface of interest. |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
359 |
* \returns The index of the ipv4 interface associated with the given net |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
360 |
* device or -1 if not found. |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
361 |
* |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
362 |
* Each IP interface is associated with a net device. It is often |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
363 |
* useful to search the list of interfaces for one that corresponds to |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
364 |
* a known net device. This call takes an smart pointer to a net device |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
365 |
* and returns the interface index of the first interface that matches the |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
366 |
* net device. |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
367 |
*/ |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
368 |
virtual int32_t FindInterfaceForDevice(Ptr<NetDevice> nd) const = 0; |
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
369 |
|
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2253
diff
changeset
|
370 |
/** |
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
371 |
* \param i index of ipv4 interface |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
372 |
* \returns the NetDevice associated with the ipv4 interface index |
540
507eababb124
Separate address assignment from routing in PointToPoint topology code
Tom Henderson <tomh@tomh.org>
parents:
525
diff
changeset
|
373 |
*/ |
593 | 374 |
virtual Ptr<NetDevice> GetNetDevice (uint32_t i) = 0; |
540
507eababb124
Separate address assignment from routing in PointToPoint topology code
Tom Henderson <tomh@tomh.org>
parents:
525
diff
changeset
|
375 |
|
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
376 |
/** |
1428
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
377 |
* \brief Join a multicast group for a given multicast source and |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
378 |
* group. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
379 |
* |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
380 |
* \param origin The Ipv4 address of the multicast source. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
381 |
* \param group The multicast group address. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
382 |
*/ |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
383 |
virtual void JoinMulticastGroup (Ipv4Address origin, Ipv4Address group) = 0; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
384 |
|
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
385 |
/** |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
386 |
* \brief Leave a multicast group for a given multicast source and |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
387 |
* group. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
388 |
* |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
389 |
* \param origin The Ipv4 address of the multicast source. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
390 |
* \param group The multicast group address. |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
391 |
*/ |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
392 |
virtual void LeaveMulticastGroup (Ipv4Address origin, Ipv4Address group) = 0; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
393 |
|
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
985
diff
changeset
|
394 |
/** |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
395 |
* \param interface Interface number of an Ipv4 interface |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
396 |
* \param address Ipv4InterfaceAddress address to associate with the underlying Ipv4 interface |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
397 |
* \returns The address index of the newly-added address |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
398 |
*/ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
399 |
virtual uint32_t AddAddress (uint32_t interface, Ipv4InterfaceAddress address) = 0; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
400 |
|
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
401 |
/** |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
402 |
* \param interface Interface number of an Ipv4 interface |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
403 |
* \returns the number of Ipv4InterfaceAddress entries for the interface. |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
404 |
*/ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
405 |
virtual uint32_t GetNAddresses (uint32_t interface) const = 0; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
406 |
|
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
407 |
/** |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
408 |
* \param interface Interface number of an Ipv4 interface |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
409 |
* \param addressIndex index of Ipv4InterfaceAddress |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
410 |
* \returns the Ipv4InterfaceAddress associated to the interface and addresIndex |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
411 |
*/ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
412 |
virtual Ipv4InterfaceAddress GetAddress (uint32_t interface, uint32_t addressIndex) const = 0; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
413 |
|
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
4372
diff
changeset
|
414 |
/** |
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
415 |
* \param i index of ipv4 interface |
1776
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
416 |
* \param metric routing metric (cost) associated to the underlying |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
417 |
* ipv4 interface |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
418 |
*/ |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
419 |
virtual void SetMetric (uint32_t i, uint16_t metric) = 0; |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
420 |
|
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
421 |
/** |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
422 |
* \param i index of ipv4 interface |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
423 |
* \returns routing metric (cost) associated to the underlying |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
424 |
* ipv4 interface |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
425 |
*/ |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
426 |
virtual uint16_t GetMetric (uint32_t i) const = 0; |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
427 |
|
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1452
diff
changeset
|
428 |
/** |
1434
2b63aafb050b
set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents:
1432
diff
changeset
|
429 |
* \param destination The IP address of a hypothetical destination. |
2b63aafb050b
set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents:
1432
diff
changeset
|
430 |
* \returns The IP address assigned to the interface that will be used |
2b63aafb050b
set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents:
1432
diff
changeset
|
431 |
* if we were to send a packet to destination. |
3380 | 432 |
* |
433 |
* Note that the broadcast address for this interface may be fetched |
|
434 |
* from the Ipv4Address object returned here using |
|
435 |
* Ipv4Address::GetSubnetDirectedBroadcast(mask), where the mask for |
|
436 |
* the interface may be retrived using Ipv4::GetNetworkMask(i). |
|
1434
2b63aafb050b
set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents:
1432
diff
changeset
|
437 |
*/ |
2b63aafb050b
set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents:
1432
diff
changeset
|
438 |
virtual Ipv4Address GetSourceAddress (Ipv4Address destination) const = 0; |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
439 |
|
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
440 |
/** |
1795
820cc1254290
get rid of doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1776
diff
changeset
|
441 |
* \param dest The IP address of a hypothetical destination. |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
442 |
* \param interface filled in with the interface index that will be used to |
1452
973c456d3684
socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents:
1449
diff
changeset
|
443 |
* send a packet to the hypothetical destination. |
1795
820cc1254290
get rid of doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1776
diff
changeset
|
444 |
* \returns true if a single interface can be identified, false otherwise. |
1452
973c456d3684
socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents:
1449
diff
changeset
|
445 |
*/ |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
446 |
virtual bool GetInterfaceForDestination (Ipv4Address dest, |
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
447 |
uint32_t &interface) const = 0; |
1452
973c456d3684
socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents:
1449
diff
changeset
|
448 |
|
973c456d3684
socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents:
1449
diff
changeset
|
449 |
/** |
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
450 |
* \param i index of ipv4 interface |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
451 |
* \returns the Maximum Transmission Unit (in bytes) associated |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
452 |
* to the underlying ipv4 interface |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
453 |
*/ |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
454 |
virtual uint16_t GetMtu (uint32_t i) const = 0; |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
455 |
|
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
456 |
/** |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
457 |
* \param i index of ipv4 interface |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
458 |
* \returns true if the underlying interface is in the "up" state, |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
459 |
* false otherwise. |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
460 |
*/ |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
461 |
virtual bool IsUp (uint32_t i) const = 0; |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
462 |
|
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
463 |
/** |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
464 |
* \param i index of ipv4 interface |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
465 |
* |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
466 |
* Set the interface into the "up" state. In this state, it is |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
467 |
* considered valid during ipv4 forwarding. |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
468 |
*/ |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
469 |
virtual void SetUp (uint32_t i) = 0; |
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
470 |
|
638
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
471 |
/** |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
472 |
* \param i index of ipv4 interface |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
473 |
* |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
474 |
* Set the interface into the "down" state. In this state, it is |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
475 |
* ignored during ipv4 forwarding. |
e979214cc52d
improve IIpv4 dox
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
476 |
*/ |
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
477 |
virtual void SetDown (uint32_t i) = 0; |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
478 |
|
1824
fd6f6604caad
move ipv4 static to member functions
Tom Henderson <tomh@tomh.org>
parents:
1795
diff
changeset
|
479 |
/** |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
480 |
* \brief Convenience function to return the interface corresponding |
1824
fd6f6604caad
move ipv4 static to member functions
Tom Henderson <tomh@tomh.org>
parents:
1795
diff
changeset
|
481 |
* to the Ipv4Address provided |
fd6f6604caad
move ipv4 static to member functions
Tom Henderson <tomh@tomh.org>
parents:
1795
diff
changeset
|
482 |
* |
fd6f6604caad
move ipv4 static to member functions
Tom Henderson <tomh@tomh.org>
parents:
1795
diff
changeset
|
483 |
* \param addr Ipv4Address |
fd6f6604caad
move ipv4 static to member functions
Tom Henderson <tomh@tomh.org>
parents:
1795
diff
changeset
|
484 |
* \param mask corresponding Ipv4Mask |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
485 |
* \returns interface corresponding to a/amask |
1824
fd6f6604caad
move ipv4 static to member functions
Tom Henderson <tomh@tomh.org>
parents:
1795
diff
changeset
|
486 |
*/ |
4372
d99061f1167c
Ipv4::ifIndex -> Ipv4::interface
Tom Henderson <tomh@tomh.org>
parents:
3380
diff
changeset
|
487 |
virtual uint32_t GetInterfaceByAddress (Ipv4Address addr, |
1824
fd6f6604caad
move ipv4 static to member functions
Tom Henderson <tomh@tomh.org>
parents:
1795
diff
changeset
|
488 |
Ipv4Mask mask = Ipv4Mask("255.255.255.255")); |
1452
973c456d3684
socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents:
1449
diff
changeset
|
489 |
}; |
1316
f357c6a2bb37
Provide two new Ipv4 convenience functions: GetIfIndexByIpv4Address() and GetIpv4RouteToDestination (), and align global routing code to use the first function
Tom Henderson <tomh@tomh.org>
parents:
1308
diff
changeset
|
490 |
|
522
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
491 |
} // namespace ns3 |
d5039448597a
remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
492 |
|
752
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
751
diff
changeset
|
493 |
#endif /* IPV4_H */ |