author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Thu, 08 Nov 2007 15:23:06 +0100 | |
changeset 2089 | f6d8dea92b39 |
parent 2055 | 8899d6ef5d52 |
child 2146 | 40ad60ac9912 |
permissions | -rw-r--r-- |
1956 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2005,2006 INRIA |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License version 2 as |
|
7 |
* published by the Free Software Foundation; |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
* |
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
|
19 |
*/ |
|
20 |
#include "ns3/packet.h" |
|
21 |
#include "ns3/llc-snap-header.h" |
|
22 |
#include "ns3/node.h" |
|
2053
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
23 |
#include "ns3/composite-trace-resolver.h" |
1956 | 24 |
|
25 |
#include "wifi-net-device.h" |
|
26 |
#include "wifi-phy.h" |
|
27 |
#include "wifi-channel.h" |
|
28 |
#include "mac-stations.h" |
|
29 |
#include "mac-low.h" |
|
30 |
#include "mac-parameters.h" |
|
31 |
#include "mac-rx-middle.h" |
|
32 |
#include "mac-tx-middle.h" |
|
33 |
#include "mac-high-adhoc.h" |
|
34 |
#include "mac-high-nqsta.h" |
|
35 |
#include "mac-high-nqap.h" |
|
36 |
#include "dca-txop.h" |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
37 |
#include "wifi-default-parameters.h" |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
38 |
#include "arf-mac-stations.h" |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
39 |
#include "aarf-mac-stations.h" |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
40 |
#include "ideal-mac-stations.h" |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
41 |
#include "cr-mac-stations.h" |
1956 | 42 |
|
43 |
namespace ns3 { |
|
44 |
||
2053
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
45 |
WifiNetDeviceTraceType::WifiNetDeviceTraceType () |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
46 |
: m_type (RX) |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
47 |
{} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
48 |
|
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
49 |
WifiNetDeviceTraceType::WifiNetDeviceTraceType (enum Type type) |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
50 |
: m_type (type) |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
51 |
{} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
52 |
enum WifiNetDeviceTraceType::Type |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
53 |
WifiNetDeviceTraceType::Get (void) const |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
54 |
{ |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
55 |
return m_type; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
56 |
} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
57 |
uint16_t |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
58 |
WifiNetDeviceTraceType::GetUid (void) |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
59 |
{ |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
60 |
static uint16_t uid = AllocateUid<WifiNetDeviceTraceType> ("ns3::WifiNetDeviceTraceType"); |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
61 |
return uid; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
62 |
} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
63 |
void |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
64 |
WifiNetDeviceTraceType::Print (std::ostream &os) const |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
65 |
{ |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
66 |
os << "event="; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
67 |
switch (m_type) { |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
68 |
case RX: |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
69 |
os << "rx"; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
70 |
break; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
71 |
case TX: |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
72 |
os << "tx"; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
73 |
break; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
74 |
} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
75 |
} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
76 |
std::string |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
77 |
WifiNetDeviceTraceType::GetTypeName (void) const |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
78 |
{ |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
79 |
return "ns3::WifiNetDeviceTraceType"; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
80 |
} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
81 |
|
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
82 |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
83 |
static WifiMode |
2054
ba8e810bae4c
derive WifiPhy from Object and manage it with a Ptr<>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2053
diff
changeset
|
84 |
GetWifiModeForPhyMode (Ptr<WifiPhy> phy, enum WifiDefaultParameters::PhyModeParameter mode) |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
85 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
86 |
uint32_t phyRate = (uint32_t)mode; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
87 |
for (uint32_t i= 0; i < phy->GetNModes (); i++) |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
88 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
89 |
WifiMode mode = phy->GetMode (i); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
90 |
if (mode.GetPhyRate () == phyRate) |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
91 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
92 |
return mode; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
93 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
94 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
95 |
NS_ASSERT (false); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
96 |
return WifiMode (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
97 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
98 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
99 |
|
1956 | 100 |
WifiNetDevice::WifiNetDevice (Ptr<Node> node) |
101 |
: NetDevice (node, Mac48Address::Allocate ()) |
|
102 |
{ |
|
103 |
SetMtu (2300); |
|
104 |
EnableBroadcast (Mac48Address ("ff:ff:ff:ff:ff:ff")); |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
105 |
Construct (); |
1956 | 106 |
} |
107 |
||
108 |
WifiNetDevice::~WifiNetDevice () |
|
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
109 |
{} |
1956 | 110 |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
111 |
void |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
112 |
WifiNetDevice::Construct (void) |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
113 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
114 |
// the physical layer. |
2054
ba8e810bae4c
derive WifiPhy from Object and manage it with a Ptr<>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2053
diff
changeset
|
115 |
m_phy = Create<WifiPhy> (this); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
116 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
117 |
// the rate control algorithm |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
118 |
switch (WifiDefaultParameters::GetRateControlAlgorithm ()) { |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
119 |
case WifiDefaultParameters::ARF: |
2004
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
120 |
m_stations = new ArfMacStations (m_phy->GetMode (0), |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
121 |
WifiDefaultParameters::GetArfRateControlTimerThreshold (), |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
122 |
WifiDefaultParameters::GetArfRateControlSuccessThreshold ()); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
123 |
break; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
124 |
case WifiDefaultParameters::AARF: |
2004
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
125 |
m_stations = new AarfMacStations (m_phy->GetMode (0), |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
126 |
WifiDefaultParameters::GetAarfRateControlMinTimerThreshold (), |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
127 |
WifiDefaultParameters::GetAarfRateControlMinSuccessThreshold (), |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
128 |
WifiDefaultParameters::GetAarfRateControlSuccessK (), |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
129 |
WifiDefaultParameters::GetAarfRateControlMaxSuccessThreshold (), |
59eb6fb7b722
control the rate control algorithms with default values.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2003
diff
changeset
|
130 |
WifiDefaultParameters::GetAarfRateControlTimerK ()); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
131 |
break; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
132 |
case WifiDefaultParameters::CONSTANT_RATE: { |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
133 |
WifiMode dataRate = GetWifiModeForPhyMode (m_phy, WifiDefaultParameters::GetConstantDataRate ()); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
134 |
WifiMode ctlRate = GetWifiModeForPhyMode (m_phy, WifiDefaultParameters::GetConstantCtlRate ()); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
135 |
m_stations = new CrMacStations (dataRate, ctlRate); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
136 |
} break; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
137 |
case WifiDefaultParameters::IDEAL: { |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
138 |
double ber = WifiDefaultParameters::GetIdealRateControlBer (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
139 |
IdealMacStations *ideal = new IdealMacStations (m_phy->GetMode (0)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
140 |
uint32_t nModes = m_phy->GetNModes (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
141 |
for (uint32_t i = 0; i < nModes; i++) |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
142 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
143 |
WifiMode mode = m_phy->GetMode (i); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
144 |
ideal->AddModeSnrThreshold (mode, m_phy->CalculateSnr (mode, ber)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
145 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
146 |
m_stations = ideal; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
147 |
} break; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
148 |
default: |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
149 |
// NOTREACHED |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
150 |
NS_ASSERT (false); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
151 |
break; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
152 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
153 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
154 |
// MacParameters |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
155 |
MacParameters *parameters = new MacParameters (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
156 |
WifiMacHeader hdr; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
157 |
hdr.SetType (WIFI_MAC_CTL_CTS); |
1994
72e228d070f4
make sure that ack and cts delay take into account the fcs padding.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1969
diff
changeset
|
158 |
Time ctsDelay = m_phy->CalculateTxDuration (hdr.GetSize () + 4, m_phy->GetMode (0), WIFI_PREAMBLE_LONG); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
159 |
hdr.SetType (WIFI_MAC_CTL_ACK); |
1994
72e228d070f4
make sure that ack and cts delay take into account the fcs padding.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1969
diff
changeset
|
160 |
Time ackDelay = m_phy->CalculateTxDuration (hdr.GetSize () + 4, m_phy->GetMode (0), WIFI_PREAMBLE_LONG); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
161 |
parameters->Initialize (ctsDelay, ackDelay); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
162 |
m_parameters = parameters; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
163 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
164 |
// the MacLow |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
165 |
MacLow *low = new MacLow (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
166 |
low->SetDevice (this); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
167 |
low->SetPhy (m_phy); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
168 |
low->SetStations (m_stations); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
169 |
low->SetParameters (m_parameters); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
170 |
m_phy->SetReceiveOkCallback (MakeCallback (&MacLow::ReceiveOk, low)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
171 |
m_phy->SetReceiveErrorCallback (MakeCallback (&MacLow::ReceiveError, low)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
172 |
m_low = low; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
173 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
174 |
// the 'middle' rx |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
175 |
MacRxMiddle *rxMiddle = new MacRxMiddle (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
176 |
low->SetRxCallback (MakeCallback (&MacRxMiddle::Receive, rxMiddle)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
177 |
m_rxMiddle = rxMiddle; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
178 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
179 |
// the 'middle' tx |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
180 |
MacTxMiddle *txMiddle = new MacTxMiddle (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
181 |
m_txMiddle = txMiddle; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
182 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
183 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
184 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
185 |
DcaTxop * |
1969
a3803bfd94f9
fix valgrind warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
186 |
WifiNetDevice::CreateDca (uint32_t minCw, uint32_t maxCw) const |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
187 |
{ |
1969
a3803bfd94f9
fix valgrind warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
188 |
DcaTxop *dca = new DcaTxop (minCw, maxCw); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
189 |
dca->SetParameters (m_parameters); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
190 |
dca->SetTxMiddle (m_txMiddle); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
191 |
dca->SetLow (m_low); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
192 |
dca->SetPhy (m_phy); |
1969
a3803bfd94f9
fix valgrind warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
193 |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
194 |
Time difs = m_parameters->GetSifs () + |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
195 |
m_parameters->GetSlotTime () + |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
196 |
m_parameters->GetSlotTime (); |
1994
72e228d070f4
make sure that ack and cts delay take into account the fcs padding.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1969
diff
changeset
|
197 |
// see 802.11 p85 section 9.2.10 |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
198 |
Time eifs = difs + m_parameters->GetSifs () + |
1995
ece7db093222
eifs calculation is wrong: match the spec.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1994
diff
changeset
|
199 |
m_phy->CalculateTxDuration (8 * (2+2+6+4), m_phy->GetMode (0), WIFI_PREAMBLE_LONG); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
200 |
dca->SetDifs (difs); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
201 |
dca->SetEifs (eifs); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
202 |
dca->SetMaxQueueSize (400); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
203 |
dca->SetMaxQueueDelay (Seconds (10)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
204 |
return dca; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
205 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
206 |
|
2053
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
207 |
Ptr<TraceResolver> |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
208 |
WifiNetDevice::GetTraceResolver (void) const |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
209 |
{ |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
210 |
Ptr<CompositeTraceResolver> resolver = |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
211 |
Create<CompositeTraceResolver> (); |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
212 |
resolver->AddSource ("rx", |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
213 |
TraceDoc ("Receive a packet", |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
214 |
"Packet", "the packet received", |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
215 |
"Mac48Address", "the sender of the packet"), |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
216 |
m_rxLogger, |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
217 |
WifiNetDeviceTraceType (WifiNetDeviceTraceType::RX)); |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
218 |
resolver->AddSource ("tx", |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
219 |
TraceDoc ("Send a packet", |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
220 |
"Packet", "the packet to send", |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
221 |
"Mac48Address", "the destination of the packet"), |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
222 |
m_txLogger, |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
223 |
WifiNetDeviceTraceType (WifiNetDeviceTraceType::TX)); |
2055
8899d6ef5d52
phy state logger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2054
diff
changeset
|
224 |
resolver->AddComposite ("phy", m_phy); |
2053
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
225 |
resolver->SetParentResolver (NetDevice::GetTraceResolver ()); |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
226 |
return resolver; |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
227 |
} |
012487e16e31
basic tracing support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2010
diff
changeset
|
228 |
|
1956 | 229 |
void |
230 |
WifiNetDevice::ConnectTo (Ptr<WifiChannel> channel) |
|
231 |
{ |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
232 |
m_channel = channel; |
1956 | 233 |
m_phy->SetChannel (channel); |
234 |
NotifyConnected (); |
|
235 |
} |
|
236 |
bool |
|
237 |
WifiNetDevice::SendTo (const Packet &packet, const Address &to, uint16_t protocolNumber) |
|
238 |
{ |
|
239 |
NS_ASSERT (Mac48Address::IsMatchingType (to)); |
|
240 |
||
241 |
Mac48Address realTo = Mac48Address::ConvertFrom (to); |
|
242 |
||
243 |
Packet p = packet; |
|
244 |
||
245 |
LlcSnapHeader llc; |
|
246 |
llc.SetType (protocolNumber); |
|
247 |
p.AddHeader (llc); |
|
248 |
||
249 |
m_txLogger (p, realTo); |
|
250 |
||
251 |
return DoSendTo (p, realTo); |
|
252 |
} |
|
253 |
void |
|
254 |
WifiNetDevice::DoForwardUp (Packet packet, const Mac48Address &from) |
|
255 |
{ |
|
256 |
m_rxLogger (packet, from); |
|
257 |
||
258 |
LlcSnapHeader llc; |
|
259 |
packet.RemoveHeader (llc); |
|
260 |
NetDevice::ForwardUp (packet, llc.GetType (), from); |
|
261 |
} |
|
262 |
Mac48Address |
|
263 |
WifiNetDevice::GetSelfAddress (void) const |
|
264 |
{ |
|
265 |
NS_ASSERT (Mac48Address::IsMatchingType (GetAddress ())); |
|
266 |
Mac48Address self = Mac48Address::ConvertFrom (GetAddress ()); |
|
267 |
return self; |
|
268 |
} |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
269 |
bool |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
270 |
WifiNetDevice::DoNeedsArp (void) const |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
271 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
272 |
return true; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
273 |
} |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
274 |
Ptr<Channel> |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
275 |
WifiNetDevice::DoGetChannel (void) const |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
276 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
277 |
return m_channel; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
278 |
} |
1998
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
279 |
void |
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
280 |
WifiNetDevice::DoDispose (void) |
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
281 |
{ |
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
282 |
// chain up. |
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
283 |
NetDevice::DoDispose (); |
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
284 |
// cleanup local |
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
285 |
m_channel = 0; |
1999
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
286 |
delete m_stations; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
287 |
delete m_low; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
288 |
delete m_rxMiddle; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
289 |
delete m_txMiddle; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
290 |
delete m_parameters; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
291 |
m_phy = 0; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
292 |
m_stations = 0; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
293 |
m_low = 0; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
294 |
m_rxMiddle = 0; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
295 |
m_txMiddle = 0; |
9c279e6ebb20
dispose everything from WifiNetDevice::DoDispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1998
diff
changeset
|
296 |
m_parameters = 0; |
1998
41cd4e5694c2
dispose the channel from WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1995
diff
changeset
|
297 |
} |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
298 |
|
1956 | 299 |
|
300 |
/***************************************************** |
|
301 |
* Adhoc code |
|
302 |
*****************************************************/ |
|
303 |
||
304 |
AdhocWifiNetDevice::AdhocWifiNetDevice (Ptr<Node> node) |
|
305 |
: WifiNetDevice (node) |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
306 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
307 |
m_ssid = WifiDefaultParameters::GetSsid (); |
1969
a3803bfd94f9
fix valgrind warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
308 |
m_dca = CreateDca (15, 1023); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
309 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
310 |
MacHighAdhoc *high = new MacHighAdhoc (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
311 |
high->SetDevice (this); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
312 |
high->SetDcaTxop (m_dca); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
313 |
high->SetForwardCallback (MakeCallback (&AdhocWifiNetDevice::DoForwardUp, |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
314 |
static_cast<WifiNetDevice *> (this))); |
2003
335dc094e52a
support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2002
diff
changeset
|
315 |
high->SetPhy (m_phy); |
335dc094e52a
support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2002
diff
changeset
|
316 |
high->SetStations (m_stations); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
317 |
m_rxMiddle->SetForwardCallback (MakeCallback (&MacHighAdhoc::Receive, high)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
318 |
m_high = high; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
319 |
} |
1956 | 320 |
AdhocWifiNetDevice::~AdhocWifiNetDevice () |
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
321 |
{} |
1956 | 322 |
Mac48Address |
323 |
AdhocWifiNetDevice::GetBssid (void) const |
|
324 |
{ |
|
325 |
return m_high->GetBssid (); |
|
326 |
} |
|
327 |
Ssid |
|
328 |
AdhocWifiNetDevice::GetSsid (void) const |
|
329 |
{ |
|
330 |
return m_ssid; |
|
331 |
} |
|
332 |
void |
|
333 |
AdhocWifiNetDevice::SetSsid (Ssid ssid) |
|
334 |
{ |
|
335 |
// XXX restart adhoc network join. |
|
336 |
m_ssid = ssid; |
|
337 |
} |
|
338 |
bool |
|
339 |
AdhocWifiNetDevice::DoSendTo (const Packet &packet, Mac48Address const &to) |
|
340 |
{ |
|
341 |
m_high->Enqueue (packet, to); |
|
342 |
return true; |
|
343 |
} |
|
344 |
void |
|
345 |
AdhocWifiNetDevice::NotifyConnected (void) |
|
346 |
{ |
|
347 |
NotifyLinkUp (); |
|
348 |
} |
|
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
349 |
void |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
350 |
AdhocWifiNetDevice::DoDispose (void) |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
351 |
{ |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
352 |
// chain up. |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
353 |
WifiNetDevice::DoDispose (); |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
354 |
// local cleanup |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
355 |
delete m_dca; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
356 |
delete m_high; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
357 |
m_dca = 0; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
358 |
m_high = 0; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
359 |
} |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
360 |
|
1956 | 361 |
|
362 |
/***************************************************** |
|
363 |
* STA code |
|
364 |
*****************************************************/ |
|
365 |
||
366 |
NqstaWifiNetDevice::NqstaWifiNetDevice (Ptr<Node> node) |
|
367 |
: WifiNetDevice (node) |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
368 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
369 |
m_ssid = WifiDefaultParameters::GetSsid (); |
1969
a3803bfd94f9
fix valgrind warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
370 |
m_dca = CreateDca (15, 1023); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
371 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
372 |
MacHighNqsta *high = new MacHighNqsta (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
373 |
high->SetDevice (this); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
374 |
high->SetDcaTxop (m_dca); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
375 |
high->SetForwardCallback (MakeCallback (&NqstaWifiNetDevice::DoForwardUp, |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
376 |
this)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
377 |
high->SetAssociatedCallback (MakeCallback (&NqstaWifiNetDevice::Associated, |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
378 |
this)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
379 |
high->SetDisAssociatedCallback (MakeCallback (&NqstaWifiNetDevice::DisAssociated, |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
380 |
this)); |
2009
afed751cc0b5
dynamically update the list of supported rates based on the ap supported rates
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2004
diff
changeset
|
381 |
high->SetStations (m_stations); |
afed751cc0b5
dynamically update the list of supported rates based on the ap supported rates
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2004
diff
changeset
|
382 |
high->SetPhy (m_phy); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
383 |
m_rxMiddle->SetForwardCallback (MakeCallback (&MacHighNqsta::Receive, high)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
384 |
m_high = high; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
385 |
} |
1956 | 386 |
NqstaWifiNetDevice::~NqstaWifiNetDevice () |
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
387 |
{} |
1956 | 388 |
Mac48Address |
389 |
NqstaWifiNetDevice::GetBssid (void) const |
|
390 |
{ |
|
391 |
return m_high->GetBssid (); |
|
392 |
} |
|
393 |
Ssid |
|
394 |
NqstaWifiNetDevice::GetSsid (void) const |
|
395 |
{ |
|
396 |
return m_ssid; |
|
397 |
} |
|
398 |
void |
|
399 |
NqstaWifiNetDevice::StartActiveAssociation (Ssid ssid) |
|
400 |
{ |
|
401 |
m_ssid = ssid; |
|
402 |
m_high->StartActiveAssociation (); |
|
403 |
} |
|
404 |
bool |
|
405 |
NqstaWifiNetDevice::DoSendTo (const Packet &packet, Mac48Address const &to) |
|
406 |
{ |
|
407 |
m_high->Queue (packet, to); |
|
408 |
return true; |
|
409 |
} |
|
410 |
void |
|
411 |
NqstaWifiNetDevice::NotifyConnected (void) |
|
412 |
{ |
|
413 |
// do nothing because link status is kept track of in |
|
414 |
// ::Associated and ::Disassociated |
|
415 |
} |
|
416 |
void |
|
417 |
NqstaWifiNetDevice::Associated (void) |
|
418 |
{ |
|
419 |
NetDevice::NotifyLinkUp (); |
|
420 |
} |
|
421 |
||
422 |
void |
|
423 |
NqstaWifiNetDevice::DisAssociated (void) |
|
424 |
{ |
|
425 |
NetDevice::NotifyLinkDown (); |
|
426 |
} |
|
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
427 |
void |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
428 |
NqstaWifiNetDevice::DoDispose (void) |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
429 |
{ |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
430 |
// chain up. |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
431 |
WifiNetDevice::DoDispose (); |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
432 |
// local cleanup |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
433 |
delete m_dca; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
434 |
delete m_high; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
435 |
m_dca = 0; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
436 |
m_high = 0; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
437 |
} |
1956 | 438 |
|
439 |
||
440 |
/***************************************************** |
|
441 |
* AP code |
|
442 |
*****************************************************/ |
|
443 |
||
444 |
||
445 |
NqapWifiNetDevice::NqapWifiNetDevice (Ptr<Node> node) |
|
446 |
: WifiNetDevice (node) |
|
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
447 |
{ |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
448 |
m_ssid = WifiDefaultParameters::GetSsid (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
449 |
|
1969
a3803bfd94f9
fix valgrind warning
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
450 |
m_dca = CreateDca (15, 1023); |
2089
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
451 |
m_beaconDca = CreateDca (15, 1023); |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
452 |
/** |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
453 |
* We use a DIFS value for the beacons smaller than the 802.11 default |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
454 |
* value to ensure that the beacon queue will get access to the medium |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
455 |
* even when a lot of data has been queued. This is an 'extension' of |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
456 |
* 802.11 which is a first step towards 802.11e but it is a nice way |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
457 |
* to get timely beacons without a lot of other hacks. |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
458 |
*/ |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
459 |
Time beaconDifs = m_parameters->GetSifs () + m_parameters->GetSlotTime (); |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
460 |
m_beaconDca->SetDifs (beaconDifs); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
461 |
|
2010
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
462 |
// By default, we configure the Basic Rate Set to be the set |
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
463 |
// of rates we support which are mandatory. |
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
464 |
// This could be trivially made user-configurable |
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
465 |
for (uint32_t i = 0; i < m_phy->GetNModes (); i++) |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
466 |
{ |
2003
335dc094e52a
support BRAND_NEW station in adhoc code. initialize the supported rates.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2002
diff
changeset
|
467 |
WifiMode mode = m_phy->GetMode (i); |
2010
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
468 |
if (mode.IsMandatory ()) |
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
469 |
{ |
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
470 |
m_stations->AddBasicMode (mode); |
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
471 |
} |
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
472 |
} |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
473 |
|
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
474 |
MacHighNqap *high = new MacHighNqap (); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
475 |
high->SetDevice (this); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
476 |
high->SetDcaTxop (m_dca); |
2089
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
477 |
high->SetBeaconDcaTxop (m_beaconDca); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
478 |
high->SetStations (m_stations); |
2010
e2e16c1712c8
handle the BasicRateSet in the AP
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2009
diff
changeset
|
479 |
high->SetPhy (m_phy); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
480 |
high->SetForwardCallback (MakeCallback (&NqapWifiNetDevice::DoForwardUp, |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
481 |
this)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
482 |
m_rxMiddle->SetForwardCallback (MakeCallback (&MacHighNqap::Receive, high)); |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
483 |
m_high = high; |
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1956
diff
changeset
|
484 |
} |
1956 | 485 |
NqapWifiNetDevice::~NqapWifiNetDevice () |
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
486 |
{} |
1956 | 487 |
Mac48Address |
488 |
NqapWifiNetDevice::GetBssid (void) const |
|
489 |
{ |
|
490 |
return GetSelfAddress (); |
|
491 |
} |
|
492 |
Ssid |
|
493 |
NqapWifiNetDevice::GetSsid (void) const |
|
494 |
{ |
|
495 |
return m_ssid; |
|
496 |
} |
|
497 |
void |
|
498 |
NqapWifiNetDevice::SetSsid (Ssid ssid) |
|
499 |
{ |
|
500 |
m_ssid = ssid; |
|
501 |
} |
|
2089
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
502 |
void |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
503 |
NqapWifiNetDevice::StartBeaconing (void) |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
504 |
{ |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
505 |
m_high->StartBeaconing (); |
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
506 |
} |
1956 | 507 |
bool |
508 |
NqapWifiNetDevice::DoSendTo (const Packet &packet, Mac48Address const & to) |
|
509 |
{ |
|
510 |
m_high->Queue (packet, to); |
|
511 |
return true; |
|
512 |
} |
|
513 |
void |
|
514 |
NqapWifiNetDevice::NotifyConnected (void) |
|
515 |
{ |
|
516 |
NotifyLinkUp (); |
|
517 |
} |
|
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
518 |
void |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
519 |
NqapWifiNetDevice::DoDispose (void) |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
520 |
{ |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
521 |
// chain up. |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
522 |
WifiNetDevice::DoDispose (); |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
523 |
// local cleanup |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
524 |
delete m_dca; |
2089
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
525 |
delete m_beaconDca; |
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
526 |
delete m_high; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
527 |
m_dca = 0; |
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
528 |
m_high = 0; |
2089
f6d8dea92b39
implement AP beaconing
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2055
diff
changeset
|
529 |
m_beaconDca = 0; |
2002
32903f9a7315
add dispose methods in subclasses of WifiNetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1999
diff
changeset
|
530 |
} |
1956 | 531 |
|
532 |
||
533 |
} // namespace ns3 |
|
534 |