A Discrete-Event Network Simulator
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
18using 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
65{
66 public:
69
70 void DoRun() override;
71 /// Check results function
72 void CheckResults();
73
74 private:
75 /// @internal It is important to have pointers here
77 /// Simulation time
80
81 /// Create nodes function
82 void CreateNodes();
83 /// Create devices function
84 void CreateDevices();
85 /// Install application function
87 /// Reset position function
88 void ResetPosition();
89
90 /// Server-side socket
92 /// Client-side socket
94
95 /// sent packets counter
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
void ResetPosition()
Reset position function.
void SendData(Ptr< Socket > socket)
Send data.
void CreateDevices()
Create devices function.
Ipv4InterfaceContainer m_interfaces
interfaces
void CreateNodes()
Create nodes function.
void CheckResults()
Check results function.
Ptr< Socket > m_clientSocket
Client-side socket.
void HandleReadServer(Ptr< Socket > socket)
Handle a packet reception.
uint32_t m_sentPktsCounter
sent packets counter
void HandleReadClient(Ptr< Socket > socket)
Handle a packet reception.
void DoRun() override
Implementation to actually run this TestCase.
Ptr< Socket > m_serverSocket
Server-side socket.
void InstallApplications()
Install application 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.