How to add Multiple protocol patches for ns2 2.35 in same directory ?
Linux - NewbieThis 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
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.
How to add Multiple protocol patches for ns2 2.35 in same directory ?
I want more protocols than the default protocols provided in ns2.Already patch ns2 2.35 with olsr protocol now i want to patch ns2 with ZRP,CBRP protocols
How to add new protocols to the existing ones ?
Do i have to patch the ns2 individually for every patch?
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,484
Rep:
Why do you want all the extra protocols in the same ns-2.35/ ?
You can have as many ns-allinone-2.xx as you want, installed at the same time.
But : Do not add any *PATH text to .bashrc : Not required.
Some extra protocols will conflict.
OLSR + ZRP + CBRP might be possible.
If you want to simulate with "multiple protocol node-config":
... I can create a patch with the extra protocols, if no conflicts.
Example: "zrp+cbrp_for-OLSR-patched_ns235.patch".
Space used for every "cleaned ns-allinone-2" is about 10MB. that's a good idea
ns2 is a 32 bit software right ? then how can you use 64 bit installs?
when i try to patch ns2 2.35 (after clean install of ns2 2.35 ubuntu mate 16.04 64 bits)for cbrp protocol
i use the CBRP+LTE_ns235.patch
and followed these commands
cd /home/arone/programs/ns-allinone-2.35
i already copy patch to ns-allinone-2.35
patch -p0 < CBRP+LTE_ns235.patch
then
sudo ./install
but it gives the errors like this in terminal. what should i do ?? what's the mistake i made ?
Code:
In file included from cbrp/cbrpagent.h:27:0,
from cbrp/cbrpagent.cc:9:
cbrp/ntable.h:89:30: error: expected ‘)’ before ‘*’ token
NeighborTable(CBRP_Agent *a_);
^
cbrp/ntable.h:141:5: error: ‘NeighborTableCContentionHandler’ does not name a type
NeighborTableCContentionHandler *c_contention_handler;
^
cbrp/ntable.h:150:5: error: ‘CBRP_Agent’ does not name a type
CBRP_Agent *a;
^
cbrp/ntable.h:166:45: error: expected ‘)’ before ‘*’ token
NeighborTablePeriodicHandler(CBRP_Agent *a_, NeighborTable *t_);
^
cbrp/ntable.h:172:5: error: ‘CBRP_Agent’ does not name a type
CBRP_Agent *a;
^
cbrp/ntable.h:179:44: error: expected ‘)’ before ‘*’ token
NeighborTableTimeoutHandler(CBRP_Agent *a_, NeighborTable *t_);
^
cbrp/ntable.h:184:5: error: ‘CBRP_Agent’ does not name a type
CBRP_Agent *a;
^
cbrp/ntable.h:190:47: error: expected ‘)’ before ‘*’ token
NeighborTableCFormationHandler(CBRP_Agent *a_, NeighborTable *t_);
^
cbrp/ntable.h:195:5: error: ‘CBRP_Agent’ does not name a type
CBRP_Agent *a;
^
cbrp/ntable.h:201:48: error: expected ‘)’ before ‘*’ token
NeighborTableCContentionHandler(CBRP_Agent *a_, NeighborTable *t_);
^
cbrp/ntable.h:206:5: error: ‘CBRP_Agent’ does not name a type
CBRP_Agent *a;
^
cbrp/cbrpagent.cc: In constructor ‘CBRP_Agent::CBRP_Agent()’:
cbrp/cbrpagent.cc:296:34: error: no matching function for call to ‘NeighborTable::NeighborTable(CBRP_Agent*)’
ntable = new NeighborTable(this);
^
In file included from cbrp/cbrpagent.h:27:0,
from cbrp/cbrpagent.cc:9:
cbrp/ntable.h:79:7: note: candidate: NeighborTable::NeighborTable()
class NeighborTable {
^
cbrp/ntable.h:79:7: note: candidate expects 0 arguments, 1 provided
cbrp/ntable.h:79:7: note: candidate: NeighborTable::NeighborTable(const NeighborTable&)
cbrp/ntable.h:79:7: note: no known conversion for argument 1 from ‘CBRP_Agent*’ to ‘const NeighborTable&’
cbrp/cbrpagent.cc: In member function ‘virtual void CBRP_SendBufferTimer::expire(Event*)’:
cbrp/cbrpagent.cc:436:57: error: cast from ‘Event*’ to ‘int’ loses precision [-fpermissive]
resched(BUFFER_CHECK + BUFFER_CHECK * (double) ((int) e>>5 & 0xff) / 256.0);
^
cbrp/cbrpagent.cc: In member function ‘void CBRP_Agent::handlePktWithoutSR(CBRP_Packet&, bool)’:
cbrp/cbrpagent.cc:653:13: warning: unused variable ‘cbrph’ [-Wunused-variable]
hdr_cbrp *cbrph = HDR_CBRP(p.pkt);
^
cbrp/cbrpagent.cc: In member function ‘int CBRP_Agent::handleRREP(CBRP_Packet&)’:
cbrp/cbrpagent.cc:875:25: error: ‘CBRP_XmitFailureCallback’ was not declared in this scope
cmnh->xmit_failure_ = CBRP_XmitFailureCallback;
^
cbrp/cbrpagent.cc: In member function ‘int CBRP_Agent::UnicastRREQ(CBRP_Packet&, nsaddr_t)’:
cbrp/cbrpagent.cc:1375:25: error: ‘CBRP_XmitFailureCallback’ was not declared in this scope
cmnh->xmit_failure_ = CBRP_XmitFailureCallback;
^
cbrp/cbrpagent.cc: In member function ‘void CBRP_Agent::sendOutPacketWithRoute(CBRP_Packet&, bool, Time)’:
cbrp/cbrpagent.cc:1572:25: error: ‘CBRP_XmitFailureCallback’ was not declared in this scope
cmnh->xmit_failure_ = CBRP_XmitFailureCallback;
^
Makefile:93: recipe for target 'cbrp/cbrpagent.o' failed
make: *** [cbrp/cbrpagent.o] Error 1
Ns make failed!
Last edited by aroneasadas; 04-17-2018 at 09:27 PM.
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,484
Rep:
Re #5. Please put the error output in code Tags :
[code]code text[/code]
→ The 'Edit' button in post #5.
ns2 : Most protocols can run with a 64bits OS.
A few of the older protocols can only use a 32bits OS.
Not all simulations can run with a 64bits OS: A 32bits executable ns* is required.
But usually no problem, as the 32bits application packages can be installed to the 64bits OS https://drive.google.com/drive/folde...FE?usp=sharing
About the CBRP errors : The old cbrp code must be compiled with g++34.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.