A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
hwmp-reactive-regression.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Kirill Andreev <andreev@iitp.ru>
7
*/
8
#include "ns3/ipv4-interface-container.h"
9
#include "ns3/node-container.h"
10
#include "ns3/nstime.h"
11
#include "ns3/pcap-file.h"
12
#include "ns3/test.h"
13
14
using namespace
ns3
;
15
16
/**
17
* \ingroup dot11s-test
18
*
19
* \brief test for multihop path establishing and path error
20
* procedures
21
* Initiate scenario with 6 stations. Procedure of opening peer link
22
* is the following: (PMP routines are not shown)
23
* \verbatim
24
* 0 1 2 3 4 5
25
* | | | | |<---|---> ARP request (2.002s)
26
* |....|....|....|....|....| ARP requests (continued)
27
* |<---|--->| | | | ARP request
28
* <---|--->| | | | | PREQ } This order is broken
29
* <---|--->| | | | | ARP request} due to BroadcastDca
30
* |<---|--->| | | | PREQ 2.00468s)
31
* |....|....|....|....|....| ARP request
32
* | | | |<---|--->| PREQ (2.00621s)
33
* | | | | |<---| PREP
34
* |....|....|....|....|....| PREP (continued)
35
* |<---| | | | | PREP (2.00808s)
36
* |--->| | | | | ARP reply (2.0084s)
37
* |....|....|....|....|....| ARP replies
38
* | | | | |--->| ARP reply (2.01049s)
39
* | | | | |<---| Data (2.01059s)
40
* |....|....|....|....|....| Data (continued)
41
* |<---| | | | | Data
42
* <---|--->| | | | | ARP request (2.02076s)
43
* |....|....|....|....|....| ARP requests (continued)
44
* | | | | |<---|---> ARP request
45
* | | | | |<---| ARP reply (2.02281s)
46
* |....|....|....|....|....| ARP replies (continued)
47
* |<---| | | | | ARP reply
48
* |--->| | | | | Data
49
* At 5s, station number 3 disappears, and PERR is forwarded from 2 to 0
50
* and from 4 to 5, and station 5 starts path discovery procedure
51
* again:
52
* | |<---| |--->| PERR (one due to beacon loss and one due to TX error)
53
* |<---| | | | PERR
54
* | | | |<---|---> PREQ
55
* | | | <---|--->| PREQ
56
* |....|....|.........|....| Repeated attempts of PREQ
57
* \endverbatim
58
*/
59
60
class
HwmpReactiveRegressionTest
:
public
TestCase
61
{
62
public
:
63
HwmpReactiveRegressionTest
();
64
~HwmpReactiveRegressionTest
()
override
;
65
66
void
DoRun
()
override
;
67
/// Check results function
68
void
CheckResults
();
69
70
private
:
71
/// \internal It is important to have pointers here
72
NodeContainer
*
m_nodes
;
73
/// Simulation time
74
Time
m_time
;
75
Ipv4InterfaceContainer
m_interfaces
;
///< interfaces
76
77
/// Create nodes function
78
void
CreateNodes
();
79
/// Create devices function
80
void
CreateDevices
();
81
/// Install application function
82
void
InstallApplications
();
83
/// Reset position function
84
void
ResetPosition
();
85
86
/// Server-side socket
87
Ptr<Socket>
m_serverSocket
;
88
/// Client-side socket
89
Ptr<Socket>
m_clientSocket
;
90
91
/// sent packets counter
92
uint32_t
m_sentPktsCounter
;
93
94
/**
95
* Send data
96
* \param socket the sending socket
97
*/
98
void
SendData
(
Ptr<Socket>
socket);
99
100
/**
101
* \brief Handle a packet reception.
102
*
103
* This function is called by lower layers.
104
*
105
* \param socket the socket the packet was received to.
106
*/
107
void
HandleReadServer
(
Ptr<Socket>
socket);
108
109
/**
110
* \brief Handle a packet reception.
111
*
112
* This function is called by lower layers.
113
*
114
* \param socket the socket the packet was received to.
115
*/
116
void
HandleReadClient
(
Ptr<Socket>
socket);
117
};
HwmpReactiveRegressionTest
test for multihop path establishing and path error procedures Initiate scenario with 6 stations.
Definition
hwmp-reactive-regression.h:61
HwmpReactiveRegressionTest::m_nodes
NodeContainer * m_nodes
Definition
hwmp-reactive-regression.h:72
HwmpReactiveRegressionTest::ResetPosition
void ResetPosition()
Reset position function.
Definition
hwmp-reactive-regression.cc:151
HwmpReactiveRegressionTest::SendData
void SendData(Ptr< Socket > socket)
Send data.
Definition
hwmp-reactive-regression.cc:163
HwmpReactiveRegressionTest::CreateDevices
void CreateDevices()
Create devices function.
Definition
hwmp-reactive-regression.cc:105
HwmpReactiveRegressionTest::m_interfaces
Ipv4InterfaceContainer m_interfaces
interfaces
Definition
hwmp-reactive-regression.h:75
HwmpReactiveRegressionTest::CreateNodes
void CreateNodes()
Create nodes function.
Definition
hwmp-reactive-regression.cc:62
HwmpReactiveRegressionTest::HwmpReactiveRegressionTest
HwmpReactiveRegressionTest()
Definition
hwmp-reactive-regression.cc:31
HwmpReactiveRegressionTest::CheckResults
void CheckResults()
Check results function.
Definition
hwmp-reactive-regression.cc:142
HwmpReactiveRegressionTest::m_clientSocket
Ptr< Socket > m_clientSocket
Client-side socket.
Definition
hwmp-reactive-regression.h:89
HwmpReactiveRegressionTest::HandleReadServer
void HandleReadServer(Ptr< Socket > socket)
Handle a packet reception.
Definition
hwmp-reactive-regression.cc:178
HwmpReactiveRegressionTest::m_sentPktsCounter
uint32_t m_sentPktsCounter
sent packets counter
Definition
hwmp-reactive-regression.h:92
HwmpReactiveRegressionTest::~HwmpReactiveRegressionTest
~HwmpReactiveRegressionTest() override
Definition
hwmp-reactive-regression.cc:39
HwmpReactiveRegressionTest::m_time
Time m_time
Simulation time.
Definition
hwmp-reactive-regression.h:74
HwmpReactiveRegressionTest::HandleReadClient
void HandleReadClient(Ptr< Socket > socket)
Handle a packet reception.
Definition
hwmp-reactive-regression.cc:192
HwmpReactiveRegressionTest::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
hwmp-reactive-regression.cc:45
HwmpReactiveRegressionTest::m_serverSocket
Ptr< Socket > m_serverSocket
Server-side socket.
Definition
hwmp-reactive-regression.h:87
HwmpReactiveRegressionTest::InstallApplications
void InstallApplications()
Install application function.
Definition
hwmp-reactive-regression.cc:81
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition
ipv4-interface-container.h:45
ns3::NodeContainer
keep track of a set of node pointers.
Definition
node-container.h:29
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TestCase
encapsulates test code
Definition
test.h:1050
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mesh
test
dot11s
hwmp-reactive-regression.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0