author | Brian Swenson <bswenson3@gatech.edu> |
Tue, 22 Apr 2014 11:52:55 -0400 | |
changeset 10694 | 4af272d94cfd |
parent 10440 | 1e48ff9185f1 |
child 10965 | 14cde591d8e4 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7176
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
2 |
/* |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
3 |
* Copyright (c) 2007-2009 Strasbourg University |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
4 |
* |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
8 |
* |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
13 |
* |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
17 |
* |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
18 |
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr> |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
19 |
*/ |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
20 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
21 |
#ifndef NDISC_CACHE_H |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
22 |
#define NDISC_CACHE_H |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
23 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
24 |
#include <stdint.h> |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
25 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
26 |
#include <list> |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
27 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
28 |
#include "ns3/packet.h" |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
29 |
#include "ns3/nstime.h" |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
30 |
#include "ns3/net-device.h" |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
31 |
#include "ns3/ipv6-address.h" |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
32 |
#include "ns3/ptr.h" |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
33 |
#include "ns3/timer.h" |
4739
256a085d82d6
export sgi-hashmap.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4731
diff
changeset
|
34 |
#include "ns3/sgi-hashmap.h" |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
35 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
36 |
namespace ns3 |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
37 |
{ |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
38 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
39 |
class NetDevice; |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
40 |
class Ipv6Interface; |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
41 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
42 |
/** |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
43 |
* \class NdiscCache |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
44 |
* \brief IPv6 Neighbor Discovery cache. |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
45 |
*/ |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
46 |
class NdiscCache : public Object |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
47 |
{ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
48 |
public: |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
49 |
class Entry; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
50 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
51 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
52 |
* \brief Get the type ID |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
53 |
* \return type ID |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
54 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
55 |
static TypeId GetTypeId (); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
56 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
57 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
58 |
* \brief Default value for unres qlen. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
59 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
60 |
static const uint32_t DEFAULT_UNRES_QLEN = 3; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
61 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
62 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
63 |
* \brief Constructor. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
64 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
65 |
NdiscCache (); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
66 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
67 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
68 |
* \brief Destructor. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
69 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
70 |
~NdiscCache (); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
71 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
72 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
73 |
* \brief Get the NetDevice associated with this cache. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
74 |
* \return NetDevice |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
75 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
76 |
Ptr<NetDevice> GetDevice () const; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
77 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
78 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
79 |
* \brief Get the Ipv6Interface associated with this cache. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
80 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
81 |
Ptr<Ipv6Interface> GetInterface () const; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
82 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
83 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
84 |
* \brief Lookup in the cache. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
85 |
* \param dst destination address |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
86 |
* \return the entry if found, 0 otherwise |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
87 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
88 |
NdiscCache::Entry* Lookup (Ipv6Address dst); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
89 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
90 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
91 |
* \brief Add an entry. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
92 |
* \param to address to add |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
93 |
* \return an new Entry |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
94 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
95 |
NdiscCache::Entry* Add (Ipv6Address to); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
96 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
97 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
98 |
* \brief Delete an entry. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
99 |
* \param entry pointer to delete from the list. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
100 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
101 |
void Remove (NdiscCache::Entry* entry); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
102 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
103 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
104 |
* \brief Flush the cache. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
105 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
106 |
void Flush (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
107 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
108 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
109 |
* \brief Set the max number of waiting packet. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
110 |
* \param unresQlen value to set |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
111 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
112 |
void SetUnresQlen (uint32_t unresQlen); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
113 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
114 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
115 |
* \brief Get the max number of waiting packet. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
116 |
* \return max number |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
117 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
118 |
uint32_t GetUnresQlen (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
119 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
120 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
121 |
* \brief Set the device and interface. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
122 |
* \param device the device |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
123 |
* \param interface the IPv6 interface |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
124 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
125 |
void SetDevice (Ptr<NetDevice> device, Ptr<Ipv6Interface> interface); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
126 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
127 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
128 |
* \class Entry |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
129 |
* \brief A record that holds information about an NdiscCache entry. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
130 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
131 |
class Entry |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
132 |
{ |
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
133 |
public: |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
134 |
/** |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
135 |
* \brief Constructor. |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
136 |
* \param nd The NdiscCache this entry belongs to. |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
137 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
138 |
Entry (NdiscCache* nd); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
139 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
140 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
141 |
* \brief Changes the state to this entry to INCOMPLETE. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
142 |
* \param p packet that wait to be sent |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
143 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
144 |
void MarkIncomplete (Ptr<Packet> p); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
145 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
146 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
147 |
* \brief Changes the state to this entry to REACHABLE. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
148 |
* \param mac MAC address |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
149 |
* \return the list of packet waiting |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
150 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
151 |
std::list<Ptr<Packet> > MarkReachable (Address mac); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
152 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
153 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
154 |
* \brief Changes the state to this entry to PROBE. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
155 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
156 |
void MarkProbe (); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
157 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
158 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
159 |
* \brief Changes the state to this entry to STALE. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
160 |
* \param mac L2 address |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
161 |
* \return the list of packet waiting |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
162 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
163 |
std::list<Ptr<Packet> > MarkStale (Address mac); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
164 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
165 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
166 |
* \brief Changes the state to this entry to STALE. |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
167 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
168 |
void MarkStale (); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
169 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
170 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
171 |
* \brief Changes the state to this entry to REACHABLE. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
172 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
173 |
void MarkReachable (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
174 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
175 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
176 |
* \brief Change the state to this entry to DELAY. |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
177 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
178 |
void MarkDelay (); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
179 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
180 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
181 |
* \brief Add a packet (or replace old value) in the queue. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
182 |
* \param p packet to add |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
183 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
184 |
void AddWaitingPacket (Ptr<Packet> p); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
185 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
186 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
187 |
* \brief Clear the waiting packet list. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
188 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
189 |
void ClearWaitingPacket (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
190 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
191 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
192 |
* \brief Is the entry STALE |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
193 |
* \return true if the entry is in STALE state, false otherwise |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
194 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
195 |
bool IsStale () const; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
196 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
197 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
198 |
* \brief Is the entry REACHABLE |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
199 |
* \return true if the entry is in REACHABLE state, false otherwise |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
200 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
201 |
bool IsReachable () const; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
202 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
203 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
204 |
* \brief Is the entry DELAY |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
205 |
* \return true if the entry is in DELAY state, false otherwise |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
206 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
207 |
bool IsDelay () const; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
208 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
209 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
210 |
* \brief Is the entry INCOMPLETE |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
211 |
* \return true if the entry is in INCOMPLETE state, false otherwise |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
212 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
213 |
bool IsIncomplete () const; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
214 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
215 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
216 |
* \brief Is the entry PROBE |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
217 |
* \return true if the entry is in PROBE state, false otherwise |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
218 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
219 |
bool IsProbe () const; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
220 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
221 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
222 |
* \brief Get the MAC address of this entry. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
223 |
* \return the L2 address |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
224 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
225 |
Address GetMacAddress () const; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
226 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
227 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
228 |
* \brief Set the MAC address of this entry. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
229 |
* \param mac the MAC address to set |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
230 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
231 |
void SetMacAddress (Address mac); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
232 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
233 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
234 |
* \brief If the entry is a host or a router. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
235 |
* \return true if the node is a router, 0 if it is a host |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
236 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
237 |
bool IsRouter () const; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
238 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
239 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
240 |
* \brief Set the node type. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
241 |
* \param router true is a router, false means a host |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
242 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
243 |
void SetRouter (bool router); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
244 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
245 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
246 |
* \brief Get the number of NS retransmit. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
247 |
* \return number of NS that have been retransmit |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
248 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
249 |
uint8_t GetNSRetransmit () const; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
250 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
251 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
252 |
* \brief Increment NS retransmit. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
253 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
254 |
void IncNSRetransmit (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
255 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
256 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
257 |
* \brief Reset NS retransmit (=0). |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
258 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
259 |
void ResetNSRetransmit (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
260 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
261 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
262 |
* \brief Get the time of last reachability confirmation. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
263 |
* \return time |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
264 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
265 |
Time GetLastReachabilityConfirmation () const; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
266 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
267 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
268 |
* \brief Update the time of last reachability confirmation. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
269 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
270 |
void UpdateLastReachabilityconfirmation (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
271 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
272 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
273 |
* \brief Start the reachable timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
274 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
275 |
void StartReachableTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
276 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
277 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
278 |
* \brief Stop the reachable timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
279 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
280 |
void StopReachableTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
281 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
282 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
283 |
* \brief Start retransmit timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
284 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
285 |
void StartRetransmitTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
286 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
287 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
288 |
* \brief Stop retransmit timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
289 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
290 |
void StopRetransmitTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
291 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
292 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
293 |
* \brief Start probe timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
294 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
295 |
void StartProbeTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
296 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
297 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
298 |
* \brief Stop probe timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
299 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
300 |
void StopProbeTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
301 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
302 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
303 |
* \brief Start delay timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
304 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
305 |
void StartDelayTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
306 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
307 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
308 |
* \brief Stop delay timer. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
309 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
310 |
void StopDelayTimer (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
311 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
312 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
313 |
* \brief Function called when reachable timer timeout. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
314 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
315 |
void FunctionReachableTimeout (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
316 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
317 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
318 |
* \brief Function called when retransmit timer timeout. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
319 |
* It verify that the NS retransmit has reached the max so discard the entry |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
320 |
* otherwise it retransmit a NS. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
321 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
322 |
void FunctionRetransmitTimeout (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
323 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
324 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
325 |
* \brief Function called when probe timer timeout. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
326 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
327 |
void FunctionProbeTimeout (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
328 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
329 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
330 |
* \brief Function called when delay timer timeout. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
331 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
332 |
void FunctionDelayTimeout (); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
333 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
334 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
335 |
* \brief Set the IPv6 address. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
336 |
* \param ipv6Address IPv6 address |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
337 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
338 |
void SetIpv6Address (Ipv6Address ipv6Address); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
339 |
|
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
340 |
private: |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
341 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
342 |
* \brief The IPv6 address. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
343 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
344 |
Ipv6Address m_ipv6Address; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
345 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
346 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
347 |
* \brief The Entry state enumeration. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
348 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
349 |
enum NdiscCacheEntryState_e |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
350 |
{ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
351 |
INCOMPLETE, /**< No mapping between IPv6 and L2 addresses */ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
352 |
REACHABLE, /**< Mapping exists between IPv6 and L2 addresses */ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
353 |
STALE, /**< Mapping is stale */ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
354 |
DELAY, /**< Try to wait contact from remote host */ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
355 |
PROBE /**< Try to contact IPv6 address to know again its L2 address */ |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
356 |
}; |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
357 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
358 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
359 |
* \brief The state of the entry. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
360 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
361 |
NdiscCacheEntryState_e m_state; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
362 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
363 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
364 |
* \brief the NdiscCache associated. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
365 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
366 |
NdiscCache* m_ndCache; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
367 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
368 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
369 |
* \brief The MAC address. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
370 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
371 |
Address m_macAddress; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
372 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
373 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
374 |
* \brief The list of packet waiting. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
375 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
376 |
std::list<Ptr<Packet> > m_waiting; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
377 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
378 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
379 |
* \brief Type of node (router or host). |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
380 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
381 |
bool m_router; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
382 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
383 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
384 |
* \brief Reachable timer (used for NUD in REACHABLE state). |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
385 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
386 |
Timer m_reachableTimer; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
387 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
388 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
389 |
* \brief Retransmission timer (used for NUD in INCOMPLETE state). |
5218
988fb8d47aac
NdiscCache copy constructor private + python rescan.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5217
diff
changeset
|
390 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
391 |
Timer m_retransTimer; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
392 |
|
5218
988fb8d47aac
NdiscCache copy constructor private + python rescan.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5217
diff
changeset
|
393 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
394 |
* \brief Probe timer (used for NUD in PROBE state). |
5218
988fb8d47aac
NdiscCache copy constructor private + python rescan.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5217
diff
changeset
|
395 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
396 |
Timer m_probeTimer; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
397 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
398 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
399 |
* \brief Delay timer (used for NUD when in DELAY state). |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
400 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
401 |
Timer m_delayTimer; |
5218
988fb8d47aac
NdiscCache copy constructor private + python rescan.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5217
diff
changeset
|
402 |
|
988fb8d47aac
NdiscCache copy constructor private + python rescan.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5217
diff
changeset
|
403 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
404 |
* \brief Last time we see a reachability confirmation. |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
405 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
406 |
Time m_lastReachabilityConfirmation; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
407 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
408 |
/** |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
409 |
* \brief Number of NS retransmission. |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
410 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
411 |
uint8_t m_nsRetransmit; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
412 |
}; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
413 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
414 |
private: |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
415 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
416 |
* \brief Neighbor Discovery Cache container |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
417 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
418 |
typedef sgi::hash_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash> Cache; |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
419 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
420 |
* \brief Neighbor Discovery Cache container iterator |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
421 |
*/ |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
422 |
typedef sgi::hash_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash>::iterator CacheI; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
423 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
424 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
425 |
* \brief Copy constructor. |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
426 |
* |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
427 |
* Not implemented to avoid misuse |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
428 |
*/ |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
429 |
NdiscCache (NdiscCache const &); |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
430 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
431 |
/** |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
432 |
* \brief Copy constructor. |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
433 |
* |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
434 |
* Not implemented to avoid misuse |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
435 |
* \returns |
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
436 |
*/ |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7385
diff
changeset
|
437 |
NdiscCache& operator= (NdiscCache const &); |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
438 |
|
5891
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
439 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
440 |
* \brief Dispose this object. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
441 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
442 |
void DoDispose (); |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
443 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
444 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
445 |
* \brief The NetDevice. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
446 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
447 |
Ptr<NetDevice> m_device; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
448 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
449 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
450 |
* \brief the interface. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
451 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
452 |
Ptr<Ipv6Interface> m_interface; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
453 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
454 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
455 |
* \brief A list of Entry. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
456 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
457 |
Cache m_ndCache; |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
458 |
|
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
459 |
/** |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
460 |
* \brief Max number of packet stored in m_waiting. |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
461 |
*/ |
09a575cdf8db
Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
5225
diff
changeset
|
462 |
uint32_t m_unresQlen; |
4731
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
463 |
}; |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
464 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
465 |
} /* namespace ns3 */ |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
466 |
|
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
467 |
#endif /* NDISC_CACHE_H */ |
510db8599bfb
second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff
changeset
|
468 |