Extending NS-2.34 to include RCP - [code omitted because of length] : invalid command
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Extending NS-2.34 to include RCP - [code omitted because of length] : invalid command
Dear All,
I am working on Ubuntu 11.04 and trying to extend NS-2.34 to include Rate Control Protocol (RCP). I have done the steps in readMe of RCP to install it, namely the following steps:
__________________________________________________
To install RCP:
***************
1. Put the 'rcp' directory under ns-allinone-2.30/ns-2.30. The rcp directory has: rcp.cc, rcp-host.cc and rcp-host.h. These are the only newly created files.
The following are existing ns-2 files modified for RCP:
2. ns-packet.tcl at ns-allinone-2.30/ns-2.30/tcl/lib
3. ns-default.tcl at ns-allinone-2.30/ns-2.30/tcl/lib
4. packet.h at ns-allinone-2.30/ns-2.30/common
5. trace.cc at ns-allinone-2.30/ns-2.30/trace
6. Add the following line in Makefile to compile rcp:
rcp/rcp.o rcp/rcp-host.o
7. You can find some sample .tcl files to run RCP in example-tcl-files
__________________________________________________
I have made these changes to the corresponding files in NS-2.34.
Before adding RCP, I was able to run tcl files using NS. Now after adding RCP and recompiling NS, when I try to run any tcl file, I get the following error:
___________________________________________________
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"
___________________________________________________
Any immediate helps on resolving this issue would be very much appreciated.
Btw, the incremental code of RCP is here [in case more detailed info is needed]:
That's completely true. For steps 2-6 I have changed the particular lines in the files and not just simply replacing the files. For step 1, I directly copied the rcp directory. However, since the compilation was successful, I am expecting that for a tcl file which does not use anything from RCP, the execution should be successful. That's why I am thinking there might be some other problem.
I have also been trying to install NS-2.30 on Ubuntu 11.04, but not successful yet. I installed it based on the steps here <http://erl1.wordpress.com/?s=ns-2.30> (although it's for Ubuntu 10.04 Lucid Lynx). It got installed, however when I run a tcl file I get a buffer overflow error. According to <http://erl1.wordpress.com/2011/05/12/installing-ns-2-34-on-ubuntu-11-04/> which suggests to mention an (older) compiler version directly in "Makefile.in" of tcl for buffer overflow error and then re-install it, I did so, but I mentioned version at the beginning of the command, i.e.,
"-V 4.4 CC = @CC@", as otherwise it gets aborted in the middle complaining that,
"gcc: '-V' must come at the start of the command line".
It got installed, but when I run tcl files, it still gives a buffer overflow error along with map of the memory.
Do you have any ideas as how to get NS-2.30 successfully installed and have it working?
'export CC=gcc-4.1 CXX=g++-4.1 && ./install' does not work; it gets aborted with the errors which need "Erlend's modifications" (I am assuming that you meant 4.4, since version 4.1 is not available to be installed).
With "Erlend's modifications" NS-2.30 can be installed, but when running tcl files, it generates buffer overflow error.
Any suggestions as how to install NS-2.30 on Ubuntu 11.04 successfully?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Quote:
With "Erlend's modifications" NS-2.30 can be installed,
but when running tcl files, it generates buffer overflow error.
"buffer overflow error" : Nothing to do.
"Erlend's modifications" may have worked the day they were written.
But Ubuntu updates after that time will prevent ns2 from working :
"Buffer overflow" will be the result. We have seen the issue before
here at LQ.
If you insist in using 11.04, the "gcc41-compat" for 11.04 can used.
( Not tested specificly with ns-2.30 )
> > > Start from scratch with a new unpacked ns-allinone-2.30 .
Generally : Do not use Ubuntu 11.04 or later for ns2.
P.S. : Please see the EDIT in post #4 : Line 6 is about 10.04 .
(The export command will work in 11.04 too, with gcc41/g++41 -compat:
'export CC=gcc41 CXX=g++41 && ./install' ).
These two links don't show.
When I try to install the two packages, they cannot be located.
If there are specific things to install these, could you please let me know (I guess that should be in the links you have provided--but those don't show)?
And another question: what version of Ubuntu works well for NS-2.30? Is there a "safe" way to downgrade or it should be installed from scratch?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Quote:
What version of Ubuntu works well for NS-2.30
Ubuntu 10.04 will work with ns-2.30 (And all other ns2 from version 2.27 up.)
A downgrade is not possible, but you can install 10.04 on a spare partition.
By the way, the links in post #6 seem to work OK :
Packages are downloaded to the default "Downloads" folder.
And can be installed with :
'sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb'
By the way, the links in post #6 seem to work OK :
I still cannot access it, it gives me this error: Not Found - Error 404.
Maybe read permissions are not set for public.
Quote:
Packages are downloaded to the default "Downloads" folder.
And can be installed with :
'sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb'
generates error, not accessible:
_______________________________________________________________
dpkg: error processing gcc41-compat-4.1.2_i386.deb (--install):
cannot access archive: No such file or directory
dpkg: error processing g++41-compat-4.1.2_i386.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
gcc41-compat-4.1.2_i386.deb
g++41-compat-4.1.2_i386.deb
_______________________________________________________________
I am working on Ubuntu 11.04 and trying to extend NS-2.34 to include Rate Control Protocol (RCP). I have done the steps in readMe of RCP to install it, namely the following steps:
__________________________________________________
To install RCP:
***************
1. Put the 'rcp' directory under ns-allinone-2.30/ns-2.30. The rcp directory has: rcp.cc, rcp-host.cc and rcp-host.h. These are the only newly created files.
The following are existing ns-2 files modified for RCP:
2. ns-packet.tcl at ns-allinone-2.30/ns-2.30/tcl/lib
3. ns-default.tcl at ns-allinone-2.30/ns-2.30/tcl/lib
4. packet.h at ns-allinone-2.30/ns-2.30/common
5. trace.cc at ns-allinone-2.30/ns-2.30/trace
6. Add the following line in Makefile to compile rcp:
rcp/rcp.o rcp/rcp-host.o
7. You can find some sample .tcl files to run RCP in example-tcl-files
__________________________________________________
I have made these changes to the corresponding files in NS-2.34.
Before adding RCP, I was able to run tcl files using NS. Now after adding RCP and recompiling NS, when I try to run any tcl file, I get the following error:
___________________________________________________
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"
___________________________________________________
Any immediate helps on resolving this issue would be very much appreciated.
Btw, the incremental code of RCP is here [in case more detailed info is needed]:
<http://yuba.stanford.edu/rcp/rcp-ns2.30.tar.gz>
-------------------------------------------------------------
I tried alot to install RCP over ns2.30. But I was unsuccessful.
First I installed ns2.30. I could successfully do that over Fedora.
Second I downloaded RCP for ns2.30 from following link
http://yuba.stanford.edu/rcp/
But, I could not implement it successfully.
During RCP implementation over ns2.30, it does not give me any error.
But when I run ns command, I get following error:
[amg@localhost ~]$ ns
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"
I m stuck now. Can't move forward my research.
Need your help. Please help me.
-------------------------------------------------------------
I tried alot to install RCP over ns2.30. But I was unsuccessful.
First I installed ns2.30. I could successfully do that over Fedora.
Second I downloaded RCP for ns2.30 from following link
During RCP implementation over ns2.30, it does not give me any error.
But when I run ns command, I get following error:
[amg@localhost ~]$ ns
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"
I m stuck now. Can't move forward my research.
Need your help. Please help me.
The problem is solved.
Need change in ns-default.tcl. Just replace rcp related agents with Queue/DropTail/RCP
for more details please mail me at bhargavigoswami@gmail.com
Hope it helps you in yr research.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.