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
9
#ifndef HWMP_REACTIVE_REGRESSION_H
10
#define HWMP_REACTIVE_REGRESSION_H
11
12
#include "ns3/ipv4-interface-container.h"
13
#include "ns3/node-container.h"
14
#include "ns3/nstime.h"
15
#include "ns3/pcap-file.h"
16
#include "ns3/test.h"
17
18
using namespace
ns3
;
19
20
/**
21
* @ingroup dot11s-test
22
*
23
* @brief test for multihop path establishing and path error
24
* procedures
25
* Initiate scenario with 6 stations. Procedure of opening peer link
26
* is the following: (PMP routines are not shown)
27
* @verbatim
28
* 0 1 2 3 4 5
29
* | | | | |<---|---> ARP request (2.002s)
30
* |....|....|....|....|....| ARP requests (continued)
31
* |<---|--->| | | | ARP request
32
* <---|--->| | | | | PREQ } This order is broken
33
* <---|--->| | | | | ARP request} due to BroadcastDca
34
* |<---|--->| | | | PREQ 2.00468s)
35
* |....|....|....|....|....| ARP request
36
* | | | |<---|--->| PREQ (2.00621s)
37
* | | | | |<---| PREP
38
* |....|....|....|....|....| PREP (continued)
39
* |<---| | | | | PREP (2.00808s)
40
* |--->| | | | | ARP reply (2.0084s)
41
* |....|....|....|....|....| ARP replies
42
* | | | | |--->| ARP reply (2.01049s)
43
* | | | | |<---| Data (2.01059s)
44
* |....|....|....|....|....| Data (continued)
45
* |<---| | | | | Data
46
* <---|--->| | | | | ARP request (2.02076s)
47
* |....|....|....|....|....| ARP requests (continued)
48
* | | | | |<---|---> ARP request
49
* | | | | |<---| ARP reply (2.02281s)
50
* |....|....|....|....|....| ARP replies (continued)
51
* |<---| | | | | ARP reply
52
* |--->| | | | | Data
53
* At 5s, station number 3 disappears, and PERR is forwarded from 2 to 0
54
* and from 4 to 5, and station 5 starts path discovery procedure
55
* again:
56
* | |<---| |--->| PERR (one due to beacon loss and one due to TX error)
57
* |<---| | | | PERR
58
* | | | |<---|---> PREQ
59
* | | | <---|--->| PREQ
60
* |....|....|.........|....| Repeated attempts of PREQ
61
* @endverbatim
62
*/
63
64
class
HwmpReactiveRegressionTest
:
public
TestCase
65
{
66
public
:
67
HwmpReactiveRegressionTest
();
68
~HwmpReactiveRegressionTest
()
override
;
69
70
void
DoRun
()
override
;
71
/// Check results function
72
void
CheckResults
();
73
74
private
:
75
/// @internal It is important to have pointers here
76
NodeContainer
*
m_nodes
;
77
/// Simulation time
78
Time
m_time
;
79
Ipv4InterfaceContainer
m_interfaces
;
///< interfaces
80
81
/// Create nodes function
82
void
CreateNodes
();
83
/// Create devices function
84
void
CreateDevices
();
85
/// Install application function
86
void
InstallApplications
();
87
/// Reset position function
88
void
ResetPosition
();
89
90
/// Server-side socket
91
Ptr<Socket>
m_serverSocket
;
92
/// Client-side socket
93
Ptr<Socket>
m_clientSocket
;
94
95
/// sent packets counter
96
uint32_t
m_sentPktsCounter
;
97
98
/**
99
* Send data
100
* @param socket the sending socket
101
*/
102
void
SendData
(
Ptr<Socket>
socket);
103
104
/**
105
* @brief Handle a packet reception.
106
*
107
* This function is called by lower layers.
108
*
109
* @param socket the socket the packet was received to.
110
*/
111
void
HandleReadServer
(
Ptr<Socket>
socket);
112
113
/**
114
* @brief Handle a packet reception.
115
*
116
* This function is called by lower layers.
117
*
118
* @param socket the socket the packet was received to.
119
*/
120
void
HandleReadClient
(
Ptr<Socket>
socket);
121
};
122
123
#endif
// HWMP_REACTIVE_REGRESSION_H
HwmpReactiveRegressionTest::m_nodes
NodeContainer * m_nodes
Definition
hwmp-reactive-regression.h:76
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:79
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:93
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:96
HwmpReactiveRegressionTest::~HwmpReactiveRegressionTest
~HwmpReactiveRegressionTest() override
Definition
hwmp-reactive-regression.cc:39
HwmpReactiveRegressionTest::m_time
Time m_time
Simulation time.
Definition
hwmp-reactive-regression.h:78
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:91
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
ptr.h:70
ns3::TestCase::TestCase
TestCase(const TestCase &)=delete
Caller graph was not generated because of its size.
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:96
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
for ns-3 by
1.15.0