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#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
15using 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 */
50{
51 public:
54
55 void DoRun() override;
56 /// Check results function
57 void CheckResults();
58
59 private:
60 /// \internal It is important to have pointers here
62 /// Simulation time
65
66 /// Create nodes function
67 void CreateNodes();
68 /// Create devices function
69 void CreateDevices();
70 /// Install application function
72 /// Reset position function
74
75 /// Server-side socket
77 /// Client-side socket
79
80 /// sent packets counter
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};
There are 5 stations set into a row, the center station is root.
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.
encapsulates test code
Definition test.h:1050
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Every class exported by the ns3 library is enclosed in the ns3 namespace.