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