?? ns-2.29-aodv-uu-0.9.1-dsr-uu-0.2-oolsr-0.99.15.patch
字號:
diff -uprN ns-2.29.orig/common/misc.cc ns-2.29/common/misc.cc--- ns-2.29.orig/common/misc.cc 2005-10-20 06:45:22.000000000 +0200+++ ns-2.29/common/misc.cc 2006-03-10 14:15:05.000000000 +0100@@ -49,6 +49,11 @@ static const char rcsid[] = #include "scheduler.h" #include "random.h" +#if defined(HAVE_PPA)+#include <copy-protocol-plugin-api.h>+#include <ns-plugee.h>+#endif+ #if defined(HAVE_INT64) class Add64Command : public TclCommand { public: @@ -237,5 +242,10 @@ void init_misc(void) (void)new Mult64Command; (void)new Int64ToDoubleCommand; #endif++#if defined(HAVE_PPA)+ (void)new LoadPluginCommand;+#endif+ } diff -uprN ns-2.29.orig/common/packet.h ns-2.29/common/packet.h--- ns-2.29.orig/common/packet.h 2005-10-20 06:45:22.000000000 +0200+++ ns-2.29/common/packet.h 2006-03-10 14:16:43.000000000 +0100@@ -155,6 +155,11 @@ enum packet_t { PT_LMS, PT_LMS_SETUP, +#if defined(HAVE_PPA)+ // Packets from plugin protocol+ PT_PLUGIN,+#endif // HAVE_PPA+ PT_SCTP, PT_SCTP_APP1, @@ -167,6 +172,11 @@ enum packet_t { // HDLC packet PT_HDLC, +#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 };@@ -251,11 +261,19 @@ public: name_[PT_LMS]="LMS"; name_[PT_LMS_SETUP]="LMS_SETUP"; +#if defined(HAVE_PPA)+ name_[PT_PLUGIN]="pluginProtocol";+#endif // HAVE_PLUGIN+ name_[PT_SCTP]= "sctp"; name_[PT_SCTP_APP1] = "sctp_app1"; // smac name_[PT_SMAC]="smac";+#ifdef AODV_UU+ // AODV packets in AODV-UU+ name_[PT_AODVUU] = "AODVUU";+#endif /* AODV_UU */ // HDLC name_[PT_HDLC]="HDLC";diff -uprN ns-2.29.orig/Makefile.in ns-2.29/Makefile.in--- ns-2.29.orig/Makefile.in 2005-10-20 06:45:22.000000000 +0200+++ ns-2.29/Makefile.in 2006-03-10 14:18:50.000000000 +0100@@ -52,13 +52,22 @@ PERL = @PERL@ # 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++DSRUU_DIR = dsr-uu+DSRUU_OBJ = dsr-uu.o+ CCOPT = @V_CCOPT@ STATIC = @V_STATIC@ #LDFLAGS = $(STATIC) LDFLAGS = @LDFLAGS@ 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+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 -DHAVE_PPA INCLUDES = \ -I. \@@ -70,13 +79,18 @@ INCLUDES = \ -I./diffusion3/lib/nr -I./diffusion3/ns \ -I./diffusion3/filter_core -I./asim/ -I./qs \ -I./diffserv -I./satellite \- -I./wpan+ -I./wpan \+ -I./smolsr \+ -I./$(AODV_UU_DIR) + LIB = \ @V_LIBS@ \ @V_LIB@ \- -lm @LIBS@+ -lm @LIBS@ \+ -L$(AODV_UU_DIR) \+ -laodv-uu # -L@libdir@ \ CFLAGS += $(CCOPT) $(DEFINE)@@ -301,6 +315,9 @@ OBJ_CC = \ wpan/p802_15_4nam.o wpan/p802_15_4phy.o \ wpan/p802_15_4sscs.o wpan/p802_15_4timer.o \ wpan/p802_15_4trace.o wpan/p802_15_4transac.o \+ smolsr/ns-plugee.o \+ $(DSRUU_DIR)/$(DSRUU_OBJ) \+ $(AODV_UU_DIR)/$(AODV_UU_LIB) \ @V_STLOBJ@ @@ -356,12 +373,57 @@ SUBDIRS=\ BUILD_NSE = @build_nse@ -all: $(NS) $(BUILD_NSE) all-recursive+# AODV-UU: Added phony targets for AODV-UU+.PHONY: aodv-uu-clean dsruu-clean +all: $(NS) $(BUILD_NSE) all-recursive all-recursive: for i in $(SUBDIRS); do ( cd $$i; $(MAKE) all; ) done +$(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++$(DSRUU_DIR)/$(DSRUU_OBJ): $(DSRUU_DIR)/*.c $(DSRUU_DIR)/*.h $(DSRUU_DIR)/Makefile+ $(MAKE) -C $(DSRUU_DIR) $(DSRUU_OBJ) NS_DEFS='$(DEFINE) -DNS2' OPTS='$(CCOPT)' NS_INC='$(subst -I.,-I$(shell pwd),$(INCLUDES))'++dsruu-clean:+ $(MAKE) -C $(DSRUU_DIR) clean++#--------------------------------------------------+# Conditional update of [copy-]protocol-plugin-api.h+#--------------------------------------------------++smolsr/ns-plugee.o: smolsr/copy-protocol-plugin-api.h \+ smolsr/ns-plugee.h++smolsr/ns-plugee-multicast.o: smolsr/copy-protocol-plugin-api.h \+ smolsr/ns-plugee.h \+ smolsr/ns-plugee-multicast.h++HAS_PPA_ORIG=$(shell test -h smolsr/original-protocol-plugin-api.h -a -f smolsr/original-protocol-plugin-api.h && echo yes)++ifeq (${HAS_PPA_ORIG},yes)++smolsr/copy-protocol-plugin-api.h: smolsr/original-protocol-plugin-api.h+ cp $< $@++else++smolsr/copy-protocol-plugin-api.h: warn-no-update++warn-no-update:+ @echo "[[WARNING: smolsr/original-protocol-plugin-api.h is not a"\+ "symbolic link to include/protocol-plugin-api.h of the OOLSR source code"\+ "hence copy-protocol-plugin-api.h WILL NOT be automatically updated,"\+ "and might become obsolete IF the version in OOLSR is changed .]]"+endif++#--------------------------------------------------+ $(NS): $(OBJ) common/tclAppInit.o Makefile $(LINK) $(LDFLAGS) $(LDOUT)$@ \ common/tclAppInit.o $(OBJ) $(LIB)@@ -492,7 +554,7 @@ install-man: force install-recursive: force for i in $(SUBDIRS); do ( cd $$i; $(MAKE) install; ) done -clean:+clean: aodv-uu-clean dsruu-clean $(RM) $(CLEANFILES) AUTOCONF_GEN = tcl/lib/ns-autoconf.tcldiff -uprN ns-2.29.orig/Makefile.in.patched ns-2.29/Makefile.in.patched--- ns-2.29.orig/Makefile.in.patched 1970-01-01 01:00:00.000000000 +0100+++ ns-2.29/Makefile.in.patched 2006-03-10 14:04:12.000000000 +0100@@ -0,0 +1,578 @@+# Copyright (c) 1994, 1995, 1996+# The Regents of the University of California. All rights reserved.+#+# Redistribution and use in source and binary forms, with or without+# modification, are permitted provided that: (1) source code distributions+# retain the above copyright notice and this paragraph in its entirety, (2)+# distributions including binary code include the above copyright notice and+# this paragraph in its entirety in the documentation or other materials+# provided with the distribution, and (3) all advertising materials mentioning+# features or use of this software display the following acknowledgement:+# ``This product includes software developed by the University of California,+# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of+# the University nor the names of its contributors may be used to endorse+# or promote products derived from this software without specific prior+# written permission.+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.+#+# @(#) $Header: 2002/10/09 15:34:11++#+# Various configurable paths (remember to edit Makefile.in, not Makefile)+#++# Top level hierarchy+prefix = @prefix@+# Pathname of directory to install the binary+BINDEST = @prefix@/bin+# Pathname of directory to install the man page+MANDEST = @prefix@/man++BLANK = # make a blank space. DO NOT add anything to this line++# The following will be redefined under Windows (see WIN32 lable below)+CC = @CC@+CPP = @CXX@+LINK = $(CPP)+MKDEP = ./conf/mkdep+TCLSH = @V_TCLSH@+TCL2C = @V_TCL2CPP@+AR = ar rc $(BLANK)++RANLIB = @V_RANLIB@+INSTALL = @INSTALL@+LN = ln+TEST = test+RM = rm -f+MV = mv+PERL = @PERL@++# 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++DSRUU_DIR = dsr-uu+DSRUU_OBJ = dsr-uu.o++CCOPT = @V_CCOPT@ +STATIC = @V_STATIC@+#LDFLAGS = $(STATIC)+LDFLAGS = @LDFLAGS@+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 -DAODV_UU -DNS_PORT++INCLUDES = \+ -I. \+ @V_INCLUDES@ \+ -I./tcp -I./sctp -I./common -I./link -I./queue \+ -I./adc -I./apps -I./mac -I./mobile -I./trace \+ -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./diffserv -I./satellite \+ -I./wpan+++LIB = \+ @V_LIBS@ \+ @V_LIB@ \+ -lm @LIBS@+# -L@libdir@ \++CFLAGS += $(CCOPT) $(DEFINE)++# Explicitly define compilation rules since SunOS 4's make doesn't like gcc.+# Also, gcc does not remove the .o before forking 'as', which can be a+# problem if you don't own the file but can write to the directory.+.SUFFIXES: .cc # $(.SUFFIXES)++.cc.o:+ @rm -f $@+ $(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cc++.c.o:+ @rm -f $@+ $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $*.c+++GEN_DIR = gen/+LIB_DIR = lib/+NS = ns+NSX = nsx+NSE = nse++# To allow conf/makefile.win overwrite this macro+# We will set these two macros to empty in conf/makefile.win since VC6.0+# does not seem to support the STL in gcc 2.8 and up. +OBJ_STL = diffusion3/lib/nr/nr.o diffusion3/lib/dr.o \+ diffusion3/filters/diffusion/one_phase_pull.o \+ diffusion3/filters/diffusion/two_phase_pull.o \+ diffusion3/lib/diffapp.o \+ diffusion3/ns/diffagent.o diffusion3/ns/diffrtg.o \+ diffusion3/ns/difftimer.o \+ diffusion3/filter_core/filter_core.o \+ diffusion3/filter_core/iolog.o \+ diffusion3/filter_core/iostats.o \+ diffusion3/lib/main/attrs.o \+ diffusion3/lib/main/events.o \+ diffusion3/lib/main/iodev.o \+ diffusion3/lib/main/iohook.o \+ diffusion3/lib/main/timers.o \+ diffusion3/lib/main/message.o \+ diffusion3/lib/main/tools.o \+ diffusion3/apps/gear_examples/gear_common.o \+ diffusion3/apps/gear_examples/gear_receiver.o \+ diffusion3/apps/gear_examples/gear_sender.o \+ diffusion3/apps/rmst_examples/rmst_sink.o \+ diffusion3/apps/rmst_examples/rmst_source.o \+ diffusion3/apps/ping/1pp_ping_sender.o \+ diffusion3/apps/ping/1pp_ping_receiver.o \+ diffusion3/apps/ping/2pp_ping_sender.o \+ diffusion3/apps/ping/2pp_ping_receiver.o \+ diffusion3/apps/ping/ping_common.o \+ diffusion3/apps/ping/push_receiver.o \+ diffusion3/apps/ping/push_sender.o \+ diffusion3/filters/gear/gear_attr.o \+ diffusion3/filters/gear/gear.o \+ diffusion3/filters/gear/gear_tools.o \+ diffusion3/filters/misc/log.o \+ diffusion3/filters/misc/srcrt.o \+ diffusion3/filters/misc/tag.o \+ diffusion3/filters/rmst/rmst.o \+ diffusion3/filters/rmst/rmst_filter.o++NS_TCL_LIB_STL = tcl/lib/ns-diffusion.tcl ++++# WIN32: uncomment the following line to include specific make for VC+++# !include <conf/makefile.win>++OBJ_CC = \+ tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o \+ common/scheduler.o common/object.o common/packet.o \+ common/ip.o routing/route.o common/connector.o common/ttl.o \+ trace/trace.o trace/trace-ip.o \+ classifier/classifier.o classifier/classifier-addr.o \+ classifier/classifier-hash.o \+ classifier/classifier-virtual.o \+ classifier/classifier-mcast.o \+ classifier/classifier-bst.o \+ classifier/classifier-mpath.o mcast/replicator.o \+ classifier/classifier-mac.o \+ classifier/classifier-qs.o \+ classifier/classifier-port.o src_rtg/classifier-sr.o \+ src_rtg/sragent.o src_rtg/hdr_src.o adc/ump.o \+ qs/qsagent.o qs/hdr_qs.o \+ apps/app.o apps/telnet.o tcp/tcplib-telnet.o \+ tools/trafgen.o trace/traffictrace.o tools/pareto.o \+ tools/expoo.o tools/cbr_traffic.o \+ adc/tbf.o adc/resv.o adc/sa.o tcp/saack.o \+ tools/measuremod.o adc/estimator.o adc/adc.o adc/ms-adc.o \+ adc/timewindow-est.o adc/acto-adc.o \+ adc/pointsample-est.o adc/salink.o adc/actp-adc.o \+ adc/hb-adc.o adc/expavg-est.o\+ adc/param-adc.o adc/null-estimator.o \+ adc/adaptive-receiver.o apps/vatrcvr.o adc/consrcvr.o \+ common/agent.o common/message.o apps/udp.o \+ common/session-rtp.o apps/rtp.o tcp/rtcp.o \+ common/ivs.o \+ common/messpass.o common/tp.o common/tpm.o apps/worm.o \+ tcp/tcp.o tcp/tcp-sink.o tcp/tcp-reno.o \+ tcp/tcp-newreno.o \+ tcp/tcp-vegas.o tcp/tcp-rbp.o tcp/tcp-full.o tcp/rq.o \+ baytcp/tcp-full-bay.o baytcp/ftpc.o baytcp/ftps.o \+ tcp/scoreboard.o tcp/scoreboard-rq.o tcp/tcp-sack1.o tcp/tcp-fack.o \+ tcp/tcp-asym.o tcp/tcp-asym-sink.o tcp/tcp-fs.o \+ tcp/tcp-asym-fs.o tcp/tcp-qs.o \+ tcp/tcp-int.o tcp/chost.o tcp/tcp-session.o \+ tcp/nilist.o \+ sctp/sctp.o apps/sctp_app1.o\
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -