📄 ns-2.27-aodv-uu-0.9.1.patch
字号:
diff -urN ns-2.27/common/packet.h ../ns-allinone-2.27/ns-2.27/common/packet.h--- ns-2.27/common/packet.h 2004-01-13 01:57:44.000000000 +0100+++ ../ns-allinone-2.27/ns-2.27/common/packet.h 2004-12-01 14:23:51.831443493 +0100@@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *- * @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/common/packet.h,v 1.95 2003/08/21 18:22:00 haldar Exp $ (LBL)+ * @(#) $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.27/common/packet.h,v 1.1 2004/02/13 10:10:58 erikn Exp $ (LBL) */ #ifndef ns_packet_h@@ -160,6 +160,11 @@ // SMAC packet PT_SMAC, +#ifdef AODV_UU+ // AODV packets in AODV-UU+ PT_AODVUU,+#endif /* AODV_UU */+ // insert new packet types here PT_NTYPE // This MUST be the LAST one };@@ -249,6 +254,10 @@ // smac name_[PT_SMAC]="smac";+#ifdef AODV_UU+ // AODV packets in AODV-UU+ name_[PT_AODVUU] = "AODVUU";+#endif /* AODV_UU */ name_[PT_NTYPE]= "undefined"; }diff -urN ns-2.27/Makefile.in ../ns-allinone-2.27/ns-2.27/Makefile.in--- ns-2.27/Makefile.in 2004-01-13 01:59:20.000000000 +0100+++ ../ns-allinone-2.27/ns-2.27/Makefile.in 2004-12-01 14:50:12.222070361 +0100@@ -52,13 +52,22 @@ # for diffusion #DIFF_INCLUDES = "./diffusion3/main ./diffusion3/lib ./diffusion3/nr ./diffusion3/ns" +# AODV-UU: Name of subdirectory with AODV-UU files,+# usually a symlink to the AODV-UU sources. If you change this,+# ~ns/trace/cmu-trace.cc must be updated as well.+AODV_UU_DIR = aodv-uu+AODV_UU_LIB=libaodv-uu.a+ CCOPT = @V_CCOPT@ STATIC = @V_STATIC@ LDFLAGS = $(STATIC) LDOUT = -o $(BLANK) -DEFINE = -DTCP_DELAY_BIND_ALL -DNO_TK @V_DEFINE@ @V_DEFINES@ @DEFS@ -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=@CPP_NAMESPACE@ -DUSE_SINGLE_ADDRESS_SPACE -Drng_test+# AODV-UU: Added "-DAODV_UU" and "-DNS_PORT" to enable AODV-UU+DEFINE = -DTCP_DELAY_BIND_ALL -DNO_TK @V_DEFINE@ @V_DEFINES@ @DEFS@ -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=@CPP_NAMESPACE@ -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DAODV_UU -DNS_PORT +# AODV-UU: Added -I for AODV-UU directory, to allow custom-generated+# endian.h to be found on systems which lack it. INCLUDES = \ -I. @V_INCLUDE_X11@ \ @V_INCLUDES@ \@@ -67,14 +76,17 @@ -I./routing -I./tools -I./classifier -I./mcast \ -I./diffusion3/lib/main -I./diffusion3/lib \ -I./diffusion3/lib/nr -I./diffusion3/ns \- -I./diffusion3/filter_core -I./asim/ -I./qs-+ -I./diffusion3/filter_core -I./asim/ -I./qs \+ -I./$(AODV_UU_DIR) +# AODV-UU: Added "-Laodv-uu" and "-laodv-uu" to link with AODV-UU library LIB = \ @V_LIBS@ \ @V_LIB_X11@ \ @V_LIB@ \- -lm @LIBS@+ -lm @LIBS@ \+ -L$(AODV_UU_DIR) \+ -laodv-uu # -L@libdir@ \ CFLAGS = $(CCOPT) $(DEFINE)@@ -350,11 +362,20 @@ all: $(NS) $(BUILD_NSE) all-recursive +# AODV-UU: Added phony targets for AODV-UU+.PHONY: aodv-uu-clean++$(AODV_UU_DIR)/$(AODV_UU_LIB):+ cd $(AODV_UU_DIR) && $(MAKE) $(AODV_UU_LIB) NS_DEFS='$(DEFINE)' OPTS='$(CCOPT)' NS_INC='$(subst -I.,-I$(shell pwd),$(INCLUDES))'++aodv-uu-clean:+ cd $(AODV_UU_DIR) && $(MAKE) clean all-recursive: for i in $(SUBDIRS); do ( cd $$i; $(MAKE) all; ) done -$(NS): $(OBJ) common/tclAppInit.o Makefile+# AODV-UU: Added "aodv-uu" as first dependency+$(NS): $(AODV_UU_DIR)/$(AODV_UU_LIB) $(OBJ) common/tclAppInit.o Makefile $(LINK) $(LDFLAGS) $(LDOUT)$@ \ common/tclAppInit.o $(OBJ) $(LIB) @@ -479,7 +500,7 @@ install-recursive: force for i in $(SUBDIRS); do ( cd $$i; $(MAKE) install; ) done -clean:+clean: aodv-uu-clean $(RM) $(CLEANFILES) AUTOCONF_GEN = tcl/lib/ns-autoconf.tcldiff -urN ns-2.27/queue/priqueue.cc ../ns-allinone-2.27/ns-2.27/queue/priqueue.cc--- ns-2.27/queue/priqueue.cc 2004-01-13 01:58:53.000000000 +0100+++ ../ns-allinone-2.27/ns-2.27/queue/priqueue.cc 2004-12-01 14:23:51.847441120 +0100@@ -37,7 +37,7 @@ priqueue.cc A simple priority queue with a remove packet function- $Id: priqueue.cc,v 1.5 2003/02/21 00:40:22 haldar Exp $+ $Id: priqueue.cc,v 1.1 2004/02/13 10:10:58 erikn Exp $ */ #include <object.h>@@ -92,7 +92,11 @@ case PT_AODV: recvHighPriority(p, h); break;-+#ifdef AODV_UU+ case PT_AODVUU:+ recvHighPriority(p, h);+ break;+#endif /* AODV_UU */ default: Queue::recv(p, h); }diff -urN ns-2.27/tcl/lib/ns-agent.tcl ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-agent.tcl--- ns-2.27/tcl/lib/ns-agent.tcl 2004-01-13 01:54:41.000000000 +0100+++ ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-agent.tcl 2004-12-01 14:23:51.869437857 +0100@@ -30,7 +30,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. #-# @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-agent.tcl,v 1.24 2001/08/17 19:00:42 kfall Exp $+# @(#) $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.27/tcl/lib/ns-agent.tcl,v 1.1 2004/02/13 10:10:58 erikn Exp $ # #@@ -192,3 +192,10 @@ Agent/AODV set sport_ 0 Agent/AODV set dport_ 0 +# AODV-UU routing agent+Agent/AODVUU instproc init args {+ $self next $args+}++Agent/AODVUU set sport_ 0+Agent/AODVUU set dport_ 0diff -urN ns-2.27/tcl/lib/ns-default.tcl ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-default.tcl--- ns-2.27/tcl/lib/ns-default.tcl 2004-01-13 01:54:41.000000000 +0100+++ ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-default.tcl 2004-12-01 14:23:51.883435781 +0100@@ -33,7 +33,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. #-# @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-default.tcl,v 1.327 2003/11/27 23:28:11 xuanc Exp $+# @(#) $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.27/tcl/lib/ns-default.tcl,v 1.1 2004/02/13 10:10:58 erikn Exp $ #@@ -1268,3 +1268,19 @@ # Quick Start definitions end here Delayer set debug_ false++# AODV-UU routing agent+Agent/AODVUU set unidir_hack_ 0+Agent/AODVUU set rreq_gratuitous_ 0+Agent/AODVUU set expanding_ring_search_ 1+Agent/AODVUU set local_repair_ 0+Agent/AODVUU set receive_n_hellos_ 0+Agent/AODVUU set hello_jittering_ 0+Agent/AODVUU set wait_on_reboot_ 0+Agent/AODVUU set debug_ 0+Agent/AODVUU set rt_log_interval_ 0+Agent/AODVUU set log_to_file_ 0+Agent/AODVUU set optimized_hellos_ 0+Agent/AODVUU set ratelimit_ 1+Agent/AODVUU set llfeedback_ 1+Agent/AODVUU set internet_gw_mode_ 0diff -urN ns-2.27/tcl/lib/ns-lib.tcl ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-lib.tcl--- ns-2.27/tcl/lib/ns-lib.tcl 2004-01-13 01:54:42.000000000 +0100+++ ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-lib.tcl 2004-12-01 14:23:51.898433556 +0100@@ -32,7 +32,7 @@ # SUCH DAMAGE. # -# @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-lib.tcl,v 1.262 2003/12/23 17:36:35 haldar Exp $+# @(#) $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.27/tcl/lib/ns-lib.tcl,v 1.1 2004/02/13 10:10:59 erikn Exp $ #@@ -600,6 +600,10 @@ AODV { set ragent [$self create-aodv-agent $node] }+ # AODV-UU routing agent+ AODVUU {+ $self at 0.0 "$node start-aodv"+ } TORA { Simulator set IMEPFlag_ ON set ragent [$self create-tora-agent $node]@@ -652,7 +656,7 @@ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ # Attach agent- if {$routingAgent_ != "DSR"} {+ if {$routingAgent_ != "DSR" && $routingAgent_ != "AODVUU" } { $node attach $ragent [Node set rtagent_port_] } if {$routingAgent_ == "DIFFUSION/RATE" ||@@ -672,7 +676,7 @@ # Bind routing agent and mip agent if existing basestation # address setting if { [info exist wiredRouting_] && $wiredRouting_ == "ON" } {- if { $routingAgent_ != "DSR" } {+ if { $routingAgent_ != "DSR" && $routingAgent_ != "AODVUU" } { $node mip-call $ragent } }@@ -724,7 +728,11 @@ if {$routingAgent_ == "DSR"} { set nodeclass [$self set-dsr-nodetype] } else {- set nodeclass Node/MobileNode+ if { $routingAgent_ == "AODVUU"} {+ set nodeclass Node/MobileNode/AODVNode+ } else {+ set nodeclass Node/MobileNode+ } } return [eval new $nodeclass $args] }diff -urN ns-2.27/tcl/lib/ns-mobilenode.tcl ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-mobilenode.tcl--- ns-2.27/tcl/lib/ns-mobilenode.tcl 2004-01-13 01:54:42.000000000 +0100+++ ../ns-allinone-2.27/ns-2.27/tcl/lib/ns-mobilenode.tcl 2004-12-01 14:23:51.911431628 +0100@@ -31,7 +31,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. #-# $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-mobilenode.tcl,v 1.48 2003/12/23 17:36:35 haldar Exp $+# $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.27/tcl/lib/ns-mobilenode.tcl,v 1.1 2004/02/13 10:10:59 erikn Exp $ # # Ported from CMU-Monarch project's mobility extensions -Padma, 10/98. #@@ -817,3 +817,104 @@ eval $self next $args $dsr_agent_ reset }+##############################################################################+# A MobileNode Class for AODV which is modeled after the SRNode Class+# but with modifications.+##############################################################################+Class Node/MobileNode/AODVNode -superclass Node/MobileNode++Node/MobileNode/AODVNode instproc init args {+ $self instvar ragent_ dmux_ classifier_ entry_point_ address_++ set ns [Simulator instance]++ eval $self next $args ;# parent class constructor++ if {$dmux_ == "" } {+ # Use the default mash and shift+ set dmux_ [new Classifier/Port]+ }+ set ragent_ [new Agent/AODVUU [$self id ]]++ # setup address (supports hier-address) for AODV agent+ $self addr $address_+ $ragent_ addr $address_+ $ragent_ node $self++ # Add the node's own address to the port demuxer+ $self add-route $address_ $dmux_++ if { [Simulator set RouterTrace_] == "ON" } {+ # Recv Target+ set rcvT [$self mobility-trace Recv "RTR"]+ set namfp [$ns get-nam-traceall]+ if { $namfp != "" } {+ $rcvT namattach $namfp+ }+ $rcvT target $ragent_+ set entry_point_ $rcvT + } else {+ # Recv Target+ set entry_point_ $ragent_+ }++ $self set ragent_ $ragent_++ # The target of the routing agent is the address classifier
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -