In previous exercise, the TCP flow seems to occupy a little less share of the bandwidth. Can you modify the existing TCP (Tahoe) implementation in ns-2 and make it more aggressive? In the following, we will show an example that we have talked about in the lecture, i.e., the TCP Jump Start. You are encouraged to explore other simple tricks by looking at tcp.h in ns.
An Aggressive TCP - Jump Start
class JSTcpAgent : public TcpAgent {
public:
virtual void set_initial_window() {
cwnd_ = maxwin_;
}
private:
int maxwin_;
};
#include "tcp-js.h"
static JSTcpClass : public TclClass {
public:
JSTcpClass() : TclClass("Agent/TCP/JS") {}
TclObject* create(int, const char*const*) {
return (new JSTcpAgent());
}
};
JSTcpAgent::JSTcpAgent() {
bind("MAXWIN_", maxwin_);
}
OBJ_CC = \ tcp-js.cc \ ......
prompt> make depend prompt> make
References: