[ns] Question about TcpAgent() constructor

Arvind Swaminathan arvind.phd at gmail.com
Fri Dec 14 13:17:39 PST 2007


Hi Everybody,

I am new to C++.  I would really appreciate it if someone could
explain what the following definition of the TcpAgent constructor
means.

I think the first part TcpAgent::TcpAgent() means that we are defining
the TcpAgent member function in the TcpAgent class. But what does the
comma separated list ": Agent(), t_seqno_() ,...." mean

TcpAgent::TcpAgent()
	: Agent(PT_TCP),
	  t_seqno_(0), t_rtt_(0), t_srtt_(0), t_rttvar_(0),
	  t_backoff_(0), ts_peer_(0), ts_echo_(0),
	  tss(NULL), tss_size_(100),
	  rtx_timer_(this), delsnd_timer_(this), burstsnd_timer_(this),
	  dupacks_(0), curseq_(0), highest_ack_(0), cwnd_(0), ssthresh_(0),
	  maxseq_(0), count_(0), rtt_active_(0), rtt_seq_(-1), rtt_ts_(0.0),
	  lastreset_(0.0), closed_(0), use_rtt_(0),
	  first_decrease_(1), fcnt_(0),
	  nrexmit_(0), restart_bugfix_(1), cong_action_(0),
	  ecn_burst_(0), ecn_backoff_(0), ect_(0),
	  qs_requested_(0), qs_approved_(0),
	  qs_window_(0), qs_cwnd_(0), frto_(0)

Thanks,
Arvind



More information about the Ns-users mailing list