Index: src/internet/model/tcp-congestion-ops.h |
=================================================================== |
--- a/src/internet/model/tcp-congestion-ops.h |
+++ b/src/internet/model/tcp-congestion-ops.h |
@@ -136,15 +136,25 @@ |
{ |
} |
+ /** |
+ * \brief Trigger events/calculations on occurance congestion window event |
+ * |
+ * This function mimics the function cwnd_event in Linux. |
+ * The function is called in case of congestion window events. |
+ * |
+ * \param tcb internal congestion state |
+ * \param event the event which triggered this function |
+ */ |
+ virtual void CwndEvent (Ptr<TcpSocketState> tcb, |
+ const TcpSocketState::TcpCaEvent_t event) |
+ { |
+ } |
// Present in Linux but not in ns-3 yet: |
- /* call when cwnd event occurs (optional) */ |
- // void (*cwnd_event)(struct sock *sk, enum tcp_ca_event ev); |
/* call when ack arrives (optional) */ |
// void (*in_ack_event)(struct sock *sk, u32 flags); |
/* new value of cwnd after loss (optional) */ |
// u32 (*undo_cwnd)(struct sock *sk); |
/* hook for packet ack accounting (optional) */ |
- // void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us); |
/** |
* \brief Copy the congestion control algorithm across socket |
@@ -152,6 +162,24 @@ |
* \return a pointer of the copied object |
*/ |
virtual Ptr<TcpCongestionOps> Fork () = 0; |
+ |
+ /** |
+ * \brief Assigns socket base to the pointer in DCTCP |
+ * |
+ * \param tsb |
+ */ |
+ virtual void SetSocketBase (Ptr<TcpSocketBase> tsb) |
+ { |
+ } |
+ |
+ /** |
+ * \brief Reduces congestion window on receipt of ECN Echo Flag |
+ * |
+ * \param tcb internal congestion state |
+ */ |
+ virtual void ReduceCwnd (Ptr<TcpSocketState> tcb) |
+ { |
+ } |
}; |
/** |
@@ -186,7 +214,7 @@ |
virtual void IncreaseWindow (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked); |
virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb, |
uint32_t bytesInFlight); |
- |
+ virtual void ReduceCwnd(Ptr<TcpSocketState> tcb); |
virtual Ptr<TcpCongestionOps> Fork (); |
protected: |