?? ns-2.26-aodv-uu-0.8.patch
字號:
diff -urN ns-2.26/common/packet.h ../../mod-2.26/ns-allinone-2.26/ns-2.26/common/packet.h--- ns-2.26/common/packet.h 2003-02-26 23:07:40.000000000 +0100+++ ../../mod-2.26/ns-allinone-2.26/ns-2.26/common/packet.h 2004-02-13 13:09:23.000000000 +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.93 2003/02/02 22:33:53 xuanc Exp $ (LBL)+ * @(#) $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.26/common/packet.h,v 1.1 2003/04/16 18:34:46 bjwi7937 Exp $ (LBL) */ #ifndef ns_packet_h@@ -153,6 +153,11 @@ PT_LMS, PT_LMS_SETUP, +#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 };@@ -237,6 +242,11 @@ name_[PT_LMS]="LMS"; name_[PT_LMS_SETUP]="LMS_SETUP"; +#ifdef AODV_UU+ // AODV packets in AODV-UU+ name_[PT_AODVUU] = "AODVUU";+#endif /* AODV_UU */+ name_[PT_NTYPE]= "undefined"; } const char* name(packet_t p) const { diff -urN ns-2.26/Makefile.in ../../mod-2.26/ns-allinone-2.26/ns-2.26/Makefile.in--- ns-2.26/Makefile.in 2003-02-28 01:51:25.000000000 +0100+++ ../../mod-2.26/ns-allinone-2.26/ns-2.26/Makefile.in 2004-02-13 13:09:28.000000000 +0100@@ -52,13 +52,21 @@ # 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+ 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 -DSTL_NAMESPACE=@STL_NAMESPACE@ -DUSE_SINGLE_ADDRESS_SPACE+# 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 -DSTL_NAMESPACE=@STL_NAMESPACE@ -DUSE_SINGLE_ADDRESS_SPACE -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 +75,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/diffusion -I./asim/ -I./qs-+ -I./diffusion3/diffusion -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)@@ -331,11 +342,20 @@ all: $(NS) $(BUILD_NSE) all-recursive +# AODV-UU: Added phony targets for AODV-UU+.PHONY: aodv-uu aodv-uu-clean++aodv-uu:+ cd $(AODV_UU_DIR) && $(MAKE) ns 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 $(OBJ) common/tclAppInit.o Makefile $(LINK) $(LDFLAGS) $(LDOUT)$@ \ common/tclAppInit.o $(OBJ) $(LIB) @@ -460,7 +480,8 @@ install-recursive: force for i in $(SUBDIRS); do ( cd $$i; $(MAKE) install; ) done -clean:+# AODV-UU: Added target "aodv-uu-clean"+clean: aodv-uu-clean $(RM) $(CLEANFILES) AUTOCONF_GEN = tcl/lib/ns-autoconf.tcldiff -urN ns-2.26/queue/priqueue.cc ../../mod-2.26/ns-allinone-2.26/ns-2.26/queue/priqueue.cc--- ns-2.26/queue/priqueue.cc 2003-02-26 23:09:12.000000000 +0100+++ ../../mod-2.26/ns-allinone-2.26/ns-2.26/queue/priqueue.cc 2004-02-13 13:09:35.000000000 +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 2003/04/16 18:34:46 bjwi7937 Exp $ */ #include <object.h>@@ -93,6 +93,12 @@ 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.26/tcl/lib/ns-agent.tcl ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-agent.tcl--- ns-2.26/tcl/lib/ns-agent.tcl 2003-02-26 23:09:37.000000000 +0100+++ ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-agent.tcl 2004-02-13 13:09:46.000000000 +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.26/tcl/lib/ns-agent.tcl,v 1.1 2003/04/16 18:34:46 bjwi7937 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.26/tcl/lib/ns-default.tcl ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-default.tcl--- ns-2.26/tcl/lib/ns-default.tcl 2003-02-26 23:09:37.000000000 +0100+++ ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-default.tcl 2004-02-13 13:09:46.000000000 +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.310 2003/02/13 03:11:00 buchheim Exp $+# @(#) $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.26/tcl/lib/ns-default.tcl,v 1.3 2003/10/13 20:24:39 erikn Exp $ #@@ -1174,3 +1174,20 @@ Queue set util_weight_ 0.8 # Quick Start definitions end here+Agent/AODV set gw_discovery -1++# 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.26/tcl/lib/ns-lib.tcl ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-lib.tcl--- ns-2.26/tcl/lib/ns-lib.tcl 2003-02-26 23:09:37.000000000 +0100+++ ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-lib.tcl 2004-02-13 13:09:46.000000000 +0100@@ -32,7 +32,7 @@ # SUCH DAMAGE. # -# @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-lib.tcl,v 1.255 2003/01/16 21:06:02 buchheim Exp $+# @(#) $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.26/tcl/lib/ns-lib.tcl,v 1.4 2003/11/21 15:58:13 erikn Exp $ #@@ -578,6 +578,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]@@ -628,7 +632,7 @@ $ifqType_ $ifqlen_ $phyType_ $antType_ \ $inerrProc_ $outerrProc_ $FECProc_ # Attach agent- if {$routingAgent_ != "DSR"} {+ if {$routingAgent_ != "DSR" && $routingAgent_ != "AODVUU" } { $node attach $ragent [Node set rtagent_port_] } if {$routingAgent_ == "DIFFUSION/RATE" ||@@ -648,7 +652,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 } }@@ -698,7 +702,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.26/tcl/lib/ns-mobilenode.tcl ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-mobilenode.tcl--- ns-2.26/tcl/lib/ns-mobilenode.tcl 2003-02-26 23:09:37.000000000 +0100+++ ../../mod-2.26/ns-allinone-2.26/ns-2.26/tcl/lib/ns-mobilenode.tcl 2004-02-13 13:09:46.000000000 +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.42 2002/04/01 23:07:27 buchheim Exp $+# $Header: /it/project/fo/core/ape/cvsroot/ape-sources/src/aodv-uu/ns-2.26/tcl/lib/ns-mobilenode.tcl,v 1.8 2003/11/21 16:06:41 erikn Exp $ # # Ported from CMU-Monarch project's mobility extensions -Padma, 10/98. #@@ -772,3 +772,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+ $ragent_ target $classifier_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -