This documentation is not the Latest Release.
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 
51 private:
54 };
55 
62 {
63 public:
64  TcpTimeRtoTest (TypeId &congControl, const std::string &msg);
65 
66 protected:
69  virtual void ErrorClose (SocketWho who);
70  virtual void RTOExpired (const Ptr<const TcpSocketState> tcb, SocketWho who);
71  virtual void Tx (const Ptr<const Packet> p, const TcpHeader&h, SocketWho who);
72  virtual void FinalChecks ();
73 
74  void PktDropped (const Ipv4Header &ipH, const TcpHeader& tcpH);
75 
76 private:
79  bool m_closed;
80 };
81 
82 } // namespace ns3
83 
84 #endif // TCPRTOTEST_H
virtual void ErrorClose(SocketWho who)
Socket closed with an error.
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:77
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.
Definition: tcp-rto-test.cc:87
Packet header for IPv4.
Definition: ipv4-header.h:31
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:53
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.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
Definition: tcp-rto-test.cc:39
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:64
void PktDropped(const Ipv4Header &ipH, const TcpHeader &tcpH)
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:50
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.
a unique identifier for an interface.
Definition: type-id.h:58
Testing the timing of RTO.
Definition: tcp-rto-test.h:61