LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2015 Natale Patriciello <natale.patriciello@gmail.com> | 3 * Copyright (c) 2015 Natale Patriciello <natale.patriciello@gmail.com> |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 23 matching lines...) Expand all Loading... |
34 * | 34 * |
35 */ | 35 */ |
36 class TcpRtoTest : public TcpGeneralTest | 36 class TcpRtoTest : public TcpGeneralTest |
37 { | 37 { |
38 public: | 38 public: |
39 TcpRtoTest (TypeId &congControl, const std::string &msg); | 39 TcpRtoTest (TypeId &congControl, const std::string &msg); |
40 | 40 |
41 protected: | 41 protected: |
42 | 42 |
43 virtual Ptr<TcpSocketMsgBase> CreateSenderSocket (Ptr<Node> node); | 43 virtual Ptr<TcpSocketMsgBase> CreateSenderSocket (Ptr<Node> node); |
44 virtual void RTOExpired (const Ptr<const TcpSocketState> tcb, SocketWho who); | 44 virtual void AfterRTOExpired (const Ptr<const TcpSocketState> tcb, SocketWho w
ho); |
45 virtual void RcvAck (const Ptr<const TcpSocketState> tcb, | 45 virtual void RcvAck (const Ptr<const TcpSocketState> tcb, |
46 const TcpHeader& h, SocketWho who); | 46 const TcpHeader& h, SocketWho who); |
47 virtual void ProcessedAck (const Ptr<const TcpSocketState> tcb, | 47 virtual void ProcessedAck (const Ptr<const TcpSocketState> tcb, |
48 const TcpHeader& h, SocketWho who); | 48 const TcpHeader& h, SocketWho who); |
49 virtual void FinalChecks (); | 49 virtual void FinalChecks (); |
50 virtual void ConfigureProperties (); | 50 virtual void ConfigureProperties (); |
51 virtual void ConfigureEnvironment (); | 51 virtual void ConfigureEnvironment (); |
52 | 52 |
53 private: | 53 private: |
54 bool m_rtoExpired; | 54 bool m_afterRTOExpired; |
55 bool m_segmentReceived; | 55 bool m_segmentReceived; |
56 }; | 56 }; |
57 | 57 |
58 /** | 58 /** |
59 * \brief Testing the timing of RTO | 59 * \brief Testing the timing of RTO |
60 * | 60 * |
61 * Checking if RTO is doubled ONLY after a retransmission. | 61 * Checking if RTO is doubled ONLY after a retransmission. |
62 */ | 62 */ |
63 class TcpTimeRtoTest : public TcpGeneralTest | 63 class TcpTimeRtoTest : public TcpGeneralTest |
64 { | 64 { |
65 public: | 65 public: |
66 TcpTimeRtoTest (TypeId &congControl, const std::string &msg); | 66 TcpTimeRtoTest (TypeId &congControl, const std::string &msg); |
67 | 67 |
68 protected: | 68 protected: |
69 virtual Ptr<TcpSocketMsgBase> CreateSenderSocket (Ptr<Node> node); | 69 virtual Ptr<TcpSocketMsgBase> CreateSenderSocket (Ptr<Node> node); |
70 virtual Ptr<ErrorModel> CreateReceiverErrorModel (); | 70 virtual Ptr<ErrorModel> CreateReceiverErrorModel (); |
71 virtual void ErrorClose (SocketWho who); | 71 virtual void ErrorClose (SocketWho who); |
72 virtual void RTOExpired (const Ptr<const TcpSocketState> tcb, SocketWho who); | 72 virtual void AfterRTOExpired (const Ptr<const TcpSocketState> tcb, SocketWho w
ho); |
73 virtual void Tx (const Ptr<const Packet> p, const TcpHeader&h, SocketWho who); | 73 virtual void Tx (const Ptr<const Packet> p, const TcpHeader&h, SocketWho who); |
74 virtual void FinalChecks (); | 74 virtual void FinalChecks (); |
75 | 75 |
76 virtual void ConfigureEnvironment (); | 76 virtual void ConfigureEnvironment (); |
77 | 77 |
78 void PktDropped (const Ipv4Header &ipH, const TcpHeader& tcpH, Ptr<const Packe
t> p); | 78 void PktDropped (const Ipv4Header &ipH, const TcpHeader& tcpH, Ptr<const Packe
t> p); |
79 | 79 |
80 private: | 80 private: |
81 uint32_t m_senderSentSegments; | 81 uint32_t m_senderSentSegments; |
82 Time m_previousRTO; | 82 Time m_previousRTO; |
83 bool m_closed; | 83 bool m_closed; |
84 }; | 84 }; |
85 | 85 |
86 } // namespace ns3 | 86 } // namespace ns3 |
87 | 87 |
88 #endif // TCPRTOTEST_H | 88 #endif // TCPRTOTEST_H |
LEFT | RIGHT |