LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2011, 12:51 AM   #1
ghassan_akrem
LQ Newbie
 
Registered: Nov 2010
Posts: 4

Rep: Reputation: 0
How to make change in tcp.cc over NS-2.34?


Hi all
I have problem when I add another case in linear increase cogestion avoidance algorithm in tcp.cc why can't it work out when I run it?
In the tcl code I have set windowOption_ to '9' (where I put my additional change).It seems that any change I've made doesn't take effect at all.What am I suppose to do to make it work? Please help me. I make change like this :

void TcpAgent:pencwnd()
{
double increment;
if (cwnd_ < ssthresh_) {
/* slow-start (exponential) */
cwnd_ += 1;
} else {
/* linear */
double f;
switch (wnd_option_) {
case 0:
if (++count_ >= cwnd_) {
count_ = 0;
++cwnd_;
}
break;

case 1:
/* This is the standard algorithm. */
increment = increase_num_ / cwnd_;
if ((last_cwnd_action_ == 0 ||
last_cwnd_action_ == CWND_ACTION_TIMEOUT)
&& max_ssthresh_ > 0) {
increment = limited_slow_start(cwnd_,
max_ssthresh_, increment);
}
cwnd_ += increment;
break;
.
.
.
.

case 9:
(I put the additonal change here)
break;


with my regards
Ghassan
 
Old 01-15-2011, 01:52 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,887

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Tcp.cc is source code. After editing the source code, you must compile the package it belongs to in order to have executable code.
 
1 members found this post helpful.
Old 01-15-2011, 04:49 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
*


cd ns-allinone-2.34/ns-2.34/ && mv ns ns-backup && make clean && make
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change initial TCP send window size Yair Linux - Kernel 1 06-10-2009 03:34 PM
Change kernel to always be in tcp quick ack mode jbraswell314 Linux - Networking 4 11-26-2008 11:54 PM
Linux change TCP kernel Parameter for TCP DELAY ACK TICKS linux_mando Linux - Networking 5 08-22-2006 08:20 AM
How do I make a change to a current kernel? Would 'make oldconfig' work... jtp51 Slackware 11 11-01-2004 11:02 PM
Red Hat 9 - How do I change TCP send/recv windows? oswald21 Linux - Networking 1 07-16-2003 05:21 PM


All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration