[SOLVED] How to make modified ZRP protocol from ZRP protocol
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.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Very simple :
1) cd ns-allinone-2.33/ns-2.33/
2) cp ns ns-zrp : All known simulation examples can use $ ns-zrp <ex>.tcl
3) make clean
4) make : Your changes will be compiled into a new executable 'ns'.
5) cp ns ns-azrp
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 3 . OK. So you are adding a new protocol ?
Please read "PatchZRP.patch" to know what's usually added,
to have a new protocol recognized.
These files are changed :
common/packet.h
tcl/lib/ns-agent.tcl , + Agent/ZRP set sport_ 0 , + Agent/ZRP set dport_
tcl/lib/ns-default.tcl , + Agent/ZRP set packetSize_ 100 , etc.
tcl/lib/ns-lib.tcl , + Simulator instproc create-zrp-agent { node } { , + set ragent , etc.
* tcl/lib/ns-packet.tcl , + ZRP
trace/cmu-trace.cc
trace/cmu-trace.h
.. I guess you will have to add AZRP in one or more of the tcl/lib/ files.
dear sir....
i want to ask about tcl script of zrp routing protocol.
when i run that tcl script i found the following error...
num_nodes is set 20
(_o15 cmd line 1)
invoked from within
"_o15 cmd addr"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o15" line 2)
(SplitObject unknown line 2)
invoked from within
"_o15 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn) } { incr i } {
set node_($i) [$ns_ node]
$node_($i) random-motion 0
$ns_ initial_node_pos $node_($i) 120
}"
(file "eg_zrp.tcl" line 84)
could you please solve my problem....
i will be very greatful to you...
this link is very helpful to download this zrp examples.
but when i run that tcl examples of that tar folder i found following error..
dcs@ubuntu:~/Documents/zrp-examples$ ns example-zrp.tcl
invalid command name "Agent/ZRP"
while executing
"Agent/ZRP set radius_ 2 "
(file "example-zrp.tcl" line 68)
Could u please tell me that why this type of error is coming in all tcl script of zrp?
reply me..
thank u for your reply......
could u please tell me from the starting point of view...
Like firstly what are the steps to install zrp in ns2.33 in ubuntu 11.10
because i am getting the error till now..
and then how to run all tcl scripts of ZRP ?
I have been trying to modify zrp.cc in order to improve energy efficiency. However i am unclear as to how to proceed. Can you please send your modified code so that I can use it for reference?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.