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-proactive-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
#include "ns3/ipv4-interface-container.h"
10
#include "ns3/node-container.h"
11
#include "ns3/nstime.h"
12
#include "ns3/pcap-file.h"
13
#include "ns3/test.h"
14
15
using namespace
ns3
;
16
17
/**
18
* \ingroup dot11s-test
19
*
20
* \brief There are 5 stations set into a row, the center station is root.
21
* Regression test indicates that traffic goes from the first to the
22
* last stations without reactive route discovery procedure
23
* \verbatim
24
* Src Root Dst
25
* (node ID) 0 1 2 3 4
26
* (MAC) 00:01 00:02 00:03 00:04 00:05
27
* | |<--------|-------->| | Proactive PREQ
28
* | |-------->| | | PREP
29
* | | |<--------| | PREP
30
* |<--------|-------->|<--------|-------->| Proactive PREQ
31
* |-------->| | |<--------| PREP
32
* | |-------->| | | PREP
33
* | | |<--------| | PREP
34
* <--------|-------->| | |<--------|--------> Proactive PREQ
35
* Note, that at this moment all routes are known, and no reactive
36
* path discovery procedure shall be initiated
37
* | | |<--------|-------->| ARP request
38
* |.........|.........|.........|.........|
39
* <--------|-------->| | | | ARP request
40
* |-------->| | | | ARP reply
41
* |.........|.........|.........|.........|
42
* | | | |-------->| ARP reply
43
* | | | |<--------| DATA
44
* ^
45
* Further data is forwarded by proactive path
46
* \endverbatim
47
*
48
*/
49
class
HwmpProactiveRegressionTest
:
public
TestCase
50
{
51
public
:
52
HwmpProactiveRegressionTest
();
53
~HwmpProactiveRegressionTest
()
override
;
54
55
void
DoRun
()
override
;
56
/// Check results function
57
void
CheckResults
();
58
59
private
:
60
/// \internal It is important to have pointers here
61
NodeContainer
*
m_nodes
;
62
/// Simulation time
63
Time
m_time
;
64
Ipv4InterfaceContainer
m_interfaces
;
///< interfaces
65
66
/// Create nodes function
67
void
CreateNodes
();
68
/// Create devices function
69
void
CreateDevices
();
70
/// Install application function
71
void
InstallApplications
();
72
/// Reset position function
73
void
ResetPosition
();
74
75
/// Server-side socket
76
Ptr<Socket>
m_serverSocket
;
77
/// Client-side socket
78
Ptr<Socket>
m_clientSocket
;
79
80
/// sent packets counter
81
uint32_t
m_sentPktsCounter
;
82
83
/**
84
* Send data
85
* \param socket the sending socket
86
*/
87
void
SendData
(
Ptr<Socket>
socket);
88
89
/**
90
* \brief Handle a packet reception.
91
*
92
* This function is called by lower layers.
93
*
94
* \param socket the socket the packet was received to.
95
*/
96
void
HandleReadServer
(
Ptr<Socket>
socket);
97
98
/**
99
* \brief Handle a packet reception.
100
*
101
* This function is called by lower layers.
102
*
103
* \param socket the socket the packet was received to.
104
*/
105
void
HandleReadClient
(
Ptr<Socket>
socket);
106
};
HwmpProactiveRegressionTest
There are 5 stations set into a row, the center station is root.
Definition
hwmp-proactive-regression.h:50
HwmpProactiveRegressionTest::SendData
void SendData(Ptr< Socket > socket)
Send data.
Definition
hwmp-proactive-regression.cc:164
HwmpProactiveRegressionTest::DoRun
void DoRun() override
Implementation to actually run this TestCase.
Definition
hwmp-proactive-regression.cc:48
HwmpProactiveRegressionTest::HandleReadClient
void HandleReadClient(Ptr< Socket > socket)
Handle a packet reception.
Definition
hwmp-proactive-regression.cc:193
HwmpProactiveRegressionTest::m_clientSocket
Ptr< Socket > m_clientSocket
Client-side socket.
Definition
hwmp-proactive-regression.h:78
HwmpProactiveRegressionTest::m_time
Time m_time
Simulation time.
Definition
hwmp-proactive-regression.h:63
HwmpProactiveRegressionTest::m_sentPktsCounter
uint32_t m_sentPktsCounter
sent packets counter
Definition
hwmp-proactive-regression.h:81
HwmpProactiveRegressionTest::~HwmpProactiveRegressionTest
~HwmpProactiveRegressionTest() override
Definition
hwmp-proactive-regression.cc:42
HwmpProactiveRegressionTest::HandleReadServer
void HandleReadServer(Ptr< Socket > socket)
Handle a packet reception.
Definition
hwmp-proactive-regression.cc:179
HwmpProactiveRegressionTest::m_nodes
NodeContainer * m_nodes
Definition
hwmp-proactive-regression.h:61
HwmpProactiveRegressionTest::HwmpProactiveRegressionTest
HwmpProactiveRegressionTest()
Definition
hwmp-proactive-regression.cc:34
HwmpProactiveRegressionTest::InstallApplications
void InstallApplications()
Install application function.
Definition
hwmp-proactive-regression.cc:89
HwmpProactiveRegressionTest::CreateDevices
void CreateDevices()
Create devices function.
Definition
hwmp-proactive-regression.cc:113
HwmpProactiveRegressionTest::CheckResults
void CheckResults()
Check results function.
Definition
hwmp-proactive-regression.cc:155
HwmpProactiveRegressionTest::m_interfaces
Ipv4InterfaceContainer m_interfaces
interfaces
Definition
hwmp-proactive-regression.h:64
HwmpProactiveRegressionTest::ResetPosition
void ResetPosition()
Reset position function.
HwmpProactiveRegressionTest::m_serverSocket
Ptr< Socket > m_serverSocket
Server-side socket.
Definition
hwmp-proactive-regression.h:76
HwmpProactiveRegressionTest::CreateNodes
void CreateNodes()
Create nodes function.
Definition
hwmp-proactive-regression.cc:66
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-proactive-regression.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0