ns-allinone-2.35/tcp/tcp-full.cc
int
FullTcpAgent::build_options(hdr_tcp* tcph)
{
	int total = 0;
	if (ts_option_) {
		tcph->ts() = now();
		tcph->ts_echo() = recent_;
		total += ts_option_size_;
	} else {
		tcph->ts() = tcph->ts_echo() = -1.0;
	}
	return (total);
}
/*
 * build a header with the timestamp option if asked
 */
build a header with the timestamp option if asked
build a header with the timestamp option if asked
int
FullTcpAgent::build_options(hdr_tcp* tcph)
{
	int total = 0;
	if (ts_option_) {
		tcph->ts() = now();
		tcph->ts_echo() = recent_;
		total += ts_option_size_;
	} else {
		tcph->ts() = tcph->ts_echo() = -1.0;
	}
	return (total);
}
int FullTcpAgent :: build_options ( hdr_tcp * tcph ) { int total = 0 ; if ( ts_option_ ) { tcph -> ts ( ) = now ( ) ; tcph -> ts_echo ( ) = recent_ ; total += ts_option_size_ ; } else { tcph -> ts ( ) = tcph -> ts_echo ( ) = -1.0 ; } return ( total ) ; }
build a header with the timestamp option if asked
build a header with the timestamp option if asked