34 * This class contains the NewReno implementation of TCP, as of \RFC{2582}. |
34 * This class contains the NewReno implementation of TCP, as of \RFC{2582}. |
35 */ |
35 */ |
36 class TcpNewReno : public TcpSocketBase |
36 class TcpNewReno : public TcpSocketBase |
37 { |
37 { |
38 public: |
38 public: |
|
39 /** |
|
40 * \brief Get the type ID. |
|
41 * \return the object TypeId |
|
42 */ |
39 static TypeId GetTypeId (void); |
43 static TypeId GetTypeId (void); |
40 /** |
44 /** |
41 * Create an unbound tcp socket. |
45 * Create an unbound tcp socket. |
42 */ |
46 */ |
43 TcpNewReno (void); |
47 TcpNewReno (void); |
|
48 /** |
|
49 * \brief Copy constructor |
|
50 * \param sock the object to copy |
|
51 */ |
44 TcpNewReno (const TcpNewReno& sock); |
52 TcpNewReno (const TcpNewReno& sock); |
45 virtual ~TcpNewReno (void); |
53 virtual ~TcpNewReno (void); |
46 |
54 |
47 // From TcpSocketBase |
55 // From TcpSocketBase |
48 virtual int Connect (const Address &address); |
56 virtual int Connect (const Address &address); |
60 virtual void SetSSThresh (uint32_t threshold); |
68 virtual void SetSSThresh (uint32_t threshold); |
61 virtual uint32_t GetSSThresh (void) const; |
69 virtual uint32_t GetSSThresh (void) const; |
62 virtual void SetInitialCwnd (uint32_t cwnd); |
70 virtual void SetInitialCwnd (uint32_t cwnd); |
63 virtual uint32_t GetInitialCwnd (void) const; |
71 virtual uint32_t GetInitialCwnd (void) const; |
64 private: |
72 private: |
65 void InitializeCwnd (void); // set m_cWnd when connection starts |
73 /** |
|
74 * \brief Set the congestion window when connection starts |
|
75 */ |
|
76 void InitializeCwnd (void); |
66 |
77 |
67 protected: |
78 protected: |
68 TracedValue<uint32_t> m_cWnd; //< Congestion window |
79 TracedValue<uint32_t> m_cWnd; //!< Congestion window |
69 uint32_t m_ssThresh; //< Slow Start Threshold |
80 uint32_t m_ssThresh; //!< Slow Start Threshold |
70 uint32_t m_initialCWnd; //< Initial cWnd value |
81 uint32_t m_initialCWnd; //!< Initial cWnd value |
71 SequenceNumber32 m_recover; //< Previous highest Tx seqnum for fast recovery |
82 SequenceNumber32 m_recover; //!< Previous highest Tx seqnum for fast recovery |
72 uint32_t m_retxThresh; //< Fast Retransmit threshold |
83 uint32_t m_retxThresh; //!< Fast Retransmit threshold |
73 bool m_inFastRec; //< currently in fast recovery |
84 bool m_inFastRec; //!< currently in fast recovery |
74 bool m_limitedTx; //< perform limited transmit |
85 bool m_limitedTx; //!< perform limited transmit |
75 }; |
86 }; |
76 |
87 |
77 } // namespace ns3 |
88 } // namespace ns3 |
78 |
89 |
79 #endif /* TCP_NEWRENO_H */ |
90 #endif /* TCP_NEWRENO_H */ |