A Discrete-Event Network Simulator
API
tcp-rto-test.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Natale Patriciello <natale.patriciello@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 #ifndef TCPRTOTEST_H
20 #define TCPRTOTEST_H
21 
22 #include "tcp-fast-retr-test.h"
23 
24 namespace ns3 {
25 
36 class TcpRtoTest : public TcpGeneralTest
37 {
38 public:
39  TcpRtoTest (TypeId &congControl, const std::string &msg);
40 
41 protected:
42 
44  virtual void RTOExpired (const Ptr<const TcpSocketState> tcb, SocketWho who);
45  virtual void RcvAck (const Ptr<const TcpSocketState> tcb,
46  const TcpHeader& h, SocketWho who);
47  virtual void ProcessedAck (const Ptr<const TcpSocketState> tcb,
48  const TcpHeader& h, SocketWho who);
49  virtual void FinalChecks ();
50  virtual void ConfigureProperties ();
51  virtual void ConfigureEnvironment ();
52 
53 private:
56 };
57 
64 {
65 public:
66  TcpTimeRtoTest (TypeId &congControl, const std::string &msg);
67 
68 protected:
71  virtual void ErrorClose (SocketWho who);
72  virtual void RTOExpired (const Ptr<const TcpSocketState> tcb, SocketWho who);
73  virtual void Tx (const Ptr<const Packet> p, const TcpHeader&h, SocketWho who);
74  virtual void FinalChecks ();
75 
76  virtual void ConfigureEnvironment ();
77 
78  void PktDropped (const Ipv4Header &ipH, const TcpHeader& tcpH, Ptr<const Packet> p);
79 
80 private:
83  bool m_closed;
84 };
85 
86 } // namespace ns3
87 
88 #endif // TCPRTOTEST_H
virtual void ErrorClose(SocketWho who)
Socket closed with an error.
virtual void ConfigureEnvironment()
Change the configuration of the evironment.
Definition: tcp-rto-test.cc:39
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
uint32_t m_senderSentSegments
Definition: tcp-rto-test.h:81
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
virtual void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Processed ack.
Packet header for IPv4.
Definition: ipv4-header.h:33
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
bool m_segmentReceived
Definition: tcp-rto-test.h:55
TcpTimeRtoTest(TypeId &congControl, const std::string &msg)
Testing the moments after an RTO expiration.
Definition: tcp-rto-test.h:36
virtual void FinalChecks()
Performs the (eventual) final checks through test asserts.
virtual Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
void PktDropped(const Ipv4Header &ipH, const TcpHeader &tcpH, Ptr< const Packet > p)
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
Definition: tcp-rto-test.cc:53
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Header for the Transmission Control Protocol.
Definition: tcp-header.h:44
virtual void RTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
virtual void RcvAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Received ack.
Definition: tcp-rto-test.cc:78
TcpRtoTest(TypeId &congControl, const std::string &msg)
Definition: tcp-rto-test.cc:30
virtual void RTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
Definition: tcp-rto-test.cc:64
virtual void ConfigureEnvironment()
Change the configuration of the evironment.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
General infrastructure for TCP testing.
virtual void FinalChecks()
Performs the (eventual) final checks through test asserts.
virtual void ConfigureProperties()
Change the configuration of the socket properties.
Definition: tcp-rto-test.cc:46
a unique identifier for an interface.
Definition: type-id.h:58
Testing the timing of RTO.
Definition: tcp-rto-test.h:63