author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Fri, 20 Mar 2009 16:49:49 +0100 | |
changeset 4358 | e63305078fe5 |
parent 3970 | 8658841e4782 |
permissions | -rw-r--r-- |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
1752
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
2 |
/* |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
3 |
* Copyright (c) 2004 Francisco J. Ros |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
4 |
* Copyright (c) 2007 INESC Porto |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
5 |
* |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
6 |
* This program is free software; you can redistribute it and/or modify |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
7 |
* it under the terms of the GNU General Public License version 2 as |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
8 |
* published by the Free Software Foundation; |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
9 |
* |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
10 |
* This program is distributed in the hope that it will be useful, |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
13 |
* GNU General Public License for more details. |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
14 |
* |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
16 |
* along with this program; if not, write to the Free Software |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
18 |
* |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
19 |
* Authors: Francisco J. Ros <fjrm@dif.um.es> |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
20 |
* Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
d9115729b7d6
Cleanup copyright headers and some unused includes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1731
diff
changeset
|
21 |
*/ |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
22 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
23 |
/// \brief This header file declares and defines internal state of an OLSR node. |
1731
f7ca15d60e5b
Reorganize source tree and rename classes in a more sensible way; Olsr becomes OlsrAgent, olsr::Olsr becomes OlsrAgentImpl.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1716
diff
changeset
|
24 |
|
f7ca15d60e5b
Reorganize source tree and rename classes in a more sensible way; Olsr becomes OlsrAgent, olsr::Olsr becomes OlsrAgentImpl.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1716
diff
changeset
|
25 |
#ifndef __OLSR_STATE_H__ |
f7ca15d60e5b
Reorganize source tree and rename classes in a more sensible way; Olsr becomes OlsrAgent, olsr::Olsr becomes OlsrAgentImpl.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1716
diff
changeset
|
26 |
#define __OLSR_STATE_H__ |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
27 |
|
4358
e63305078fe5
rework olsr
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3970
diff
changeset
|
28 |
#include "olsr-repositories.h" |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
29 |
|
1731
f7ca15d60e5b
Reorganize source tree and rename classes in a more sensible way; Olsr becomes OlsrAgent, olsr::Olsr becomes OlsrAgentImpl.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1716
diff
changeset
|
30 |
namespace ns3 { |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
31 |
|
1731
f7ca15d60e5b
Reorganize source tree and rename classes in a more sensible way; Olsr becomes OlsrAgent, olsr::Olsr becomes OlsrAgentImpl.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1716
diff
changeset
|
32 |
using namespace olsr; |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
33 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
34 |
/// This class encapsulates all data structures needed for maintaining internal state of an OLSR node. |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
35 |
class OlsrState |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
36 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
37 |
// friend class Olsr; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
38 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
39 |
protected: |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
40 |
LinkSet m_linkSet; ///< Link Set (RFC 3626, section 4.2.1). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
41 |
NeighborSet m_neighborSet; ///< Neighbor Set (RFC 3626, section 4.3.1). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
42 |
TwoHopNeighborSet m_twoHopNeighborSet; ///< 2-hop Neighbor Set (RFC 3626, section 4.3.2). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
43 |
TopologySet m_topologySet; ///< Topology Set (RFC 3626, section 4.4). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
44 |
MprSet m_mprSet; ///< MPR Set (RFC 3626, section 4.3.3). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
45 |
MprSelectorSet m_mprSelectorSet; ///< MPR Selector Set (RFC 3626, section 4.3.4). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
46 |
DuplicateSet m_duplicateSet; ///< Duplicate Set (RFC 3626, section 3.4). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
47 |
IfaceAssocSet m_ifaceAssocSet; ///< Interface Association Set (RFC 3626, section 4.1). |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
48 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
49 |
public: |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
50 |
|
2359
cbe5d6629daf
OLSR optimization: avoid doing routing table computation if no local DB changed after receiving a OLSR packet.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2328
diff
changeset
|
51 |
OlsrState () |
cbe5d6629daf
OLSR optimization: avoid doing routing table computation if no local DB changed after receiving a OLSR packet.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2328
diff
changeset
|
52 |
{} |
cbe5d6629daf
OLSR optimization: avoid doing routing table computation if no local DB changed after receiving a OLSR packet.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2328
diff
changeset
|
53 |
|
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
54 |
// MPR selector |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
55 |
const MprSelectorSet & GetMprSelectors () const |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
56 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
57 |
return m_mprSelectorSet; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
58 |
} |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
59 |
MprSelectorTuple* FindMprSelectorTuple (const Ipv4Address &mainAddr); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
60 |
void EraseMprSelectorTuple (const MprSelectorTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
61 |
void EraseMprSelectorTuples (const Ipv4Address &mainAddr); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
62 |
void InsertMprSelectorTuple (const MprSelectorTuple &tuple); |
3970
8658841e4782
Fix a couple of OLSR bugs (#415)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2361
diff
changeset
|
63 |
std::string PrintMprSelectorSet () const; |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
64 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
65 |
// Neighbor |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
66 |
const NeighborSet & GetNeighbors () const |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
67 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
68 |
return m_neighborSet; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
69 |
} |
2328
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
70 |
NeighborSet & GetNeighbors () |
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
71 |
{ |
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
72 |
return m_neighborSet; |
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
73 |
} |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
74 |
NeighborTuple* FindNeighborTuple (const Ipv4Address &mainAddr); |
1799
1f910b06c8b3
more const optimisations
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1798
diff
changeset
|
75 |
const NeighborTuple* FindSymNeighborTuple (const Ipv4Address &mainAddr) const; |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
76 |
NeighborTuple* FindNeighborTuple (const Ipv4Address &mainAddr, |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
77 |
uint8_t willingness); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
78 |
void EraseNeighborTuple (const NeighborTuple &neighborTuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
79 |
void EraseNeighborTuple (const Ipv4Address &mainAddr); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
80 |
void InsertNeighborTuple (const NeighborTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
81 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
82 |
// Two-hop neighbor |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
83 |
const TwoHopNeighborSet & GetTwoHopNeighbors () const |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
84 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
85 |
return m_twoHopNeighborSet; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
86 |
} |
2328
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
87 |
TwoHopNeighborSet & GetTwoHopNeighbors () |
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
88 |
{ |
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
89 |
return m_twoHopNeighborSet; |
caa15068fb3b
OLSR: code cleanup, more extensive logging, many bug fixes. Should also handle multiple interfaces better, now.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1799
diff
changeset
|
90 |
} |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
91 |
TwoHopNeighborTuple* FindTwoHopNeighborTuple (const Ipv4Address &neighbor, |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
92 |
const Ipv4Address &twoHopNeighbor); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
93 |
void EraseTwoHopNeighborTuple (const TwoHopNeighborTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
94 |
void EraseTwoHopNeighborTuples (const Ipv4Address &neighbor); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
95 |
void EraseTwoHopNeighborTuples (const Ipv4Address &neighbor, |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
96 |
const Ipv4Address &twoHopNeighbor); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
97 |
void InsertTwoHopNeighborTuple (const TwoHopNeighborTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
98 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
99 |
// MPR |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
100 |
bool FindMprAddress (const Ipv4Address &address); |
2361
743e0e351379
OLSR: fix default willingness value, cleanup and fix the MPR computation algorithm.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2359
diff
changeset
|
101 |
void SetMprSet (MprSet mprSet); |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
102 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
103 |
// Duplicate |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
104 |
DuplicateTuple* FindDuplicateTuple (const Ipv4Address &address, |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
105 |
uint16_t sequenceNumber); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
106 |
void EraseDuplicateTuple (const DuplicateTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
107 |
void InsertDuplicateTuple (const DuplicateTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
108 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
109 |
// Link |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
110 |
const LinkSet & GetLinks () const |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
111 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
112 |
return m_linkSet; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
113 |
} |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
114 |
LinkTuple* FindLinkTuple (const Ipv4Address &ifaceAddr); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
115 |
LinkTuple* FindSymLinkTuple (const Ipv4Address &ifaceAddr, Time time); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
116 |
void EraseLinkTuple (const LinkTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
117 |
LinkTuple& InsertLinkTuple (const LinkTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
118 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
119 |
// Topology |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
120 |
const TopologySet & GetTopologySet () const |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
121 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
122 |
return m_topologySet; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
123 |
} |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
124 |
TopologyTuple* FindTopologyTuple (const Ipv4Address &destAddr, |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
125 |
const Ipv4Address &lastAddr); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
126 |
TopologyTuple* FindNewerTopologyTuple (const Ipv4Address &lastAddr, |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
127 |
uint16_t ansn); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
128 |
void EraseTopologyTuple (const TopologyTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
129 |
void EraseOlderTopologyTuples (const Ipv4Address &lastAddr, |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
130 |
uint16_t ansn); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
131 |
void InsertTopologyTuple (const TopologyTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
132 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
133 |
// Interface association |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
134 |
const IfaceAssocSet & GetIfaceAssocSet () const |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
135 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
136 |
return m_ifaceAssocSet; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
137 |
} |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
138 |
IfaceAssocSet & GetIfaceAssocSetMutable () |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
139 |
{ |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
140 |
return m_ifaceAssocSet; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
141 |
} |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
142 |
IfaceAssocTuple* FindIfaceAssocTuple (const Ipv4Address &ifaceAddr); |
1798
7bb07f0d0e9f
Make OlsrAgentImpl::GetMainAddress const
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1778
diff
changeset
|
143 |
const IfaceAssocTuple* FindIfaceAssocTuple (const Ipv4Address &ifaceAddr) const; |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
144 |
void EraseIfaceAssocTuple (const IfaceAssocTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
145 |
void InsertIfaceAssocTuple (const IfaceAssocTuple &tuple); |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
146 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
147 |
// Returns a vector of all interfaces of a given neighbor, with the |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
148 |
// exception of the "main" one. |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
149 |
std::vector<Ipv4Address> |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
150 |
FindNeighborInterfaces (const Ipv4Address &neighborMainAddr) const; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
151 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
152 |
}; |
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
153 |
|
1731
f7ca15d60e5b
Reorganize source tree and rename classes in a more sensible way; Olsr becomes OlsrAgent, olsr::Olsr becomes OlsrAgentImpl.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1716
diff
changeset
|
154 |
} // namespace ns3 |
1716
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
155 |
|
9757633a85da
Add OLSR routing support, (loosely) based on Francisco J. Ros's NS-2 code (University of Murcia).
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
156 |
#endif |