A Discrete-Event Network Simulator
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
18using 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 */
53{
54 public:
57
58 void DoRun() override;
59 /// Check results function
60 void CheckResults();
61
62 private:
63 /// @internal It is important to have pointers here
65 /// Simulation time
68
69 /// Create nodes function
70 void CreateNodes();
71 /// Create devices function
72 void CreateDevices();
73 /// Install application function
75 /// Reset position function
77
78 /// Server-side socket
80 /// Client-side socket
82
83 /// sent packets counter
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
void SendData(Ptr< Socket > socket)
Send data.
void DoRun() override
Implementation to actually run this TestCase.
void HandleReadClient(Ptr< Socket > socket)
Handle a packet reception.
Ptr< Socket > m_clientSocket
Client-side socket.
uint32_t m_sentPktsCounter
sent packets counter
void HandleReadServer(Ptr< Socket > socket)
Handle a packet reception.
void InstallApplications()
Install application function.
void CreateDevices()
Create devices function.
void CheckResults()
Check results function.
Ipv4InterfaceContainer m_interfaces
interfaces
void ResetPosition()
Reset position function.
Ptr< Socket > m_serverSocket
Server-side socket.
void CreateNodes()
Create nodes function.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
keep track of a set of node pointers.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
TestCase(const TestCase &)=delete
Caller graph was not generated because of its size.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:96
Every class exported by the ns3 library is enclosed in the ns3 namespace.