├── test ├── .cvsignore ├── unit_tests │ ├── .cvsignore │ ├── priv128.pem │ ├── priv192.pem │ ├── cert128.pem │ ├── cert192.pem │ └── prophet-stats-test.cc ├── nets │ ├── things │ ├── hungerforce │ ├── localhost │ ├── tcd │ ├── remote-localhost │ ├── soda │ ├── intel │ ├── emulab │ ├── emulab-net │ └── dtntest ├── Makefile-Builddir.in ├── schedule │ └── ltp-schedule │ │ ├── sender │ │ └── ltp.sched │ │ ├── receiver │ │ └── ltp.sched │ │ └── router │ │ └── ltp.sched ├── mail │ ├── procmailrc │ └── got_file-template.sh ├── dtn-test.tcl ├── comparison │ ├── mkfile.sh │ ├── README │ ├── get_results.sh │ └── check_ping.sh ├── README ├── coredump.tcl ├── dtnsim.tcl └── startstop.tcl ├── debian ├── compat ├── dtn.postrm ├── dtn.logrotate ├── control.in ├── control ├── README.Debian ├── changelog └── rules ├── doc ├── .cvsignore ├── manual │ ├── man │ │ ├── .cvsignore │ │ └── README │ ├── latex │ │ ├── FreeSans.ttf │ │ ├── Makefile │ │ └── refman.tex │ ├── manual.css │ ├── template.html │ ├── man_dtncpd.html │ ├── man_dtnping.html │ ├── man_dtntunnel.html │ ├── man_dtncp.html │ ├── ro_external.html │ ├── ro_static.html │ ├── cl-null.html │ ├── cl-bt.html │ ├── cl-file.html │ ├── ro_tca-router.html │ ├── ro_tca-gateway.html │ ├── ro_dtlsr.html │ ├── ro_flood.html │ ├── man_dtnd.html │ ├── man_dtnrecv.html │ ├── cl-eth.html │ └── man_dtncat.html ├── ax25.txt └── plugin-architecture │ ├── bpa-interface.tex │ └── Makefile ├── dtn-version.dat ├── servlib ├── .cvsignore ├── cmd │ ├── .cvsignore │ ├── BlockCommand.h │ ├── CompletionNotifier.cc │ ├── ParamCommand.h │ ├── DiscoveryCommand.h │ ├── APICommand.h │ ├── BlockCommand.cc │ ├── LinkCommand.h │ ├── RouteCommand.h │ ├── InterfaceCommand.h │ ├── RegistrationCommand.h │ ├── StorageCommand.h │ ├── ProphetCommand.h │ ├── SecurityCommand.h │ ├── ECLACommand.h │ ├── BPQCommand.h │ ├── CompletionNotifier.h │ ├── ShutdownCommand.h │ └── TestCommand.h ├── gcm │ └── .cvsignore ├── naming │ ├── .cvsignore │ ├── IPNScheme.h │ └── Scheme.cc ├── reg │ ├── .cvsignore │ ├── PingRegistration.h │ ├── AdminRegistration.h │ └── LoggingRegistration.h ├── contacts │ ├── .cvsignore │ ├── OpportunisticLink.cc │ ├── Interface.cc │ ├── AlwaysOnLink.h │ ├── OndemandLink.h │ ├── AlwaysOnLink.cc │ ├── OndemandLink.cc │ └── OpportunisticLink.h ├── conv_layers │ ├── .cvsignore │ └── IPConvergenceLayerUtils.h ├── discovery │ ├── .cvsignore │ ├── IPNDService.cc │ ├── IPNDService.h │ └── EthAnnounce.h ├── routing │ ├── .cvsignore │ ├── RouterInfo.h │ ├── RouterInfo.cc │ ├── StaticBundleRouter.h │ └── ProphetLink.h ├── security │ ├── .cvsignore │ ├── BSPProtectionInfo.cc │ ├── Ciphersuite_BA5.cc │ ├── BSPProtectionInfo.h │ ├── Ciphersuite_BA1.cc │ ├── Ciphersuite_BA9.cc │ ├── Ciphersuite_PI10.cc │ ├── Ciphersuite_PI6.cc │ ├── ES_BlockProcessor.h │ ├── PI_BlockProcessor.h │ ├── PC_BlockProcessor.h │ ├── Ciphersuite_integ.h │ ├── BundleSecurityConfig.h │ ├── Ciphersuite_BA1.h │ ├── Ciphersuite_BA5.h │ ├── Ciphersuite_BA9.h │ ├── Ciphersuite_PI2.cc │ ├── PC_BlockProcessor.cc │ ├── PI_BlockProcessor.cc │ ├── ES_BlockProcessor.cc │ ├── README-OpenSSL │ ├── Ciphersuite_PI10.h │ ├── Ciphersuite_PI6.h │ ├── Ciphersuite_PI2.h │ └── Ciphersuite_ES4.h ├── storage │ ├── .cvsignore │ ├── PersistentStore.cc │ ├── LinkStore.cc │ └── SQLGlobalStore.h ├── prophet │ └── .cvsignore ├── bundling │ ├── .cvsignore │ ├── BundleRef.h │ ├── AgeBlockProcessor.h │ ├── BundleMappings.cc │ ├── TempBundle.h │ ├── ExpirationTimer.h │ ├── APIBlockProcessor.h │ ├── BPQResponse.h │ ├── BP_Local.h │ ├── ExpirationTimer.cc │ └── SessionBlockProcessor.h ├── ipnd.make.in └── Makefile-Builddir.in ├── applib ├── tcl │ └── .cvsignore ├── .cvsignore ├── python │ ├── .cvsignore │ └── setup.py ├── perl │ ├── .cvsignore │ └── Makefile.PL ├── Makefile-Builddir.in ├── dtn_api.i ├── sdnv-c.c ├── APIBundleQueue.h └── sdnv-c.h ├── apps ├── tca_admin │ ├── libs │ │ ├── .cvsignore │ │ ├── sha1.h │ │ └── gateway_rpc.h │ └── .cvsignore ├── dtncat │ └── .cvsignore ├── dtnrecv │ └── .cvsignore ├── dtnsend │ └── .cvsignore ├── dtntest │ └── .cvsignore ├── dtntunnel │ └── .cvsignore ├── .cvsignore ├── dtnmoteproxy │ └── .cvsignore ├── dtncp │ └── .cvsignore ├── dtncpd │ └── .cvsignore ├── dtnping │ ├── .cvsignore │ └── dtnping.h ├── dtnperf │ ├── .cvsignore │ ├── includes.h │ ├── utils.h │ └── bundle_tools.h └── Makefile-Builddir.in ├── daemon ├── .cvsignore ├── Makefile-Builddir.in └── Makefile ├── sim ├── .cvsignore ├── Makefile-Builddir.in ├── README ├── conf │ ├── ping-pong.conf │ ├── bandwidth-test.conf │ ├── linear-stress.conf │ ├── conn-test.conf │ └── dtlsr.conf ├── top.conf ├── SimCLInfo.h ├── SimEventHandler.h ├── SimCommand.h ├── ConnCommand.h ├── Topology.cc ├── Topology.h ├── SimRegistration.h ├── NodeCommand.h └── Makefile ├── aclocal.m4 ├── System.make.in ├── tools ├── dtnd-keepalive.sh └── uninstall.sh ├── emulab ├── mail │ ├── count_delivery.sh │ └── sendmail-install.sh ├── linear.ns └── send-mail.tcl ├── Makefile-Builddir.in ├── README.Cygwin ├── dtn-version.mk ├── aclocal ├── bsp.ac ├── bpq.ac ├── script_apis.ac ├── ipnd.ac ├── externaldecisionplane.ac └── externalconvergencelayer.ac ├── dtn-version.c ├── dtn-version.h ├── dtn-version.h.in ├── rpm ├── dtn-2.3.0-1.spec └── dtn.spec └── .gitignore /test/.cvsignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /doc/.cvsignore: -------------------------------------------------------------------------------- 1 | doxygen 2 | -------------------------------------------------------------------------------- /dtn-version.dat: -------------------------------------------------------------------------------- 1 | 2 9 0 2 | -------------------------------------------------------------------------------- /servlib/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /applib/tcl/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /apps/tca_admin/libs/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d -------------------------------------------------------------------------------- /servlib/cmd/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/gcm/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/naming/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/reg/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /daemon/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtnd 3 | -------------------------------------------------------------------------------- /servlib/contacts/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/conv_layers/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/discovery/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/routing/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/security/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /servlib/storage/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | -------------------------------------------------------------------------------- /apps/dtncat/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtncat 3 | -------------------------------------------------------------------------------- /apps/dtnrecv/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtnrecv 3 | -------------------------------------------------------------------------------- /apps/dtnsend/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtnsend 3 | -------------------------------------------------------------------------------- /doc/manual/man/.cvsignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | 3 | -------------------------------------------------------------------------------- /servlib/prophet/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | 3 | -------------------------------------------------------------------------------- /applib/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtn.py 3 | dtn.pyc 4 | -------------------------------------------------------------------------------- /apps/dtntest/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtntest 3 | 4 | -------------------------------------------------------------------------------- /apps/dtntunnel/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtntunnel 3 | -------------------------------------------------------------------------------- /apps/tca_admin/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | tca_admin 3 | -------------------------------------------------------------------------------- /sim/.cvsignore: -------------------------------------------------------------------------------- 1 | 2 | *.d 3 | dtnsim 4 | sim 5 | -------------------------------------------------------------------------------- /applib/python/.cvsignore: -------------------------------------------------------------------------------- 1 | build 2 | dtnapi.pyc 3 | -------------------------------------------------------------------------------- /apps/.cvsignore: -------------------------------------------------------------------------------- 1 | autoscan.log 2 | configure.scan 3 | -------------------------------------------------------------------------------- /apps/dtnmoteproxy/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtnmoteproxy 3 | -------------------------------------------------------------------------------- /test/unit_tests/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | *-test 3 | 4 | -------------------------------------------------------------------------------- /apps/dtncp/.cvsignore: -------------------------------------------------------------------------------- 1 | 2 | *.d 3 | dtncp 4 | dtnsendfile 5 | -------------------------------------------------------------------------------- /apps/dtncpd/.cvsignore: -------------------------------------------------------------------------------- 1 | 2 | *.d 3 | dtncpd 4 | dtnrecvfile 5 | -------------------------------------------------------------------------------- /apps/dtnping/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | dtnping 3 | dtntraceroute 4 | -------------------------------------------------------------------------------- /applib/perl/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | blib 3 | dtnapi.bs 4 | pm_to_blib 5 | -------------------------------------------------------------------------------- /apps/dtnperf/.cvsignore: -------------------------------------------------------------------------------- 1 | dtnperf-client 2 | dtnperf-server 3 | *.d 4 | -------------------------------------------------------------------------------- /servlib/bundling/.cvsignore: -------------------------------------------------------------------------------- 1 | *.d 2 | *.swp 3 | .BundleDaemon.cc.swp 4 | -------------------------------------------------------------------------------- /aclocal.m4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/delay-tolerant-networking/DTN2/HEAD/aclocal.m4 -------------------------------------------------------------------------------- /debian/dtn.postrm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/delay-tolerant-networking/DTN2/HEAD/debian/dtn.postrm -------------------------------------------------------------------------------- /servlib/ipnd.make.in: -------------------------------------------------------------------------------- 1 | # enabled flag for BBN IPND implementation 2 | BBN_IPND_ENABLED=@BBN_IPND_ENABLED@ 3 | 4 | -------------------------------------------------------------------------------- /doc/ax25.txt: -------------------------------------------------------------------------------- 1 | ax25.txt 2 | 3 | Please see the wiki page at: http://www.dtnrg.org/wiki/AX25ConnectedModeConvergenceLayer 4 | -------------------------------------------------------------------------------- /doc/manual/man/README: -------------------------------------------------------------------------------- 1 | This directory is filled in by the build process for 2 | each of the programs that have manpages. 3 | -------------------------------------------------------------------------------- /doc/manual/latex/FreeSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/delay-tolerant-networking/DTN2/HEAD/doc/manual/latex/FreeSans.ttf -------------------------------------------------------------------------------- /test/nets/things: -------------------------------------------------------------------------------- 1 | # This is a test for the things 2 | net::node 0 thing1.dtnrg.org 7000 3 | net::node 1 thing2.dtnrg.org 7000 4 | -------------------------------------------------------------------------------- /System.make.in: -------------------------------------------------------------------------------- 1 | # 2 | # Input file processed by configure to generete System.make 3 | # 4 | 5 | ENABLE_SCRIPT_APIS= @ENABLE_SCRIPT_APIS@ 6 | -------------------------------------------------------------------------------- /test/nets/hungerforce: -------------------------------------------------------------------------------- 1 | net::node 0 frylock 10000 2 | net::node 1 shake 10000 3 | net::node 2 carl 10000 4 | #net::node 3 meatwad 10000 5 | -------------------------------------------------------------------------------- /test/nets/localhost: -------------------------------------------------------------------------------- 1 | # 2 | # Network definition file for localhost network. 3 | # 4 | for {set i 0} {$i < 50} {incr i} { 5 | net::node $i localhost [expr 10000 + $i*1000] 6 | } 7 | -------------------------------------------------------------------------------- /tools/dtnd-keepalive.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | output=`dtnd-control status` 4 | if [ ! $? = 0 ]; then 5 | echo -n $output 6 | echo "Re-running dtnd -d $*" 7 | dtnd -d $* 8 | fi 9 | -------------------------------------------------------------------------------- /emulab/mail/count_delivery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | F=/tmp/delivery_count 4 | 5 | if [ ! -f $F ] ; then 6 | echo "1" > $F 7 | else 8 | i=`cat $F` 9 | i=$(($i+1)) 10 | echo $i > $F 11 | fi 12 | -------------------------------------------------------------------------------- /Makefile-Builddir.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to build in directories other than the source directory 3 | # 4 | SRCDIR := @SRCDIR@ 5 | BUILDDIR := @BUILDDIR@ 6 | 7 | vpath %.c $(SRCDIR) 8 | vpath %.cc $(SRCDIR) 9 | 10 | include $(SRCDIR)/Makefile 11 | -------------------------------------------------------------------------------- /doc/manual/manual.css: -------------------------------------------------------------------------------- 1 | h1 { font-family: sans-serif } 2 | h2 { font-family: sans-serif; font-style: italic } 3 | h3 { font-family: sans-serif; font-style: italic } 4 | 5 | td { border-width: 1px; border-style: solid } 6 | th { background-color: grey } 7 | -------------------------------------------------------------------------------- /debian/dtn.logrotate: -------------------------------------------------------------------------------- 1 | /var/dtn/dtnd.log { 2 | daily 3 | missingok 4 | rotate 7 5 | sharedscripts 6 | postrotate 7 | invoke-rc.d --quiet dtn logrotate > /dev/null && sleep 10 8 | endscript 9 | compress 10 | delaycompress 11 | notifempty 12 | } 13 | -------------------------------------------------------------------------------- /sim/Makefile-Builddir.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to build in directories other than the source directory 3 | # 4 | SRCDIR := @SRCDIR@ 5 | BUILDDIR := @BUILDDIR@ 6 | 7 | vpath %.c $(SRCDIR)/sim 8 | vpath %.cc $(SRCDIR)/sim 9 | 10 | include $(SRCDIR)/sim/Makefile 11 | -------------------------------------------------------------------------------- /apps/Makefile-Builddir.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to build in directories other than the source directory 3 | # 4 | SRCDIR := @SRCDIR@ 5 | BUILDDIR := @BUILDDIR@ 6 | 7 | vpath %.c $(SRCDIR)/apps 8 | vpath %.cc $(SRCDIR)/apps 9 | 10 | include $(SRCDIR)/apps/Makefile 11 | -------------------------------------------------------------------------------- /test/Makefile-Builddir.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to build in directories other than the source directory 3 | # 4 | SRCDIR := @SRCDIR@ 5 | BUILDDIR := @BUILDDIR@ 6 | 7 | vpath %.c $(SRCDIR)/test 8 | vpath %.cc $(SRCDIR)/test 9 | 10 | include $(SRCDIR)/test/Makefile 11 | -------------------------------------------------------------------------------- /test/nets/tcd: -------------------------------------------------------------------------------- 1 | # 2 | # Network definition file for a localhost network which uses 3 | # the hostname instead of "localhost" so it acts like a 4 | # distributed test. 5 | # 6 | for {set i 0} {$i < 254} {incr i} { 7 | net::node $i [info hostname] [expr 10000 + $i*1000] 8 | } 9 | -------------------------------------------------------------------------------- /test/schedule/ltp-schedule/sender/ltp.sched: -------------------------------------------------------------------------------- 1 | VERSION=1.0 2 | ME=basil.dsg.cs.tcd.ie:12002 3 | NSCHEDULES=1 4 | START,1,REL=10,DUTY=10 5 | 6 | COMMS,1,0,basil.dsg.cs.tcd.ie:11002,RX,ON 7 | COMMS,1,0,basil.dsg.cs.tcd.ie:11002,TX,ON 8 | COMMS,1,2,basil.dsg.cs.tcd.ie:11002,TX,OFF 9 | -------------------------------------------------------------------------------- /applib/Makefile-Builddir.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to build in directories other than the source directory 3 | # 4 | SRCDIR := @SRCDIR@ 5 | BUILDDIR := @BUILDDIR@ 6 | 7 | vpath %.c $(SRCDIR)/applib 8 | vpath %.cc $(SRCDIR)/applib 9 | 10 | include $(SRCDIR)/applib/Makefile 11 | -------------------------------------------------------------------------------- /daemon/Makefile-Builddir.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to build in directories other than the source directory 3 | # 4 | SRCDIR := @SRCDIR@ 5 | BUILDDIR := @BUILDDIR@ 6 | 7 | vpath %.c $(SRCDIR)/daemon 8 | vpath %.cc $(SRCDIR)/daemon 9 | 10 | include $(SRCDIR)/daemon/Makefile 11 | -------------------------------------------------------------------------------- /servlib/Makefile-Builddir.in: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to build in directories other than the source directory 3 | # 4 | SRCDIR := @SRCDIR@ 5 | BUILDDIR := @BUILDDIR@ 6 | 7 | vpath %.c $(SRCDIR)/servlib 8 | vpath %.cc $(SRCDIR)/servlib 9 | 10 | include $(SRCDIR)/servlib/Makefile 11 | -------------------------------------------------------------------------------- /test/nets/remote-localhost: -------------------------------------------------------------------------------- 1 | # 2 | # Network definition file for a localhost network which uses 3 | # the hostname instead of "localhost" so it acts like a 4 | # distributed test. 5 | # 6 | for {set i 0} {$i < 254} {incr i} { 7 | net::node $i [info hostname] [expr 10000 + $i*1000] 8 | } 9 | -------------------------------------------------------------------------------- /test/schedule/ltp-schedule/receiver/ltp.sched: -------------------------------------------------------------------------------- 1 | 2 | VERSION=1.0 3 | ME=basil.dsg.cs.tcd.ie:10002 4 | NSCHEDULES=1 5 | START,1,REL=10,DUTY=10 6 | 7 | COMMS,1,0,basil.dsg.cs.tcd.ie:11002,RX,ON 8 | COMMS,1,3,basil.dsg.cs.tcd.ie:11002,TX,ON 9 | COMMS,1,6,basil.dsg.cs.tcd.ie:11002,TX,OFF 10 | 11 | -------------------------------------------------------------------------------- /test/nets/soda: -------------------------------------------------------------------------------- 1 | net::node 0 wangari.cs.berkeley.edu 10000 2 | net::node 1 shirin.cs.berkeley.edu 10000 3 | net::node 2 frontier.cs.berkeley.edu 10000 4 | net::node 3 pisco.cs.berkeley.edu 10000 5 | net::node 4 deccan.cs.berkeley.edu 10000 6 | net::node 5 sergiu.cs.berkeley.edu 10000 7 | net::node 6 sergiu.cs.berkeley.edu 10000 8 | -------------------------------------------------------------------------------- /test/mail/procmailrc: -------------------------------------------------------------------------------- 1 | # Please check if all the paths in PATH are reachable, remove the ones that 2 | # are not. 3 | SHELL=/bin/csh 4 | PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:. 5 | MAILDIR=$HOME/Mail # You'd better make sure it exists 6 | DEFAULT=$MAILDIR/mbox 7 | LOGFILE=$MAILDIR/from 8 | LOCKFILE=$HOME/.lockmail 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/nets/intel: -------------------------------------------------------------------------------- 1 | net::node 0 spaceghost 10000 2 | net::node 1 xyzzy 10000 3 | net::node 2 spaceghost 11000 4 | net::node 3 xyzzy 11000 5 | net::node 4 spaceghost 12000 6 | net::node 5 xyzzy 12000 7 | net::node 6 spaceghost 13000 8 | net::node 7 xyzzy 13000 9 | net::node 8 spaceghost 14000 10 | net::node 9 xyzzy 14000 11 | -------------------------------------------------------------------------------- /test/unit_tests/priv128.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BggqhkjOPQMBBw== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MHcCAQEEIFl+aY0/0sxNBVopY8kfpDyAAFnXLgMWIjN7+ulfa6SgoAoGCCqGSM49 6 | AwEHoUQDQgAEDJ4zM1wsdAvbnvg5nzhDcq/wUGWCTbW/s0ZqzKqm+zQIquPAM323 7 | cl2ZzmhMWW91nepAKHJXcxc2DWJqGkDCVA== 8 | -----END EC PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /test/nets/emulab: -------------------------------------------------------------------------------- 1 | # 2 | # Network definition file for emulab hosts. 3 | # 4 | # The test must set the emulab_test global variable 5 | # 6 | if {![info exists emulab_test]} { 7 | error "must set emulab_test" 8 | } 9 | 10 | for {set i 0} {$i < 999} {incr i} { 11 | net::node $i node-$i.$emulab_test.dtn.emulab.net 10000 "-internal_host node-$i" 12 | } 13 | -------------------------------------------------------------------------------- /test/nets/emulab-net: -------------------------------------------------------------------------------- 1 | # 2 | # Network definition file for emulab hosts. 3 | # 4 | # The test must set the emulab_test global variable 5 | # 6 | if {![info exists emulab_test]} { 7 | error "must set emulab_test" 8 | } 9 | 10 | for {set i 0} {$i < 999} {incr i} { 11 | net::node $i node-$i.$emulab_test.dtn.emulab.net 10000 "-internal_host node-$i" 12 | } 13 | -------------------------------------------------------------------------------- /README.Cygwin: -------------------------------------------------------------------------------- 1 | DTN Instructions for Cygwin 2 | =========================== 3 | 4 | This version of the DTN reference implementation has been built on the 5 | Cygwin version 1.5.24-2 (released January 2007). 6 | 7 | Unfortunately there are still bugs in the implementation so the code 8 | does not run yet. This will hopefully be fixed in a future release. 9 | 10 | . 11 | -------------------------------------------------------------------------------- /test/nets/dtntest: -------------------------------------------------------------------------------- 1 | # 2 | # Net file for the intel dummynet minilab 3 | # 4 | # Note we use different hostnames for the internal test communication 5 | # to force it to go through dummynet 6 | 7 | for {set i 0} {$i < 5} {incr i} { 8 | set host dtntest[expr $i + 1] 9 | net::node $i $host 10000 10 | # net::node $i $host 10000 "-internal_host $host-dummynet" 11 | } 12 | -------------------------------------------------------------------------------- /servlib/cmd/BlockCommand.h: -------------------------------------------------------------------------------- 1 | #ifndef _BLOCK_COMMAND_H_ 2 | #define _BLOCK_COMMAND_H_ 3 | 4 | #include 5 | 6 | namespace dtn { 7 | 8 | /** 9 | * Parameter setting command 10 | */ 11 | class BlockCommand: public oasys::TclCommand { 12 | public: 13 | BlockCommand(); 14 | }; 15 | 16 | 17 | } // namespace dtn 18 | 19 | #endif /* _BLOCK_COMMAND_H_ */ 20 | -------------------------------------------------------------------------------- /doc/manual/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: TITLE 4 | 5 | 6 | 7 |

Heading 8 |

9 | 10 |

11 | This page is not yet done. Please see the todo 12 | list for information on how you can help finish this manual. 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /applib/perl/Makefile.PL: -------------------------------------------------------------------------------- 1 | # 2 | # GenPerlMakefile.pl 3 | # 4 | # Builds PerlMakefile.mk using MakeMaker 5 | # 6 | 7 | use ExtUtils::MakeMaker; 8 | 9 | WriteMakefile( 10 | 'FIRST_MAKEFILE' => 'Makefile', 11 | 'NAME' => 'dtnapi', 12 | 'INC' => "-I $ENV{INCDIR} -I $ENV{OASYSDIR}", 13 | 'LIBS' => ["-L$ENV{LIBDIR} -ldtnapi"], 14 | 'OBJECT' => 'dtn_api_wrap_perl.o', 15 | ); 16 | -------------------------------------------------------------------------------- /test/schedule/ltp-schedule/router/ltp.sched: -------------------------------------------------------------------------------- 1 | VERSION=1.0 2 | ME=basil.dsg.cs.tcd.ie:11002 3 | NSCHEDULES=1 4 | START,1,REL=10,DUTY=10 5 | 6 | COMMS,1,0,basil.dsg.cs.tcd.ie:10002,RX,ON 7 | COMMS,1,0,basil.dsg.cs.tcd.ie:12002,RX,ON 8 | COMMS,1,1,basil.dsg.cs.tcd.ie:12002,TX,ON 9 | COMMS,1,3,basil.dsg.cs.tcd.ie:10002,TX,ON 10 | COMMS,1,4,basil.dsg.cs.tcd.ie:12002,TX,OFF 11 | COMMS,1,8,basil.dsg.cs.tcd.ie:10002,TX,OFF 12 | -------------------------------------------------------------------------------- /test/unit_tests/priv192.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BgUrgQQAIg== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MIGkAgEBBDD+Y48yRYovbPmlPzv5QQnEDgI0RfJJ+dRMEkhlAa0WEL6Cmx2R1tf0 6 | 6fGXHekhYsGgBwYFK4EEACKhZANiAAQZHc+N39VMW6K8k4RCOq5YnelLPWieg83w 7 | RZZw45SmIrMzMhNA5fOiDQQhXpu+pIfOezDyIJQqWxah+zJli1KY6T4EPHD2jOhZ 8 | Ogr2fyc06bdSCd7NnKG6DQSienC4QX8= 9 | -----END EC PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /apps/dtnperf/includes.h: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDES_H_ 2 | #define INCLUDES_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | 21 | #endif /*INCLUDES_H_*/ 22 | -------------------------------------------------------------------------------- /dtn-version.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile to set version bindings 3 | # 4 | 5 | EXTRACT_VERSION := $(OASYS_ETCDIR)/tools/extract-version 6 | 7 | DTN_VERSION := $(shell $(EXTRACT_VERSION) $(SRCDIR)/dtn-version.dat version) 8 | DTN_VERSION_MAJOR := $(shell $(EXTRACT_VERSION) $(SRCDIR)/dtn-version.dat major) 9 | DTN_VERSION_MINOR := $(shell $(EXTRACT_VERSION) $(SRCDIR)/dtn-version.dat minor) 10 | DTN_VERSION_PATCH := $(shell $(EXTRACT_VERSION) $(SRCDIR)/dtn-version.dat patch) 11 | -------------------------------------------------------------------------------- /applib/dtn_api.i: -------------------------------------------------------------------------------- 1 | /* -*-c-*- */ 2 | 3 | %module dtnapi 4 | %include cstring.i 5 | %include std_string.i 6 | 7 | %{ 8 | /* Include files needed to build the wrapper code */ 9 | using namespace std; 10 | 11 | #include 12 | #include 13 | #include 14 | %} 15 | 16 | /* Pull in the functions and types to be exported by swig */ 17 | 18 | %include "dtn_types.h" 19 | %include "dtn_errno.h" 20 | %include "dtn_api_wrap.cc" 21 | -------------------------------------------------------------------------------- /doc/manual/man_dtncpd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Man pages: dtncpd 4 | 5 | 6 | 7 |

dtncpd 8 |

9 | 10 |

11 |

NAME 12 |

13 |

14 | dtncpd - receive a bundle 15 | 16 |

SYNOPSIS 17 |

18 |

19 | dtncpd [ directory ] 20 |

optional directory parameter is where incoming files will get put (defaults to: /var/dtn/dtncpd-incoming) 21 |

DESCRIPTION 22 |

23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/manual/man_dtnping.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Man pages: dtnping 4 | 5 | 6 | 7 |

dtnping 8 |

9 | 10 |

11 |

NAME 12 |

13 |

14 | dtnping - send a bundle to a valid destination eid or "localhost", in which case we just use the local daemon 15 | 16 |

SYNOPSIS 17 |

18 |

19 | dtnping [-c count] [-i interval] [-e expiration] eid 20 |

DESCRIPTION 21 |

22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /doc/manual/man_dtntunnel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Man pages: dtnping 4 | 5 | 6 | 7 |

dtnping 8 |

9 | 10 |

11 |

NAME 12 |

13 |

14 | dtnping - send a bundle to a valid destination eid or "localhost", in which case we just use the local daemon 15 | 16 |

SYNOPSIS 17 |

18 |

19 | dtnping [-c count] [-i interval] [-e expiration] eid 20 |

DESCRIPTION 21 |

22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /sim/README: -------------------------------------------------------------------------------- 1 | DTN Reference Implementation Simulator 2 | ====================================== 3 | 4 | This directory contains the source code for the DTN simulation 5 | environment. 6 | 7 | [March 2012] 8 | After some years of (probable) non-functioning, the simulator has been 9 | repaired. Added expiration parameter to simulator registrations (defaults 10 | to 10 seconds). 11 | 12 | [Note from 2004!] 13 | NOTE: the framework is still in a pre-release state. Internal APIs and 14 | structures will likely change in upcoming revisions. 15 | -------------------------------------------------------------------------------- /servlib/security/BSPProtectionInfo.cc: -------------------------------------------------------------------------------- 1 | #include "BSPProtectionInfo.h" 2 | #include "bundling/Bundle.h" 3 | #include "BP_Local_CS.h" 4 | 5 | #ifdef BSP_ENABLED 6 | namespace dtn { 7 | bool BSPProtectionInfo::src_matches(EndpointIDPatternNULL src, const Bundle *b) const { 8 | return BP_Local_CS::security_src_matches(secsrc, src, b, csnum); 9 | } 10 | 11 | bool BSPProtectionInfo::dest_matches(EndpointIDPatternNULL dest, const Bundle *b) const { 12 | return BP_Local_CS::security_dest_matches(secdest, dest, b, csnum); 13 | } 14 | } 15 | #endif 16 | -------------------------------------------------------------------------------- /apps/tca_admin/libs/sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef _SHA1_H 2 | #define _SHA1_H 3 | 4 | #ifndef uint8 5 | #define uint8 unsigned char 6 | #endif 7 | 8 | #ifndef uint32 9 | #define uint32 unsigned long int 10 | #endif 11 | 12 | typedef struct 13 | { 14 | uint32 total[2]; 15 | uint32 state[5]; 16 | uint8 buffer[64]; 17 | } 18 | sha1_context; 19 | 20 | void sha1_starts( sha1_context *ctx ); 21 | void sha1_update( sha1_context *ctx, uint8 *input, uint32 length ); 22 | void sha1_finish( sha1_context *ctx, uint8 digest[20] ); 23 | 24 | #endif /* sha1.h */ 25 | -------------------------------------------------------------------------------- /doc/manual/latex/Makefile: -------------------------------------------------------------------------------- 1 | all: clean refman.pdf 2 | 3 | pdf: refman.pdf 4 | 5 | refman.pdf: refman.tex 6 | pdflatex refman.tex 7 | makeindex refman.idx 8 | pdflatex refman.tex 9 | latex_count=5 ; \ 10 | while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\ 11 | do \ 12 | echo "Rerunning latex...." ;\ 13 | pdflatex refman.tex ;\ 14 | latex_count=`expr $$latex_count - 1` ;\ 15 | done 16 | 17 | 18 | clean: 19 | rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf 20 | -------------------------------------------------------------------------------- /debian/control.in: -------------------------------------------------------------------------------- 1 | Package: dtnd 2 | Version: %MAJOR%.%MINOR%-%PATCH% 3 | Section: net 4 | Priority: optional 5 | Architecture: i386 6 | Essential: no 7 | Depends: tcl8.4 tclx8.4-dev tcllib libxerces-c2-dev libdb4.7, tcl8.4 8 | Recommends: tclreadline 9 | Installed-Size: 2048 10 | Maintainer: dtn-users [dtn-users@mailman.dtnrg.org] 11 | Provides: dtnd 12 | Description: Delay Tolerant Networking reference implementation. 13 | This package includes the Delay Tolerant Networking (DTN) 14 | daemon (dtnd) as well as several example applications 15 | that use the DTN protocols. 16 | -------------------------------------------------------------------------------- /aclocal/bsp.ac: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Autoconf support for Bundle Security Protocol 3 | dnl 4 | 5 | AC_DEFUN(AC_CONFIG_BSP, [ 6 | ac_bsp='no' 7 | AC_ARG_WITH(bsp, 8 | AC_HELP_STRING([--with-bsp], 9 | [enable Bundle Security Protocol support (EXPERIMENTAL)]), 10 | ac_bsp=$withval) 11 | dnl 12 | dnl First make sure we even want it 13 | dnl 14 | if test "$ac_bsp" = no; then 15 | BSP_ENABLED=0 16 | else 17 | BSP_ENABLED=1 18 | AC_DEFINE_UNQUOTED(BSP_ENABLED, 1, [whether Bundle Security Protocol support is enabled]) 19 | fi # BSP_ENABLED 20 | ]) 21 | -------------------------------------------------------------------------------- /doc/plugin-architecture/bpa-interface.tex: -------------------------------------------------------------------------------- 1 | \subsection{Bundle Protocol Agent Interface} 2 | 3 | The bundle protocol agent interface will use the current DTN2 application 4 | interface. We seek feedback on any additional features that are required 5 | for this interface. 6 | 7 | In addition, MITRE is developing an XML-based interface that conforms 8 | to the ICCP. The interface being developed is expected to support the 9 | same primitives as are found in the current RPC-based interface in DTN2. 10 | We expect the XML-based BPA interface to be included in a future version 11 | of this document. 12 | 13 | -------------------------------------------------------------------------------- /aclocal/bpq.ac: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Autoconf support for Bundle Protocol Query Extension 3 | dnl 4 | 5 | AC_DEFUN(AC_CONFIG_BPQ, [ 6 | ac_bpq='no' 7 | AC_ARG_WITH(bpq, 8 | AC_HELP_STRING([--with-bpq], 9 | [enable Bundle Protocol Query Extension support]), 10 | ac_bpq=$withval) 11 | dnl 12 | dnl First make sure we even want it 13 | dnl 14 | if test "$ac_bpq" = no; then 15 | BPQ_ENABLED=0 16 | else 17 | BPQ_ENABLED=1 18 | AC_DEFINE_UNQUOTED(BPQ_ENABLED, 1, [whether Bundle Protocol Query Extension support is enabled]) 19 | fi # BPQ_ENABLED 20 | ]) -------------------------------------------------------------------------------- /aclocal/script_apis.ac: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Autoconf support for building scripting apis 3 | dnl 4 | dnl 5 | 6 | AC_DEFUN(AC_CONFIG_SCRIPT_APIS, [ 7 | AC_MSG_CHECKING(for --enable-scriptapis) 8 | AC_ARG_ENABLE(scriptapis, 9 | AC_HELP_STRING([--enable-scriptapis], 10 | [Enable PYTHON, PERL and TCL APIs]), 11 | [ENABLE_SCRIPT_APIS=yes 12 | AC_SUBST(ENABLE_SCRIPT_APIS) 13 | AC_MSG_RESULT(yes) 14 | ], 15 | [ENABLE_SCRIPT_APIS= 16 | AC_SUBST(ENABLE_SCRIPT_APIS) 17 | AC_MSG_RESULT(no) 18 | ]) 19 | ]) 20 | 21 | -------------------------------------------------------------------------------- /aclocal/ipnd.ac: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Autoconf support for BBN IPND 3 | dnl 4 | 5 | AC_DEFUN(AC_CONFIG_BBN_IPND, [ 6 | ac_bbn_ipnd='no' 7 | AC_ARG_WITH(bbn-ipnd, 8 | AC_HELP_STRING([--with-bbn-ipnd], 9 | [enable BBN IPND discovery protocol (EXPERIMENTAL)]), 10 | ac_bbn_ipnd=$withval) 11 | dnl 12 | dnl First make sure we even want it 13 | dnl 14 | if test "$ac_bbn_ipnd" = no; then 15 | BBN_IPND_ENABLED=0 16 | else 17 | BBN_IPND_ENABLED=1 18 | AC_DEFINE_UNQUOTED(BBN_IPND_ENABLED, 1, [whether BBN IPND discovery protocol is enabled]) 19 | AC_SUBST(BBN_IPND_ENABLED) 20 | fi # BBN_IPND_ENABLED 21 | ]) 22 | -------------------------------------------------------------------------------- /doc/plugin-architecture/Makefile: -------------------------------------------------------------------------------- 1 | .SUFFIXES: .eps .tex .ps .dvi .fig 2 | SUPPORTTEX= plugin-architecture.tex bpa-interface.tex cla-interface.tex decision-interface.tex ds-interface.tex 3 | SUPPORTFIG= figs/modules-orig.pdf figs/modules-rev.pdf figs/kbintf.pdf figs/components-toplevel.pdf 4 | PDFDOCS= plugin-architecture.pdf 5 | 6 | all: ${PDFDOCS} clean 7 | 8 | %.pdf: %.tex ${SUPPORTTEX} ${SUPPORTFIG} 9 | pdflatex $< 10 | pdflatex $< 11 | pdflatex $< 12 | 13 | %.eps: %.fig 14 | fig2dev -L eps $< $@ 15 | 16 | %.pdf: %.eps 17 | epstopdf $< > $@ 18 | 19 | clean: 20 | rm -f *.dvi *.log *.aux *.bbl *.blg *.toc *.lof *.lot 21 | realclean: clean 22 | rm -f *.ps *.pdf ${SUPPORTFIG} 23 | -------------------------------------------------------------------------------- /doc/manual/man_dtncp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Man pages: dtncp 4 | 5 | 6 | 7 |

dtncp 8 |

9 | 10 |

11 |

NAME 12 |

13 |

14 | dtncp - copy a bundle to a valid destination eid 15 |

SYNOPSIS 16 |

17 |

18 | usagedtncp [-D] [--expiration sec] filename destination_eid remote-name 19 | 20 |

Remote filename is optional; defaults to the local filename. 21 | 22 |

-D disables acknowledgements 23 |

Bundle expiration time is in seconds 24 |

25 | dtncp [-c count] [-i interval] [-e expiration] eid 26 |

DESCRIPTION 27 |

28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/manual/ro_external.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: External Router 4 | 5 | 6 | 7 |

External Router 8 |

9 | 10 |

11 | ExternalRouter provides a plug-in interface for third-party 12 | routing protocol implementations.Events received from BundleDaemon 13 | are serialized into XML messages and UDP multicasted to external 14 | bundle router processes. XML actions received on the interface are 15 | validated, transformed into events, and placed on the global event 16 | queue. For more information please see the ecla command. 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /doc/manual/ro_static.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: Static Routing Protocol 4 | 5 | 6 | 7 |

Static Routing Protocol 8 |

9 | 10 |

11 | This is the implementation of the basic bundle routing algorithm 12 | that only does static routing. Routes can be parsed from a 13 | configuration file or injected via the command line and/or 14 | management interfaces. 15 | 16 | As a result, the class simply uses the default event handlers from 17 | the table based router implementation. For more information please see 18 | the route command. 19 |

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/unit_tests/cert128.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBzzCCAXagAwIBAgIJAMhutTo2wfasMAkGByqGSM49BAEwRTELMAkGA1UEBhMC 3 | QVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdp 4 | dHMgUHR5IEx0ZDAeFw0xMjA2MjkwMTQ2MTBaFw0xMjA3MjkwMTQ2MTBaMEUxCzAJ 5 | BgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5l 6 | dCBXaWRnaXRzIFB0eSBMdGQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQMnjMz 7 | XCx0C9ue+DmfOENyr/BQZYJNtb+zRmrMqqb7NAiq48AzfbdyXZnOaExZb3Wd6kAo 8 | cldzFzYNYmoaQMJUo1AwTjAdBgNVHQ4EFgQUY01QMFtJBo1GsS5Ehsgi/5ftDXAw 9 | HwYDVR0jBBgwFoAUY01QMFtJBo1GsS5Ehsgi/5ftDXAwDAYDVR0TBAUwAwEB/zAJ 10 | BgcqhkjOPQQBA0gAMEUCIQCnfZoy4V9Zmk9tKrimtotU+d6+aAo/4a0oLLB3R+Q5 11 | wwIgZmrWOYAXWxhlhuk2WutIZUDiKDsIPvwbv/IdF8FVyKQ= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /sim/conf/ping-pong.conf: -------------------------------------------------------------------------------- 1 | # Two nodes that send 10 bundles back and forth 2 | 3 | sim set runtill 5000 4 | sim set route_type static 5 | conn set type static 6 | 7 | sim create_node n0 8 | sim create_node n1 9 | 10 | n0 route local_eid dtn://n0 11 | n1 route local_eid dtn://n1 12 | 13 | n0 registration add dtn://n0/* 14 | n1 registration add dtn://n1/* 15 | 16 | n0 link add l-n1 n1 ONDEMAND sim 17 | n1 link add l-n0 n0 ONDEMAND sim 18 | 19 | n0 route add dtn://n1/* l-n1 20 | n1 route add dtn://n0/* l-n0 21 | 22 | conn 3 up n0 n1 23 | conn 3 up n1 n0 24 | 25 | sim at 4.0 n0 tragent dtn://n0/src dtn://n1/dst size=512 reps=10 interval=1.5 26 | sim at 4.5 n1 tragent dtn://n1/src dtn://n0/dst size=512 reps=10 interval=1.5 27 | 28 | conn 100 down * * 29 | 30 | -------------------------------------------------------------------------------- /sim/top.conf: -------------------------------------------------------------------------------- 1 | set dbdir "/tmp/bundledb" 2 | 3 | #storage set dbdir $dbdir 4 | 5 | #storage init postgres 6 | #storage init berkeleydb 7 | 8 | sim set runtill 100 9 | route set type flood 10 | sim set nodetype 2 11 | sim 0 create_node 0 12 | sim 0 create_node 1 13 | #sim

Null Convergence Layer 8 |

9 | 10 |

11 | The Null convergence layer consumes all bundles immediately and does no actual transmission, roughly similar to /dev/null. To add a null interface in your config file, use: 12 | 13 | 14 |

Syntax: interface add name CL [arg=val arg=val2 argN=valN...] 15 |

Example: interface add null0 null 16 |

Valid arguments for arg are: 17 | 18 |

19 | 20 | 21 | 27 |
arg 22 | Possible settings 23 | Default 24 | Comments 25 | 26 |
can_transmit 28 | true or false 29 | true 30 | Whether null CL can transmit 31 |
32 |

Note 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /servlib/naming/IPNScheme.h: -------------------------------------------------------------------------------- 1 | #ifndef _IPN_SCHEME_H_ 2 | #define _IPN_SCHEME_H_ 3 | 4 | #define __STDC_FORMAT_MACROS 5 | #include 6 | 7 | #include "Scheme.h" 8 | #include 9 | 10 | namespace dtn 11 | { 12 | 13 | class IPNScheme : public Scheme, public oasys::Singleton 14 | 15 | { 16 | public: 17 | 18 | virtual bool validate(const URI& uri, bool is_pattern = false); 19 | virtual bool match(const EndpointIDPattern& pattern, 20 | const EndpointID& eid); 21 | virtual singleton_info_t is_singleton(const URI& uri); 22 | 23 | virtual bool append_service_tag(URI* uri, const char* tag); 24 | virtual bool remove_service_tag(URI* uri); 25 | private: 26 | friend class oasys::Singleton; 27 | IPNScheme() {} 28 | }; 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /sim/conf/bandwidth-test.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Import all the test utilities 3 | # 4 | set base_test_dir [pwd] 5 | while {! [file exists "$base_test_dir/sim/sim-test-utils.tcl"] } { 6 | set base_test_dir [file dirname $base_test_dir] 7 | if {$base_test_dir == "/"} { 8 | error "must run this script from a DTN2 subdirectory" 9 | } 10 | } 11 | source $base_test_dir/sim/sim-test-utils.tcl 12 | 13 | sim create_node n0 14 | sim create_node n1 15 | 16 | n0 route local_eid dtn://n0 17 | n1 route local_eid dtn://n1 18 | 19 | n0 link add l-n1 n1 alwayson sim 20 | n1 link add l-n0 n0 alwayson sim 21 | 22 | n0 route add dtn://n1/* l-n1 23 | n1 route add dtn://n0/* l-n0 24 | 25 | n0 registration add dtn://n0/* 60 26 | n1 registration add dtn://n1/* 60 27 | 28 | conn set type static 29 | conn up * * bw=81920bps latency=15ms 30 | 31 | # inject 100 10K packets 32 | sim at 10 n0 tragent n0 n1 size=[expr (10 * 1024) - 57] reps=1 batch=100\ 33 | expiration=300 34 | -------------------------------------------------------------------------------- /dtn-version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DTN_VERSION_H_ 18 | #define _DTN_VERSION_H_ 19 | 20 | #define DTN_VERSION_MAJOR 2 21 | #define DTN_VERSION_MINOR 9 22 | #define DTN_VERSION_PATCH 0 23 | #define DTN_VERSION_STRING "2.9.0" 24 | 25 | extern const char* dtn_version; 26 | 27 | #endif /* _DTN_VERSION_H_ */ 28 | -------------------------------------------------------------------------------- /aclocal/externaldecisionplane.ac: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Autoconf support for external decision plane 3 | dnl 4 | 5 | AC_DEFUN(AC_CONFIG_EXTERNAL_DP, [ 6 | ac_edp='yes' 7 | AC_ARG_ENABLE(edp, 8 | AC_HELP_STRING([--disable-edp], 9 | [disable external decision plane support]), 10 | ac_edp=$enableval) 11 | dnl 12 | dnl First make sure we even want it 13 | dnl 14 | AC_MSG_CHECKING(whether to enable external decision plane support) 15 | if test "$ac_edp" = no; then 16 | AC_MSG_RESULT(no) 17 | EXTERNAL_DP_ENABLED=0 18 | else 19 | AC_MSG_RESULT(yes) 20 | 21 | AC_OASYS_SUPPORTS(XERCES_C_ENABLED) 22 | if test $ac_oasys_supports_result != yes ; then 23 | AC_MSG_ERROR([external decision plane support requires xerces... install it or configure --disable-edp]) 24 | fi 25 | 26 | AC_DEFINE_UNQUOTED(EXTERNAL_DP_ENABLED, 1, [whether external decision plane support is enabled]) 27 | fi # EXTERNAL_DP_ENABLED 28 | ]) 29 | -------------------------------------------------------------------------------- /emulab/linear.ns: -------------------------------------------------------------------------------- 1 | source tb_compat.tcl 2 | set ns [new Simulator] 3 | 4 | # 5 | # Parameters 6 | # 7 | 8 | # Number of nodes 9 | set num 5 10 | 11 | # Bandwidth / delay 12 | set bandwidth 128kb 13 | set delay 0ms 14 | 15 | # OS Image 16 | set image FC8-DTN 17 | 18 | # Hardware 19 | # tb-make-soft-vtype hw {pc3000 pc2000 pc850} 20 | # set hw_type hw 21 | set hw_type pc3000 22 | 23 | # Tracing 24 | set trace_type header 25 | 26 | # 27 | # Script 28 | # 29 | 30 | # make nodes, set up os and hardware 31 | for {set i 0} {$i < $num} {incr i} { 32 | set node($i) [$ns node] 33 | tb-set-node-os $node($i) $image 34 | tb-set-hardware $node($i) $hw_type 35 | } 36 | 37 | # make links 38 | for {set i 0} {$i < [expr $num - 1]} {incr i} { 39 | set j [expr $i + 1] 40 | set links($i-$j) [$ns duplex-link $node($i) $node($j) $bandwidth $delay DropTail] 41 | $links($i-$j) trace $trace_type 42 | } 43 | 44 | tb-set-sync-server $node(0) 45 | 46 | $ns rtproto Static 47 | $ns run 48 | -------------------------------------------------------------------------------- /applib/python/setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup, Extension 2 | from os import getenv 3 | 4 | INCDIR = getenv('INCDIR') 5 | OASYSDIR = getenv('OASYSDIR') 6 | LIBDIR = getenv('LIBDIR') 7 | VERSION = getenv('VERSION') 8 | 9 | if INCDIR == None: raise ValueError('must set INCDIR') 10 | if OASYSDIR == None: raise ValueError('must set OASYSDIR') 11 | if LIBDIR == None: raise ValueError('must set LIBDIR') 12 | if VERSION == None: raise ValueError('must set VERSION') 13 | 14 | setup(name="dtnapi", 15 | version=VERSION, 16 | description="DTN API Python Bindings", 17 | author="Michael Demmer", 18 | author_email="demmer@cs.berkeley.edu", 19 | url="http://www.dtnrg.org", 20 | py_modules=["dtnapi"], 21 | ext_modules=[Extension("_dtnapi", ["dtn_api_wrap_python.cc"], 22 | include_dirs=[INCDIR,OASYSDIR], 23 | library_dirs=[LIBDIR], 24 | libraries=["".join(['dtnapi-', VERSION])])] 25 | ) 26 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: dtn 2 | Section: net 3 | Priority: optional 4 | Maintainer: dtn-users mailing list [dtn-users@mailman.dtnrg.org] 5 | Build-Depends: liboasys-dev, python2.4-dev | python2.5-dev | python2.6-dev | python3.0-dev 6 | 7 | 8 | Package: dtn 9 | Architecture: any 10 | Suggests: tclreadline 11 | Depends: ${shlibs:Depends} 12 | Provides: dtn 13 | Description: Delay Tolerant Networking reference implementation 14 | . 15 | This package contains the reference implementation of the Delay 16 | Tolerant Networking (DTN) architecture. This includes the DTN daemon 17 | (dtnd) as well as several example applications that use the DTN 18 | protocols. 19 | . 20 | Homepage: http://www.dtnrg.org 21 | 22 | 23 | Package: python-dtn 24 | Depends: dtn 25 | Provides: ${python:Provides} 26 | Architecture: all 27 | Description: DTN python api 28 | . 29 | This package contains python bindings for applications to use the DTN 30 | reference implementation. 31 | . 32 | Homepage: http://www.dtnrg.org 33 | 34 | -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- 1 | DTN for Debian 2 | -------------- 3 | 4 | This debian package does not conform to any of the real Debian 5 | policies or guidelines, but it's been included here for convenience. 6 | 7 | The process used to build the debian packages is: 8 | 9 | First update the debian/changelog, typically using: 10 | dch -v 11 | 12 | Then check in the updated changelog and create a release tag 13 | containing the update. 14 | 15 | Make sure you have debuild, debhelper, and fakeroot installed. 16 | 17 | cvs export -r -d dtn- DTN2 18 | dpkg-source -b dtn- 19 | cd dtn- && debuild -r fakeroot binary 20 | 21 | Then, to buld an apt repository, the following commands were used, 22 | where debian_version is the release name (i.e. sarge/etch) of the 23 | target system: 24 | 25 | reprepro -b includedeb dtn-_i386.deb 26 | reprepro -b -S contrib -P optional \ 27 | includedsc dtn_-.dsc 28 | 29 | 30 | -------------------------------------------------------------------------------- /dtn-version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DTN_VERSION_H_ 18 | #define _DTN_VERSION_H_ 19 | 20 | #define DTN_VERSION_MAJOR %MAJOR% 21 | #define DTN_VERSION_MINOR %MINOR% 22 | #define DTN_VERSION_PATCH %PATCH% 23 | #define DTN_VERSION_STRING "%MAJOR%.%MINOR%.%PATCH%" 24 | 25 | extern const char* dtn_version; 26 | 27 | #endif /* _DTN_VERSION_H_ */ 28 | -------------------------------------------------------------------------------- /servlib/security/BSPProtectionInfo.h: -------------------------------------------------------------------------------- 1 | #ifndef __BSPPROTECTIONINFO_H__ 2 | #define __BSPPROTECTIONINFO_H__ 3 | 4 | #ifdef HAVE_CONFIG_H 5 | # include 6 | #endif 7 | 8 | #ifdef BSP_ENABLED 9 | 10 | #include "oasys/serialize/Serialize.h" 11 | #include "security/SecurityConfig.h" 12 | 13 | 14 | namespace dtn { 15 | class Bundle; 16 | class BSPProtectionInfo: public oasys::SerializableObject { 17 | public: 18 | int csnum; 19 | EndpointID secsrc; 20 | EndpointID secdest; 21 | BSPProtectionInfo() { 22 | }; 23 | BSPProtectionInfo(oasys::Builder& builder) { 24 | (void) builder; 25 | }; 26 | virtual void serialize(oasys::SerializeAction* a) { 27 | a->process("csnum",&csnum); 28 | a->process("secsrc", &secsrc); 29 | a->process("secdest", &secdest); 30 | } 31 | bool src_matches(EndpointIDPatternNULL src, const Bundle *b) const; 32 | bool dest_matches(EndpointIDPatternNULL dest, const Bundle *b) const; 33 | }; 34 | 35 | } 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /aclocal/externalconvergencelayer.ac: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl Autoconf support for external convergence layer 3 | dnl 4 | 5 | AC_DEFUN(AC_CONFIG_EXTERNAL_CL, [ 6 | ac_ecl='yes' 7 | AC_ARG_ENABLE(ecl, 8 | AC_HELP_STRING([--disable-ecl], 9 | [disable external convergence layer support]), 10 | ac_ecl=$enableval) 11 | dnl 12 | dnl First make sure we even want it 13 | dnl 14 | AC_MSG_CHECKING(whether to enable external convergence layer support) 15 | if test "$ac_ecl" = no; then 16 | AC_MSG_RESULT(no) 17 | EXTERNAL_CL_ENABLED=0 18 | else 19 | AC_MSG_RESULT(yes) 20 | 21 | AC_OASYS_SUPPORTS(XERCES_C_ENABLED) 22 | if test $ac_oasys_supports_result != yes ; then 23 | AC_MSG_ERROR([external convergence layer support requires xerces... install it or configure --disable-ecl]) 24 | fi 25 | 26 | EXTERNAL_CL_ENABLED=1 27 | AC_DEFINE_UNQUOTED(EXTERNAL_CL_ENABLED, 1, [whether external convergence layer support is enabled]) 28 | fi # EXTERNAL_CL_ENABLED 29 | ]) 30 | -------------------------------------------------------------------------------- /servlib/bundling/BundleRef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _BUNDLEREF_H_ 18 | #define _BUNDLEREF_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | class Bundle; 25 | 26 | /** 27 | * Class definition for a Bundle reference. 28 | */ 29 | typedef oasys::Ref BundleRef; 30 | 31 | } // namespace dtn 32 | 33 | #endif /* _BUNDLEREF_H_ */ 34 | -------------------------------------------------------------------------------- /doc/manual/cl-bt.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: Bluetooth Convergence Layer 4 | 5 | 6 | 7 |

Bluetooth Convergence Layer 8 |

9 | 10 |

11 | In Bluetooth, piconets are formed by one Master connecting to up to seven Slaves. The device performing connect() is the Master and the device performing listen()/accept() is the Slave. To add a bluetooth interface in your config file, use: 12 | 13 | 14 |

15 | Syntax: interface add name CL [arg=val arg=val2 argN=valN...] 16 |

Example: interface add bluetooth0 bt channel=10 17 |

Valid arguments for arg are: 18 | 19 |

20 | 21 | 22 | 28 |
arg 23 | Possible settings 24 | Default 25 | Comments 26 | 27 |
channel 29 | number (channel) 30 | 10 31 | The bluetooth RFCOMM channel 32 |
33 |

Note 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /doc/manual/cl-file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: File Convergence Layer 4 | 5 | 6 | 7 |

File Convergence Layer 8 |

9 |

DO NOT USE - NOT WORKING 12/11/09 10 |

11 | To add a file interface in your config file, use: 12 | 13 | 14 |

15 | Syntax: interface add name CL [arg=val arg=val2 argN=valN...] 16 |

Example: interface add file0 file 17 |

Valid arguments for arg are: 18 |

19 | 20 | 21 | 27 |
arg 22 | Possible settings 23 | Default 24 | Comments 25 | 26 |
secs_per_scan 28 | number (seconds) 29 | 5 30 | Directory scan interval 31 |
32 |

Note 33 | The ssp part of the next hop URI (the contact EID) MUST be of the form: /path1/path2. 34 | The given directory indicated by the spp part MUST exist and the permissions MUST be correct 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/manual/ro_tca-router.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: tca-router Routing Algorithm 4 | 5 | 6 | 7 |

tca-router Routing Algorithm 8 |

9 | 10 |

11 | This is the implementation of the TCA bundle routing algorithm. 12 |

13 | A TCARouter is a specialized TableBasedRouter where the route 14 | table is manipulated in response to certain control bundles 15 | (for example, a "register" bundle, or a "change-of-address" bundle). 16 | Specialized routing logic is then applied in order to route late-bound 17 | bundles addressed to a mobile node, to the mobile's current location 18 | in the network. 19 |

20 | The main interface point is the overridden handle_bundle_received 21 | function which tests for the special TCA bundles (control bundles and 22 | late-bound data bundles). For more information please see the 23 | route command. 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /doc/manual/ro_tca-gateway.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: tca-router Routing Algorithm 4 | 5 | 6 | 7 |

tca-router Routing Algorithm 8 |

9 | 10 |

11 | This is the implementation of the TCA bundle routing algorithm. 12 |

13 | A TCARouter is a specialized TableBasedRouter where the route 14 | table is manipulated in response to certain control bundles 15 | (for example, a "register" bundle, or a "change-of-address" bundle). 16 | Specialized routing logic is then applied in order to route late-bound 17 | bundles addressed to a mobile node, to the mobile's current location 18 | in the network. 19 |

20 | The main interface point is the overridden handle_bundle_received 21 | function which tests for the special TCA bundles (control bundles and 22 | late-bound data bundles). For more information please see the 23 | route command. 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/dtn-test.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2004-2006 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # Simple wrapper script that includes all the other test utility scripts 19 | # 20 | source "test/test-utils.tcl" 21 | source "test/network.tcl" 22 | source "test/topology.tcl" 23 | 24 | source "test/file-injector.tcl" 25 | source "test/tcl-registration.tcl" 26 | source "test/bundle-smtpd.tcl" 27 | source "test/serial-forwarder-registration.tcl" 28 | 29 | -------------------------------------------------------------------------------- /servlib/naming/Scheme.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include 22 | 23 | #include "Scheme.h" 24 | #include "EndpointID.h" 25 | 26 | namespace dtn { 27 | 28 | //---------------------------------------------------------------------- 29 | Scheme::~Scheme() 30 | { 31 | } 32 | 33 | } // namespace dtn 34 | -------------------------------------------------------------------------------- /sim/conf/linear-stress.conf: -------------------------------------------------------------------------------- 1 | # Simulator stress test -- puts N nodes in a linear topology and then 2 | # sends K bundles from end to end. 3 | 4 | set N 100 5 | set K 1000 6 | 7 | sim set runtill 5000 8 | sim set route_type static 9 | conn set type static 10 | 11 | for {set i 0} {$i < $N} {incr i} { 12 | set cur "node$i" 13 | set last "node[expr $i - 1]" 14 | 15 | sim create_node $cur 16 | $cur route local_eid dtn://$cur 17 | $cur registration add dtn://$cur/* 18 | 19 | if {$i != 0} { 20 | sim at 1 $last link add l-$cur $cur ONDEMAND sim 21 | sim at 1 $cur link add l-$last $last ONDEMAND sim 22 | 23 | sim at 2 $last route add dtn://$cur/* l-$cur 24 | sim at 2 $cur route add dtn://$last/* l-$last 25 | } 26 | } 27 | 28 | set dest node[expr $N - 1] 29 | for {set i 0} {$i < [expr $N - 1]} {incr i} { 30 | sim at 3 node$i route add dtn://$dest/* "l-node[expr $i + 1]" 31 | } 32 | 33 | sim at 2 conn up * * 34 | sim at 3 node0 tragent node0 dtn://$dest/test size=512 reps=$K interval=1 35 | 36 | -------------------------------------------------------------------------------- /servlib/cmd/ParamCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PARAM_COMMAND_H_ 18 | #define _PARAM_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * Parameter setting command 26 | */ 27 | class ParamCommand : public oasys::TclCommand { 28 | public: 29 | ParamCommand(); 30 | }; 31 | 32 | 33 | } // namespace dtn 34 | 35 | #endif /* _PARAM_COMMAND_H_ */ 36 | -------------------------------------------------------------------------------- /emulab/send-mail.tcl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/tclsh 2 | 3 | # 4 | # Copyright 2005-2008 Intel Corporation 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | proc usage {} { 20 | puts "usage: send-mail " 21 | exit 1 22 | } 23 | 24 | if {[llength $argv] != 3} { 25 | usage 26 | } 27 | 28 | set file [lindex $argv 0] 29 | set copies [lindex $argv 1] 30 | set dest [lindex $argv 2] 31 | 32 | for {set i 0} {$i < $copies} {incr i} { 33 | exec mail -s "TEST $i" $dest < $file 34 | } 35 | -------------------------------------------------------------------------------- /test/comparison/mkfile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/csh 2 | 3 | # 4 | # Copyright 2005-2006 Intel Corporation 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | 20 | 21 | #Usage: mkfile.sh 22 | #Creates empty file of given size. k for KB, m for MB. default byte. 23 | #Example: mkfile 1m creates a file named 1m.file of size 1 Megabytes 24 | 25 | if ($#argv != 2) then 26 | echo " Usage mkfile.sh " 27 | exit 0 28 | endif 29 | 30 | echo "Creating file $2 of size $1" 31 | head -c $1 /dev/zero > $2 32 | -------------------------------------------------------------------------------- /servlib/cmd/DiscoveryCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Baylor University 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DISCOVERY_COMMAND_H 18 | #define _DISCOVERY_COMMAND_H 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | class DiscoveryCommand : public oasys::TclCommand { 25 | public: 26 | DiscoveryCommand(); 27 | 28 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 29 | }; 30 | 31 | } 32 | 33 | #endif // _DISCOVERY_COMMAND_H 34 | -------------------------------------------------------------------------------- /test/comparison/README: -------------------------------------------------------------------------------- 1 | 2 | 3 | Files relevant: 4 | 5 | gen-emu.sh 6 | base-emu.tcl 7 | 8 | base-cmd.sh 9 | tcp-cmd-half.sh 10 | 11 | To start new experiment type: 12 | ./gen-emu.sh and follow instructions 13 | 14 | 15 | TO see execution of your program that is called do 16 | ./base-cmd.sh and follow instructions 17 | 18 | 19 | User interaction for starting experiment: 20 | 21 | gen-emu.sh: allows u to set various parameters for the experiment 22 | this uses base-emu.tcl 23 | which has all the meat of setting up TCL topology for emulab 24 | 25 | Program objects work in the following fashion: 26 | 27 | the TCL calls: 28 | 29 | base-cmd.sh with args inside file 30 | the base-cmd.sh 31 | will call TCP-Half-command.sh or DTN-half-command.sh depending 32 | upn the protocol that is specified 33 | 34 | 35 | 36 | Loggin is set in base-cmd.sh 37 | 38 | 39 | mostly: gen-emu.sh and super-base-cmd are very simple things 40 | for indirection. 41 | 42 | note that base-emu.sh only refs to super-base-cmd 43 | 44 | 45 | Logs are in: 46 | 47 | /proj/DTN/nsdi/logs// 48 | -------------------------------------------------------------------------------- /test/README: -------------------------------------------------------------------------------- 1 | DTN2 Testing Code 2 | ----------------- 3 | 4 | Most of the files in this directory are .tcl scripts used for test 5 | configuration of the DTN2 daemon. The dtn-test.tcl file in turn 6 | includes the bulk of the other utilities, and the main.tcl file is the 7 | base bootstrap config that is typically sourced by the other test 8 | files. For example, see send-one-bundle.tcl. 9 | 10 | When using this test infrastructure, the daemon can be configured to 11 | fork off a set of peer nodes, all of which will communicate over 12 | loopback aliases. 13 | 14 | Additionally, the following subdirectories contain other test code: 15 | 16 | unit_tests: 17 | Small C programs that exercise parts of the DTN2 code base. 18 | Running 'make test' in this directory should build all the test 19 | applications, depositing binaries in the unit_tests subdirectory. 20 | 21 | comparison: 22 | Test programs and scripts used for comparing the DTN2 implementation 23 | to a simple 'ftp' style application and sendmail. 24 | 25 | mail: 26 | Configuration used for the comparison to sendmail / smtp. 27 | 28 | 29 | -------------------------------------------------------------------------------- /servlib/discovery/IPNDService.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Raytheon BBN Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * IPNDService.cc 17 | */ 18 | 19 | #include "IPNDService.h" 20 | 21 | namespace dtn 22 | { 23 | 24 | IPNDService::IPNDService(const uint8_t &tag_value, const std::string &name) 25 | : ConstructedType(tag_value, (name.size() == 0)?"svc/undef":"svc/"+name) { 26 | if(name.size() == 0) { 27 | log_warn("Constructing service with no defined name!"); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /doc/manual/ro_dtlsr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: DTLSR Protocol 4 | 5 | 6 | 7 |

DTLSR PROTOCOL 8 |

9 | 10 |

11 | Delay Tolerant Link State Routing (DTLSR) is modelled closely on classic link state algorithms. As the network state changes, link state announcements are flooded throughout the network. Each node maintains a graph representing its current view of the state of the network, and uses a shortest path computation e.g. Dijkstra to find routes for messages. Each node in the system is assigned to an administrative area, and a link state protocol instance operates only within a single area. This helps to constrain the size of the network graph and limits the scope of announcement messages, if required. Nodes that have neighbors in other areas learn the set of endpoint identifers reachable via the other area and announce themselves as a gateway to those endpoint identifers. For more information please see the route command. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /servlib/cmd/APICommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _API_COMMAND_H_ 18 | #define _API_COMMAND_H_ 19 | 20 | #include 21 | 22 | #include "applib/APIServer.h" 23 | 24 | namespace dtn { 25 | 26 | /** 27 | * API options command 28 | */ 29 | class APICommand : public oasys::TclCommand { 30 | public: 31 | APICommand(APIServer* server); 32 | }; 33 | 34 | 35 | } // namespace dtn 36 | 37 | #endif /* _API_COMMAND_H_ */ 38 | -------------------------------------------------------------------------------- /sim/conf/conn-test.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Import all the test utilities 3 | # 4 | set base_test_dir [pwd] 5 | while {! [file exists "$base_test_dir/sim/sim-test-utils.tcl"] } { 6 | set base_test_dir [file dirname $base_test_dir] 7 | if {$base_test_dir == "/"} { 8 | error "must run this script from a DTN2 subdirectory" 9 | } 10 | } 11 | source $base_test_dir/sim/sim-test-utils.tcl 12 | 13 | sim create_node n0 14 | sim create_node n1 15 | 16 | n0 route local_eid dtn://n0 17 | n1 route local_eid dtn://n1 18 | 19 | dtn::check_bundle_stats n0 0 pending 20 | 21 | n0 link add l-n1 n1 alwayson sim 22 | n1 link add l-n0 n0 alwayson sim 23 | 24 | conn set type static 25 | conn down * * 26 | 27 | sim at 0.1 dtn::check_link_state n0 l-n1 UNAVAILABLE 28 | sim at 0.1 dtn::check_link_state n1 l-n0 UNAVAILABLE 29 | 30 | sim at 1 conn up * * 31 | sim at 5.1 dtn::check_link_state n0 l-n1 OPEN 32 | sim at 5.1 dtn::check_link_state n1 l-n0 OPEN 33 | 34 | sim at 10 conn down * * 35 | 36 | sim at 10.1 dtn::check_link_state n0 l-n1 UNAVAILABLE 37 | sim at 10.1 dtn::check_link_state n1 l-n0 UNAVAILABLE 38 | 39 | sim set runtill 30 40 | -------------------------------------------------------------------------------- /test/coredump.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2005-2006 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | test::name startstop 18 | net::default_num_nodes 1 19 | 20 | dtn::config 21 | 22 | test::script { 23 | testlog "Startstop test script executing..." 24 | dtn::run_dtnd 0 25 | 26 | testlog "Waiting for dtnd" 27 | dtn::wait_for_dtnd 0 28 | set dtnpid [dtn::tell_dtnd 0 pid] 29 | 30 | testlog "Sending dtnd pid $dtnpid an abort signal" 31 | run::kill_pid 0 $dtnpid ABRT 32 | 33 | testlog "Test complete" 34 | } 35 | -------------------------------------------------------------------------------- /servlib/bundling/AgeBlockProcessor.h: -------------------------------------------------------------------------------- 1 | #ifndef _AGE_BLOCK_PROCESSOR_H_ 2 | #define _AGE_BLOCK_PROCESSOR_H_ 3 | 4 | #include "BlockProcessor.h" 5 | 6 | namespace dtn { 7 | 8 | /** 9 | * Block processor implementation for the Age Extension Block 10 | */ 11 | class AgeBlockProcessor : public BlockProcessor { 12 | public: 13 | /// Constructor 14 | AgeBlockProcessor(); 15 | 16 | /// @{ Virtual from BlockProcessor 17 | int prepare(const Bundle* bundle, 18 | BlockInfoVec* xmit_blocks, 19 | const BlockInfo* source, 20 | const LinkRef& link, 21 | list_owner_t list); 22 | 23 | int generate(const Bundle* bundle, 24 | BlockInfoVec* xmit_blocks, 25 | BlockInfo* block, 26 | const LinkRef& link, 27 | bool last); 28 | 29 | int consume(Bundle* bundle, 30 | BlockInfo* block, 31 | u_char* buf, 32 | size_t len); 33 | /// @} 34 | }; 35 | 36 | } // namespace dtn 37 | 38 | #endif /* _AGE_BLOCK_PROCESSOR_H_ */ 39 | -------------------------------------------------------------------------------- /doc/manual/ro_flood.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: Flood Router 4 | 5 | 6 | 7 |

Flood Router 8 |

9 | 10 |

11 | This is the implementation of a flooding based bundle router. 12 | 13 |

14 | In the implementation an internal BundleList is maintaned in which 15 | all bundles are kept until their expiration time. This prevents 16 | the main daemon logic from opportunistically deleting bundles when 17 | they've been transmitted. 18 | 19 |

20 | Whenever a new link arrives, we add a wildcard route to the table. 21 | Then when a bundle arrives, we can stick it on the all_bundles list 22 | and just call the base class route_bundle function. The core base 23 | class logic then makes sure that a copy of the bundle is forwarded 24 | exactly once to each neighbor.For more information please see the 25 | route command. 26 | 27 |

28 | Note: At present this will forward a bundle back to the node from 29 | which it arrived. 30 | 31 | 32 |

33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /sim/SimCLInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SIM_CL_INFO_ 18 | #define _SIM_CL_INFO_ 19 | 20 | #include "conv_layers/ConvergenceLayer.h" 21 | 22 | namespace dtnsim { 23 | 24 | class SimCLInfo : public CLInfo { 25 | 26 | public: 27 | SimCLInfo(int id) : CLInfo(),simid_(id) {} 28 | int id () { return simid_; } 29 | 30 | private: 31 | int simid_; // id used to identify this cl globally 32 | 33 | }; 34 | } // namespace dtnsim 35 | 36 | #endif /* _SIM_CL_INFO_ */ 37 | -------------------------------------------------------------------------------- /sim/SimEventHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef _DTN_SIM_EVENT_HANDLER_H_ 19 | #define _DTN_SIM_EVENT_HANDLER_H_ 20 | 21 | namespace dtnsim { 22 | 23 | class SimEvent; 24 | 25 | /** 26 | * Interface implemented by all objects that handle simulator events 27 | */ 28 | class SimEventHandler { 29 | public: 30 | virtual void process(SimEvent* e) = 0; 31 | virtual ~SimEventHandler() {} 32 | }; 33 | 34 | } // namespace dtnsim 35 | 36 | #endif /* _DTN_SIM_EVENT_HANDLER_H_ */ 37 | -------------------------------------------------------------------------------- /servlib/contacts/Interface.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include "Interface.h" 22 | 23 | namespace dtn { 24 | 25 | Interface::Interface(const std::string& name, 26 | const std::string& proto, 27 | ConvergenceLayer* clayer) 28 | : name_(name), proto_(proto), clayer_(clayer), cl_info_(NULL) 29 | { 30 | } 31 | 32 | Interface::~Interface() 33 | { 34 | } 35 | 36 | } // namespace dtn 37 | -------------------------------------------------------------------------------- /servlib/reg/PingRegistration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PING_REGISTRATION_H_ 18 | #define _PING_REGISTRATION_H_ 19 | 20 | #include "Registration.h" 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * Internal registration for the dtnping application. 26 | */ 27 | class PingRegistration : public Registration { 28 | public: 29 | PingRegistration(const EndpointID& eid); 30 | void deliver_bundle(Bundle* bundle); 31 | }; 32 | 33 | } // namespace dtn 34 | 35 | #endif /* _PING_REGISTRATION_H_ */ 36 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_BA1.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #include "Ciphersuite_BA1.h" 24 | #include "bundling/Bundle.h" 25 | #include "bundling/BundleDaemon.h" 26 | #include "bundling/BundleProtocol.h" 27 | #include "bundling/SDNV.h" 28 | #include "contacts/Link.h" 29 | #include "KeyDB.h" 30 | #include "openssl/hmac.h" 31 | 32 | namespace dtn { 33 | 34 | } // namespace dtn 35 | 36 | #endif /* BSP_ENABLED */ 37 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_BA9.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #include "Ciphersuite_BA9.h" 24 | #include "bundling/Bundle.h" 25 | #include "bundling/BundleDaemon.h" 26 | #include "bundling/BundleProtocol.h" 27 | #include "bundling/SDNV.h" 28 | #include "contacts/Link.h" 29 | #include "KeyDB.h" 30 | #include "openssl/hmac.h" 31 | 32 | namespace dtn { 33 | 34 | } // namespace dtn 35 | 36 | #endif /* BSP_ENABLED */ 37 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | dtn (2.7.0) unstable; urgency=low 2 | 3 | * 2.7.0 release upgrade 4 | 5 | -- Alex McMahon Fri, 08 May 2009 20:07:09 +0100 6 | 7 | dtn (2.6.0) unstable; urgency=low 8 | 9 | * 2.6.0 release upgrade 10 | 11 | -- Alex McMahon Fri, 08 May 2009 20:07:09 +0100 12 | 13 | dtn (2.5.1-1) unstable; urgency=low 14 | 15 | * 2.5.1 release update 16 | 17 | -- Michael Demmer Wed, 5 Mar 2008 15:31:47 -0800 18 | 19 | dtn (2.5.0-1) unstable; urgency=low 20 | 21 | * 2.5.0 release update 22 | 23 | -- Michael Demmer Fri, 19 Oct 2007 11:52:23 -0700 24 | 25 | dtn (2.4.0-1) unstable; urgency=low 26 | 27 | * Updated version of the package 28 | 29 | -- Michael Demmer Wed, 11 Jul 2007 00:39:03 -0700 30 | 31 | dtn (2.3.0-1) unstable; urgency=low 32 | 33 | * Updated version of the package 34 | 35 | -- Michael Demmer Mon, 18 Dec 2006 13:00:31 -0800 36 | 37 | dtn (2.2.0-1) unstable; urgency=low 38 | 39 | * Initial version of a debian package 40 | 41 | -- Michael Demmer Tue, 14 Mar 2006 15:02:24 -0800 42 | -------------------------------------------------------------------------------- /servlib/cmd/BlockCommand.cc: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | # include 3 | #endif 4 | 5 | #include "BlockCommand.h" 6 | #include "bundling/BundleProtocol.h" 7 | 8 | namespace dtn { 9 | 10 | BlockCommand::BlockCommand() 11 | : TclCommand("block") 12 | { 13 | bind_var(new oasys::BoolOpt("age_outbound_enabled", 14 | &BundleProtocol::params_.age_outbound_enabled_, 15 | "Is the Age Extension Block enabled for outbound bundles " 16 | "(default is false)")); 17 | 18 | bind_var(new oasys::BoolOpt("age_inbound_processing", 19 | &BundleProtocol::params_.age_inbound_processing_, 20 | "Is the Age Extension Block supported on inbound bundles " 21 | "(default is true)")); 22 | 23 | bind_var(new oasys::BoolOpt("age_zero_creation_ts_time", 24 | &BundleProtocol::params_.age_zero_creation_ts_time_, 25 | "Is the Creation Timestamp Time zeroed out " 26 | "(default is true)")); 27 | } 28 | 29 | } // namespace dtn 30 | -------------------------------------------------------------------------------- /servlib/cmd/LinkCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _LINK_COMMAND_H_ 18 | #define _LINK_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * The "link" command. 26 | */ 27 | class LinkCommand : public oasys::TclCommand { 28 | public: 29 | LinkCommand(); 30 | 31 | /** 32 | * Virtual from CommandModule. 33 | */ 34 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 35 | }; 36 | 37 | } // namespace dtn 38 | 39 | #endif /* _LINK_COMMAND_H_ */ 40 | -------------------------------------------------------------------------------- /sim/SimCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SIM_COMMAND_H_ 18 | #define _SIM_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtnsim { 23 | 24 | /** 25 | * Class to control the sim 26 | */ 27 | class SimCommand : public oasys::TclCommand { 28 | public: 29 | SimCommand(); 30 | 31 | /** 32 | * Virtual from CommandModule. 33 | */ 34 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 35 | }; 36 | 37 | } // namespace dtnsim 38 | 39 | #endif /* _SIM_COMMAND_H_ */ 40 | -------------------------------------------------------------------------------- /doc/manual/man_dtnd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Man pages: dtnd 4 | 5 | 6 | 7 |

dtnd 8 |

9 | 10 |

11 |

NAME 12 |

13 |

14 | dtnd - the dtn daemon 15 | 16 |

SYNOPSIS 17 |

18 |

19 | To source bundles from stdin: 20 |

21 | usage: dtnd [opts] 22 |

DESCRIPTION 23 |

24 |

common options: 25 |

26 |   -h, --help			show usage
27 |   -v, --version			print version information and exit
28 |   -o, --output	<output>	file name for logging output (default - indicates stdout)
29 |   -l <level>			default log level [debug|warn|info|crit]
30 |   -s, --seed <seed>	 	random number generator seed
31 |   -d, --daemonize		run as a daemon
32 |   -c, --conf <conf>		set the configuration file
33 |   -t, --tidy			clear database and initialize tables on startup
34 |   --init-db			initialize database on startup
35 |   --console-addr <addr>		set the console listening addr (default off)
36 |   --console-port <port>		set the console listening port (default off)
37 |   -i <id>			set the test id
38 | 
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /sim/ConnCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CONN_COMMAND_H_ 18 | #define _CONN_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtnsim { 23 | 24 | /** 25 | * Class to control the conn 26 | */ 27 | class ConnCommand : public oasys::TclCommand { 28 | public: 29 | ConnCommand(); 30 | 31 | /** 32 | * Virtual from CommandModule. 33 | */ 34 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 35 | }; 36 | 37 | } // namespace dtnsim 38 | 39 | #endif /* _CONN_COMMAND_H_ */ 40 | -------------------------------------------------------------------------------- /servlib/cmd/RouteCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ROUTE_COMMAND_H_ 18 | #define _ROUTE_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * The "route" command. 26 | */ 27 | class RouteCommand : public oasys::TclCommand { 28 | public: 29 | RouteCommand(); 30 | 31 | /** 32 | * Virtual from CommandModule. 33 | */ 34 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 35 | }; 36 | 37 | } // namespace dtn 38 | 39 | #endif /* _ROUTE_COMMAND_H_ */ 40 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_PI10.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #define OPENSSL_FIPS 1 /* required for sha256 */ 24 | 25 | #include "Ciphersuite_PI10.h" 26 | #include "bundling/Bundle.h" 27 | #include "bundling/BundleDaemon.h" 28 | #include "bundling/BundleProtocol.h" 29 | #include "bundling/SDNV.h" 30 | #include "contacts/Link.h" 31 | #include "security/EVP_PK.h" 32 | 33 | namespace dtn { 34 | 35 | } // namespace dtn 36 | 37 | #endif /* BSP_ENABLED */ 38 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_PI6.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #define OPENSSL_FIPS 1 /* required for sha256 */ 24 | 25 | #include "Ciphersuite_PI6.h" 26 | #include "bundling/Bundle.h" 27 | #include "bundling/BundleDaemon.h" 28 | #include "bundling/BundleProtocol.h" 29 | #include "bundling/SDNV.h" 30 | #include "contacts/Link.h" 31 | #include "security/EVP_PK.h" 32 | 33 | namespace dtn { 34 | 35 | } // namespace dtn 36 | 37 | #endif /* BSP_ENABLED */ 38 | -------------------------------------------------------------------------------- /servlib/bundling/BundleMappings.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include "BundleMappings.h" 22 | 23 | namespace dtn { 24 | 25 | 26 | //---------------------------------------------------------------------- 27 | BundleMappings::iterator 28 | BundleMappings::find(const BundleList* list) 29 | { 30 | for (iterator i = begin(); i != end(); ++i) 31 | { 32 | if (i->list() == list) 33 | return i; 34 | } 35 | return end(); 36 | } 37 | 38 | } // namespace dtn 39 | 40 | -------------------------------------------------------------------------------- /apps/tca_admin/libs/gateway_rpc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _GATEWAY_RPC_H_ 18 | #define _GATEWAY_RPC_H_ 19 | 20 | #include 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | extern int 27 | lookup_host(const char* host, int port, struct sockaddr_in* addr); 28 | 29 | extern CLIENT* 30 | get_connection(struct sockaddr_in* addr); 31 | 32 | extern int 33 | do_null_op(CLIENT* c); 34 | 35 | extern int 36 | test_node(const char* hostname, struct sockaddr_in* addr); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* _GATEWAY_RPC_H_ */ 43 | -------------------------------------------------------------------------------- /servlib/cmd/InterfaceCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _INTERFACE_COMMAND_H_ 18 | #define _INTERFACE_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * CommandModule for the "interface" command. 26 | */ 27 | class InterfaceCommand : public oasys::TclCommand { 28 | public: 29 | InterfaceCommand(); 30 | 31 | /** 32 | * Virtual from CommandModule. 33 | */ 34 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 35 | }; 36 | 37 | } // namespace dtn 38 | 39 | #endif /* _INTERFACE_COMMAND_H_ */ 40 | -------------------------------------------------------------------------------- /servlib/contacts/AlwaysOnLink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ALWAYSONLINK_H_ 18 | #define _ALWAYSONLINK_H_ 19 | 20 | #include "Link.h" 21 | 22 | namespace dtn { 23 | 24 | 25 | /** 26 | * Abstraction for an always on link. 27 | * 28 | * ALWAYSON links are immediately opened upon creation and remain open 29 | * for their duration. 30 | */ 31 | class AlwaysOnLink : public Link { 32 | public: 33 | AlwaysOnLink(std::string name, ConvergenceLayer* cl, const char* nexthop); 34 | void set_initial_state(); 35 | }; 36 | 37 | } // namespace dtn 38 | 39 | #endif /* _ALWAYSONLINK_H_ */ 40 | -------------------------------------------------------------------------------- /servlib/contacts/OndemandLink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ONDEMAND_LINK_H_ 18 | #define _ONDEMAND_LINK_H_ 19 | 20 | #include "Link.h" 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * Abstraction for a ONDEMAND link. 26 | * 27 | * ONDEMAND links have to be opened everytime one wants to use it and 28 | * close after an idle period. 29 | */ 30 | class OndemandLink : public Link { 31 | public: 32 | OndemandLink(std::string name, ConvergenceLayer* cl, const char* nexthop); 33 | void set_initial_state(); 34 | }; 35 | 36 | } // namespace dtn 37 | 38 | #endif /* _ONDEMAND_LINK_H_ */ 39 | -------------------------------------------------------------------------------- /servlib/cmd/RegistrationCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _REGISTRATION_COMMAND_H_ 18 | #define _REGISTRATION_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * The "registration" command. 26 | */ 27 | class RegistrationCommand : public oasys::TclCommand { 28 | public: 29 | RegistrationCommand(); 30 | 31 | /** 32 | * Virtual from CommandModule. 33 | */ 34 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 35 | }; 36 | 37 | } // namespace dtn 38 | 39 | #endif /* _REGISTRATION_COMMAND_H_ */ 40 | -------------------------------------------------------------------------------- /servlib/routing/RouterInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ROUTER_INFO_H_ 18 | #define _ROUTER_INFO_H_ 19 | 20 | #include 21 | 22 | namespace oasys { 23 | class StringBuffer; 24 | } 25 | 26 | namespace dtn { 27 | 28 | /** 29 | * Empty wrapper class to encapsulate router-specific data attached to 30 | * Links. 31 | */ 32 | class RouterInfo { 33 | public: 34 | virtual ~RouterInfo(); 35 | virtual void dump(oasys::StringBuffer* buf); 36 | virtual void dump_stats(oasys::StringBuffer* buf); 37 | }; 38 | 39 | } // namespace dtn 40 | 41 | #endif /* _ROUTER_INFO_H_ */ 42 | -------------------------------------------------------------------------------- /servlib/routing/RouterInfo.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "RouterInfo.h" 18 | 19 | namespace dtn { 20 | 21 | //---------------------------------------------------------------------- 22 | RouterInfo::~RouterInfo() 23 | { 24 | } 25 | 26 | //---------------------------------------------------------------------- 27 | void 28 | RouterInfo::dump(oasys::StringBuffer* buf) 29 | { 30 | (void)buf; 31 | } 32 | 33 | //---------------------------------------------------------------------- 34 | void 35 | RouterInfo::dump_stats(oasys::StringBuffer* buf) 36 | { 37 | (void)buf; 38 | } 39 | 40 | } // namespace dtn 41 | -------------------------------------------------------------------------------- /servlib/cmd/StorageCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _STORAGE_COMMAND_H_ 18 | #define _STORAGE_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | class DTNStorageConfig; 25 | 26 | /** 27 | * Class to control the storage system. 28 | */ 29 | class StorageCommand : public oasys::TclCommand { 30 | public: 31 | StorageCommand(DTNStorageConfig* config); 32 | int exec(int argc, const char** argv, Tcl_Interp* interp); 33 | 34 | protected: 35 | bool inited_; 36 | }; 37 | 38 | 39 | } // namespace dtn 40 | 41 | #endif /* _STORAGE_COMMAND_H_ */ 42 | -------------------------------------------------------------------------------- /rpm/dtn-2.3.0-1.spec: -------------------------------------------------------------------------------- 1 | Summary: Delay Tolerant Networking reference implementation 2 | Name: dtn 3 | Version: 2.3.0 4 | Release: 1 5 | License: Apache 6 | Group: Applications/Internet 7 | URL: http://www.dtnrg.org 8 | Source0: %{name}_%{version}.tgz 9 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root 10 | 11 | %description 12 | 13 | This package contains the reference implementation of the Delay 14 | Tolerant Networking (DTN) architecture. This includes the DTN daemon 15 | (dtnd) as well as several example applications that use the DTN 16 | protocols. 17 | 18 | %prep 19 | %setup -q -n %{name}_%{version} 20 | 21 | %build 22 | ./configure 23 | make 24 | 25 | %install 26 | rm -rf $RPM_BUILD_ROOT 27 | DESTDIR=$RPM_BUILD_ROOT make install 28 | 29 | %clean 30 | make clean 31 | rm -rf $RPM_BUILD_ROOT 32 | 33 | 34 | %files 35 | %defattr(-,root,root,-) 36 | %doc README 37 | %config /etc/dtn.conf 38 | 39 | /var/dtn 40 | /var/dtn/bundles 41 | /var/dtn/db 42 | /usr/bin/dtnd 43 | /usr/bin/dtnd-control 44 | /usr/bin/dtncat 45 | /usr/bin/dtncp 46 | /usr/bin/dtncpd 47 | /usr/bin/dtnping 48 | /usr/bin/dtnrecv 49 | /usr/bin/dtnsend 50 | /usr/bin/dtntunnel 51 | 52 | 53 | %changelog 54 | * Wed Dec 20 2006 Michael Demmer - 2.3.0-1 55 | - First RPM build. 56 | 57 | -------------------------------------------------------------------------------- /doc/manual/latex/refman.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper]{book} 2 | \usepackage{a4wide} 3 | \usepackage{makeidx} 4 | \usepackage{fancyhdr} 5 | \usepackage{graphicx} 6 | \usepackage{multicol} 7 | \usepackage{float} 8 | \usepackage{textcomp} 9 | \usepackage{alltt} 10 | \usepackage{times} 11 | \usepackage{ifpdf} 12 | \ifpdf 13 | \usepackage[pdftex, 14 | pagebackref=true, 15 | colorlinks=true, 16 | linkcolor=blue, 17 | unicode 18 | ]{hyperref} 19 | \else 20 | \usepackage[ps2pdf, 21 | pagebackref=true, 22 | colorlinks=true, 23 | linkcolor=blue, 24 | unicode 25 | ]{hyperref} 26 | \usepackage{pspicture} 27 | \fi 28 | \usepackage[utf8]{inputenc} 29 | \usepackage{doxygen} 30 | \makeindex 31 | \setcounter{tocdepth}{3} 32 | \renewcommand{\footrulewidth}{0.4pt} 33 | \begin{document} 34 | \begin{titlepage} 35 | \vspace*{7cm} 36 | \begin{center} 37 | {\Large dtn2 \\[1ex]\large 2.6 }\\ 38 | \vspace*{1cm} 39 | {\large Generated by Doxygen 1.5.8}\\ 40 | \vspace*{0.5cm} 41 | {\small Tue Sep 29 11:49:49 2009}\\ 42 | \end{center} 43 | \end{titlepage} 44 | \clearemptydoublepage 45 | \pagenumbering{roman} 46 | \tableofcontents 47 | \clearemptydoublepage 48 | \pagenumbering{arabic} 49 | \printindex 50 | \end{document} 51 | -------------------------------------------------------------------------------- /servlib/cmd/ProphetCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Baylor University 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PROPHET_COMMAND_H_ 18 | #define _PROPHET_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * The "prophet" command. 26 | */ 27 | class ProphetCommand : public oasys::TclCommand { 28 | public: 29 | ProphetCommand(); 30 | 31 | /** 32 | * Virtual from CommandModule. 33 | */ 34 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 35 | 36 | std::string fwd_strategy_; 37 | std::string q_policy_; 38 | }; 39 | 40 | } // namespace dtn 41 | 42 | #endif /* _PROPHET_COMMAND_H_ */ 43 | -------------------------------------------------------------------------------- /apps/dtnping/dtnping.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _DTNPING_H_ 18 | #define _DTNPING_H_ 19 | 20 | typedef struct { 21 | char ping[8]; // dtn_ping! 22 | u_int32_t seqno; 23 | u_int32_t nonce; 24 | u_int32_t time; 25 | } ping_payload_t; 26 | 27 | #define PING_STR "dtnping!" 28 | 29 | #define TIMEVAL_DIFF_MSEC(t1, t2) \ 30 | ((unsigned long int)(((t1).tv_sec - (t2).tv_sec) * 1000) + \ 31 | (((t1).tv_usec - (t2).tv_usec) / 1000)) 32 | 33 | #define DTNTIME_OFFSET 946684800 34 | 35 | #define DTNTIMEVAL_DIFF_MSEC(t1, t2) \ 36 | ((unsigned long int)(((t1).secs + DTNTIME_OFFSET - (t2).tv_sec))) 37 | 38 | #endif /* _DTNPING_H_ */ 39 | -------------------------------------------------------------------------------- /doc/manual/man_dtnrecv.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Man pages: dtnrecv 4 | 5 | 6 | 7 |

dtnrecv 8 |

9 | 10 |

11 |

NAME 12 |

13 |

14 | dtnrecv - receive a bundle on a registration 15 | 16 |

SYNOPSIS 17 |

18 |

19 | dtnrecv [opts] eid 20 |

21 | options:
22 |  -v verbose
23 |  -q quiet
24 |  -h help
25 |  -s <eid|demux_string> source eid)
26 |  -d <eid|demux_string> endpoint id
27 |  -r <regid> use existing registration regid
28 |  -n <count> exit after count bundles received
29 |  -e <time> registration expiration time in seconds (default: one hour)
30 |  -f <defer|drop|exec> failure action
31 |  -F <script> failure script for exec action
32 |  -x call dtn_register and immediately exit
33 |  -c call dtn_change_registration and immediately exit
34 |  -u call dtn_unregister and immediately exit
35 |  -N don't try to find an existing registration
36 |  -t <timeout> timeout value for call to dtn_recv
37 |  -o <template> Write out transfers to files using this template 
38 | (# chars are replaced with a counter). Example: f##.bin goes to f00.bin, f01.bin, etc...
39 | 
40 |

DESCRIPTION 41 |

42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /servlib/cmd/SecurityCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 BBN Technologies Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. 14 | */ 15 | 16 | /* 17 | * $Id$ 18 | */ 19 | 20 | #ifndef _SECURITY_COMMAND_H_ 21 | #define _SECURITY_COMMAND_H_ 22 | 23 | #include 24 | 25 | #ifdef BSP_ENABLED 26 | 27 | namespace dtn { 28 | 29 | class SecurityCommand : public oasys::TclCommand { 30 | 31 | public: 32 | 33 | SecurityCommand(); 34 | 35 | /** 36 | * Virtual from CommandModule. 37 | */ 38 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 39 | private: 40 | bool is_a_bab(int num); 41 | bool is_a_pib(int num); 42 | bool is_a_pcb(int num); 43 | bool is_a_esb(int num); 44 | bool is_a_eib(int num); 45 | }; 46 | 47 | } // namespace dtn 48 | 49 | #endif /* BSP_ENABLED */ 50 | 51 | #endif /* _SECURITY_COMMAND_H_ */ 52 | -------------------------------------------------------------------------------- /sim/Topology.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include "Topology.h" 22 | #include "Node.h" 23 | 24 | namespace dtnsim { 25 | 26 | Topology::NodeTable Topology::nodes_; 27 | 28 | Node* 29 | Topology::create_node(const char* name) 30 | { 31 | Node* node = new Node(name); 32 | node->do_init(); 33 | nodes_[name] = node; 34 | return node; 35 | } 36 | 37 | Node* 38 | Topology::find_node(const char* name) 39 | { 40 | NodeTable::iterator iter = nodes_.find(name); 41 | if (iter == nodes_.end()) 42 | return NULL; 43 | 44 | return (*iter).second; 45 | } 46 | } // namespace dtnsim 47 | -------------------------------------------------------------------------------- /servlib/cmd/ECLACommand.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2004-2006 BBN Technologies Corporation 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 | * use this file except in compliance with the License. You may obtain a copy 5 | * of the License at http://www.apache.org/licenses/LICENSE-2.0 6 | * 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 9 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | * 14 | */ 15 | 16 | #ifndef _ECLA_COMMAND_H_ 17 | #define _ECLA_COMMAND_H_ 18 | 19 | #ifndef DTN_CONFIG_STATE 20 | #error "MUST INCLUDE dtn-config.h before including this file" 21 | #endif 22 | 23 | #if defined(XERCES_C_ENABLED) && defined(EXTERNAL_CL_ENABLED) 24 | 25 | #include 26 | 27 | namespace dtn { 28 | 29 | /** 30 | * Parameter setting command 31 | */ 32 | class ECLACommand : public oasys::TclCommand { 33 | public: 34 | ECLACommand(); 35 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 36 | }; 37 | 38 | 39 | } // namespace dtn 40 | 41 | #endif // XERCES_C_ENABLED && EXTERNAL_CL_ENABLED 42 | #endif // _ECLA_COMMAND_H_ 43 | -------------------------------------------------------------------------------- /servlib/reg/AdminRegistration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ADMIN_REGISTRATION_H_ 18 | #define _ADMIN_REGISTRATION_H_ 19 | 20 | #include "Registration.h" 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * Internal registration that recieves all administrative bundles 26 | * destined for the router itself (i.e. status reports, custody 27 | * acknowledgements, ping bundles, etc.) 28 | */ 29 | class AdminRegistration : public Registration { 30 | public: 31 | AdminRegistration(); 32 | 33 | /** 34 | * Deliver the given bundle. 35 | */ 36 | void deliver_bundle(Bundle* bundle); 37 | }; 38 | 39 | } // namespace dtn 40 | 41 | #endif /* _ADMIN_REGISTRATION_H_ */ 42 | -------------------------------------------------------------------------------- /servlib/security/ES_BlockProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ES_BLOCK_PROCESSOR_H_ 18 | #define _ES_BLOCK_PROCESSOR_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include "bundling/BlockProcessor.h" 23 | #include "Ciphersuite.h" 24 | #include "AS_BlockProcessor.h" 25 | 26 | namespace dtn { 27 | 28 | /** 29 | * Block processor implementation for the extension security block 30 | */ 31 | class ES_BlockProcessor : public AS_BlockProcessor { 32 | public: 33 | ES_BlockProcessor(); 34 | 35 | virtual int format(oasys::StringBuffer* buf, BlockInfo *block); 36 | 37 | }; 38 | 39 | } // namespace dtn 40 | 41 | #endif /* BSP_ENABLED */ 42 | 43 | #endif /* _ES_BLOCK_PROCESSOR_H_ */ 44 | -------------------------------------------------------------------------------- /servlib/security/PI_BlockProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PI_BLOCK_PROCESSOR_H_ 18 | #define _PI_BLOCK_PROCESSOR_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include "bundling/BlockProcessor.h" 23 | #include "Ciphersuite.h" 24 | #include "AS_BlockProcessor.h" 25 | 26 | namespace dtn { 27 | 28 | /** 29 | * Block processor implementation for the payload integrity block. 30 | */ 31 | class PI_BlockProcessor : public AS_BlockProcessor { 32 | public: 33 | PI_BlockProcessor(); 34 | 35 | virtual int format(oasys::StringBuffer* buf, BlockInfo *block); 36 | 37 | }; 38 | 39 | } // namespace dtn 40 | 41 | #endif /* BSP_ENABLED */ 42 | 43 | #endif /* _PI_BLOCK_PROCESSOR_H_ */ 44 | -------------------------------------------------------------------------------- /servlib/security/PC_BlockProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PC_BLOCK_PROCESSOR_H_ 18 | #define _PC_BLOCK_PROCESSOR_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include "bundling/BlockProcessor.h" 23 | #include "Ciphersuite.h" 24 | #include "AS_BlockProcessor.h" 25 | 26 | namespace dtn { 27 | 28 | /** 29 | * Block processor implementation for the Payload Confidentiality 30 | * Block 31 | */ 32 | class PC_BlockProcessor : public AS_BlockProcessor { 33 | public: 34 | PC_BlockProcessor(); 35 | 36 | virtual int format(oasys::StringBuffer* buf, BlockInfo *block); 37 | 38 | }; 39 | 40 | } // namespace dtn 41 | 42 | #endif /* BSP_ENABLED */ 43 | 44 | #endif /* _PC_BLOCK_PROCESSOR_H_ */ 45 | -------------------------------------------------------------------------------- /test/unit_tests/prophet-stats-test.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "prophet/BundleImpl.h" 9 | #include "prophet/Stats.h" 10 | 11 | using namespace oasys; 12 | 13 | 14 | DECLARE_TEST(Stats) { 15 | // dest_id, cts, seq, ets, size, num_fwd 16 | prophet::BundleImpl m("dtn://test-a",0xfe, 1, 60, 1024, 0); 17 | prophet::BundleImpl n("dtn://test-b",0xff, 2, 60, 512, 1); 18 | prophet::Stats s; 19 | 20 | CHECK(s.get_p_max(&n) == s.get_p_max(&m)); 21 | CHECK(s.get_mopr(&n) == s.get_mopr(&n)); 22 | CHECK(s.get_lmopr(&m) == s.get_lmopr(&n)); 23 | s.update_stats(&m,0.75); 24 | CHECK(s.get_p_max(&m) > s.get_p_max(&n)); 25 | CHECK(s.get_mopr(&m) > s.get_mopr(&n)); 26 | CHECK(s.get_lmopr(&m) > s.get_lmopr(&n)); 27 | s.drop_bundle(&m); 28 | CHECK_EQUAL(s.dropped(), 1); 29 | CHECK(s.get_p_max(&n) == s.get_p_max(&m)); 30 | CHECK(s.get_mopr(&n) == s.get_mopr(&n)); 31 | CHECK(s.get_lmopr(&m) == s.get_lmopr(&n)); 32 | 33 | return UNIT_TEST_PASSED; 34 | } 35 | 36 | DECLARE_TESTER(ProphetStatsTest) { 37 | ADD_TEST(Stats); 38 | } 39 | 40 | DECLARE_TEST_FILE(ProphetStatsTest, "prophet stats test"); 41 | -------------------------------------------------------------------------------- /servlib/cmd/BPQCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Trinity College Dublin 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _BPQ_COMMAND_H_ 18 | #define _BPQ_COMMAND_H_ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | # include 22 | #endif 23 | 24 | #ifdef BPQ_ENABLED 25 | 26 | #include 27 | #include "bundling/BPQCache.h" 28 | 29 | namespace dtn { 30 | 31 | /** 32 | * The "BPQCommand" command. 33 | */ 34 | class BPQCommand : public oasys::TclCommand { 35 | public: 36 | BPQCommand(); 37 | 38 | /** 39 | * Virtual from CommandModule. 40 | */ 41 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 42 | }; 43 | 44 | } // namespace dtn 45 | 46 | #endif /* BPQ_ENABLED */ 47 | 48 | #endif /* BPQCOMMAND_H_ */ 49 | -------------------------------------------------------------------------------- /servlib/contacts/AlwaysOnLink.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include "AlwaysOnLink.h" 22 | #include "bundling/BundleDaemon.h" 23 | 24 | namespace dtn { 25 | 26 | AlwaysOnLink::AlwaysOnLink(std::string name, ConvergenceLayer* cl, 27 | const char* nexthop) 28 | : Link(name, ALWAYSON, cl, nexthop) 29 | { 30 | set_state(UNAVAILABLE); 31 | } 32 | 33 | void 34 | AlwaysOnLink::set_initial_state() 35 | { 36 | BundleDaemon::post_at_head( 37 | new LinkStateChangeRequest(LinkRef(this, "AlwaysOnLink"), 38 | Link::OPEN, ContactEvent::USER)); 39 | } 40 | 41 | } // namespace dtn 42 | 43 | -------------------------------------------------------------------------------- /sim/conf/dtlsr.conf: -------------------------------------------------------------------------------- 1 | # Simple test of DTLSR 2 | 3 | # Import all the test utilities 4 | set base_test_dir [pwd] 5 | while {! [file exists "$base_test_dir/sim/sim-test-utils.tcl"] } { 6 | set base_test_dir [file dirname $base_test_dir] 7 | if {$base_test_dir == "/"} { 8 | error "must run this script from a DTN2 subdirectory" 9 | } 10 | } 11 | source $base_test_dir/sim/sim-test-utils.tcl 12 | 13 | set opt(N) 5 14 | set opt(runtill) 5000 15 | set opt(area) "" 16 | parse_opts 17 | 18 | sim set runtill $opt(runtill) 19 | sim set route_type dtlsr 20 | conn set type static 21 | 22 | # 23 | # First set up the five nodes in a linear arrangement 24 | # 25 | for {set i 0} {$i < $opt(N)} {incr i} { 26 | set cur "node$i" 27 | set last "node[expr $i - 1]" 28 | 29 | sim create_node $cur 30 | $cur route local_eid dtn://$cur 31 | if {$opt(area) != ""} { 32 | $cur route set dtlsr_area $opt(area) 33 | } 34 | 35 | $cur registration add dtn://$cur/test 36 | 37 | if {$i != 0} { 38 | $last link add l-$cur $cur alwayson sim remote_eid=dtn://$cur 39 | $cur link add l-$last $last alwayson sim remote_eid=dtn://$last 40 | } 41 | } 42 | 43 | conn up * * 44 | 45 | sim at 4.5 eval { 46 | for {set i 0} {$i < $opt(N)} {incr i} { 47 | puts "Routing table at node $i: [node$i route dump]" 48 | } 49 | } 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /daemon/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2004-2006 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # Makefile for DTN2/daemon 19 | # 20 | 21 | # 22 | # Make sure SRCDIR is set (.. by default) 23 | # 24 | ifeq ($(SRCDIR),) 25 | SRCDIR := .. 26 | BUILDDIR := .. 27 | endif 28 | 29 | DAEMON_SRCS := \ 30 | dtnd.cc 31 | 32 | DAEMON_OBJS := $(DAEMON_SRCS:.cc=.o) 33 | 34 | # 35 | # Default target is to build the daemon 36 | # 37 | BINFILES := dtnd 38 | all: $(BINFILES) 39 | 40 | COMPONENT_LIBS := \ 41 | ../applib/libdtnapisrv.a \ 42 | ../servlib/libdtnserv.a \ 43 | 44 | dtnd: $(DAEMON_OBJS) $(COMPONENT_LIBS) 45 | $(CXX) $(CXXFLAGS) $(DAEMON_OBJS) $(COMPONENT_LIBS) \ 46 | -o $@ $(LDFLAGS) $(OASYS_LDFLAGS) $(EXTLIB_LDFLAGS) $(LIBS) 47 | 48 | # 49 | # Include the common rules 50 | # 51 | include ../Rules.make 52 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_integ.h: -------------------------------------------------------------------------------- 1 | #ifndef __CIPHERSUITE_INTEG_H__ 2 | #define __CIPHERSUITE_INTEG_H__ 3 | 4 | #include "Ciphersuite.h" 5 | 6 | #ifdef BSP_ENABLED 7 | 8 | namespace dtn { 9 | struct PrimaryBlock_ex; 10 | 11 | class Ciphersuite_integ: public Ciphersuite { 12 | public: 13 | int mutable_canonicalization_primary(const Bundle *bundle, BlockInfo *block, BlockInfo *iter /*This is a pointer to the primary block*/, OpaqueContext* r, char **dict); 14 | 15 | int mutable_canonicalization_extension(const Bundle *bundle, BlockInfo *block, BlockInfo *iter, OpaqueContext* r,char *dict); 16 | 17 | int mutable_canonicalization_payload(const Bundle *bundle, BlockInfo *block, BlockInfo *iter, OpaqueContext* r,char *dict); 18 | 19 | static void digest(const Bundle* bundle, 20 | const BlockInfo* caller_block, 21 | const BlockInfo* target_block, 22 | const void* buf, 23 | size_t len, 24 | OpaqueContext* r); 25 | 26 | static int read_primary(const Bundle* bundle, 27 | BlockInfo* block, 28 | PrimaryBlock_ex& primary, 29 | char** dict); 30 | static int get_dict(const Bundle *bundle, BlockInfo* block, char **dict); 31 | 32 | }; 33 | } 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /test/comparison/get_results.sh: -------------------------------------------------------------------------------- 1 | #!/bin/csh 2 | 3 | # 4 | # Copyright 2005-2006 Intel Corporation 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | 20 | 21 | 22 | 23 | set protlist="dtn mail tcp" 24 | 25 | 26 | 27 | 28 | set lossrate=0 29 | set bandwidth=100 30 | set size=10 31 | 32 | set outfile=$1 33 | rm -f $outfile 34 | 35 | foreach nodes(2 3 4 5) 36 | set startline="#nodes" 37 | set line=$nodes 38 | foreach size(10 100) 39 | foreach name($protlist) 40 | foreach type(0 1) 41 | set startline="$startline S$size.$name.$type" 42 | set exp="rabin-N$nodes-L$lossrate-S$size-B$bandwidth" 43 | set ftime=`/proj/DTN/nsdi/bin//ftptime.sh $nodes $exp/$name$type | tail -n 1` 44 | set line="$line $ftime" 45 | end 46 | end 47 | end 48 | echo $line 49 | echo $line >> $outfile 50 | end 51 | echo $startline >> $outfile 52 | 53 | -------------------------------------------------------------------------------- /doc/manual/cl-eth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Manual: Ethernet Convergence Layer 4 | 5 | 6 | 7 |

Ethernet Convergence Layer 8 |

9 | 10 |

11 | The EthConvergenceLayer provides access to any ethernet interfaces that 12 | support RAW sockets. It periodically sends beacons out on each interface 13 | to support neighbor discovery. (this may change later). To add an ethernet 14 | interface in your config file, use: 15 | 16 | 17 |

18 | Syntax: interface add string://interface CL [arg=val arg=val2 argN=valN...] 19 |

Example: interface add string://eth0 eth beacon_interval=1 20 |

Valid arguments for arg are: 21 |

22 | 23 | 24 | 30 |
arg 25 | Possible settings 26 | Default 27 | Comments 28 | 29 |
beacon_interval 31 | number (seconds) 32 | 1 33 | The Ethernet discovery beacon 34 |
35 |

Note 36 |

link next hop parameter next hop must be set to an Ethernet hardware Address 37 |

Theoretically, any router type should work. 38 |

Beacons timeout every 2.5 seconds by default 39 |

The max size for and Ethernet packet is 1518 bytes 40 |

The maximum bundle size is s that of the UDP datagram (65507 bytes) 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /servlib/cmd/CompletionNotifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _COMPLETIONNOTIFIER_H_ 18 | #define _COMPLETIONNOTIFIER_H_ 19 | 20 | #include 21 | #include 22 | 23 | namespace dtn { 24 | 25 | /** 26 | * Simple singleton class used by DTN commands when they need to call 27 | * BundleDaemon::post_and_wait(). 28 | */ 29 | class CompletionNotifier : public oasys::Singleton { 30 | public: 31 | CompletionNotifier() 32 | : notifier_("/command/completion_notifier") {} 33 | 34 | static oasys::Notifier* notifier() { return &instance()->notifier_; } 35 | 36 | protected: 37 | oasys::Notifier notifier_; 38 | }; 39 | 40 | } // namespace dtn 41 | 42 | #endif /* _COMPLETIONNOTIFIER_H_ */ 43 | -------------------------------------------------------------------------------- /servlib/cmd/ShutdownCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SHUTDOWN_COMMAND_H_ 18 | #define _SHUTDOWN_COMMAND_H_ 19 | 20 | #include 21 | 22 | namespace dtn { 23 | 24 | class DTNServer; 25 | 26 | /** 27 | * CommandModule for the "shutdown" command. 28 | */ 29 | class ShutdownCommand : public oasys::TclCommand { 30 | public: 31 | ShutdownCommand(DTNServer* server, const char* cmd = "shutdown"); 32 | 33 | /** 34 | * Virtual from CommandModule. 35 | */ 36 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 37 | 38 | protected: 39 | static void call_exit(void* clientData); 40 | 41 | DTNServer* dtnserver_; 42 | }; 43 | 44 | } // namespace dtn 45 | 46 | #endif /* _SHUTDOWN_COMMAND_H_ */ 47 | -------------------------------------------------------------------------------- /servlib/discovery/IPNDService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Raytheon BBN Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | * IPNDService.h 17 | * 18 | * Defines an IPND Service (which is really no different than a generic 19 | * constructed type). 20 | */ 21 | 22 | #ifndef IPNDSERVICE_H_ 23 | #define IPNDSERVICE_H_ 24 | 25 | #include "ipnd_sd_tlv/ConstructedType.h" 26 | 27 | #include 28 | 29 | namespace dtn 30 | { 31 | 32 | /** 33 | * This is really just an alias for ipndtlv::Constructed type. All IPND services 34 | * are constructed datatypes, but not all constructed datatypes are necessarily 35 | * IPND services. 36 | */ 37 | class IPNDService: public ipndtlv::ConstructedType { 38 | protected: 39 | IPNDService(const uint8_t &tag_value, const std::string &name); 40 | }; 41 | 42 | } 43 | 44 | #endif /* IPNDService_H_ */ 45 | -------------------------------------------------------------------------------- /test/dtnsim.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2004-2006 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | test::name dtnsim-basic 18 | net::default_num_nodes 1 19 | 20 | set conf_path "" 21 | foreach {var val} $opt(opts) { 22 | if {$var == "-c"} { 23 | set conf_path $val 24 | } else { 25 | error "unknown test option $var" 26 | } 27 | } 28 | 29 | if {$conf_path == ""} { 30 | error "must specify simulator config file" 31 | } 32 | 33 | if {[file exists $base_test_dir/sim/conf/$conf_path]} { 34 | set conf_path $base_test_dir/sim/conf/$conf_path 35 | } 36 | 37 | if {![file exists $conf_path]} { 38 | error "simulator conf file $conf_path does not exist" 39 | } 40 | 41 | test::script { 42 | testlog "Running simulator" 43 | exec sim/dtnsim -c $conf_path <@stdin >@stdout 2>@stderr 44 | 45 | testlog "Test success!" 46 | } 47 | -------------------------------------------------------------------------------- /servlib/bundling/TempBundle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TEMP_BUNDLE_H_ 18 | #define _TEMP_BUNDLE_H_ 19 | 20 | #include "Bundle.h" 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * Class to represent a temporary bundle -- i.e. one that exists only 26 | * in memory and never goes to the persistent store. 27 | * 28 | * This is intended to be used for AnnounceBundles and other cases in 29 | * which the bundle is only needed to be sent over the wire and is 30 | * then immediately destroyed. 31 | */ 32 | class TempBundle : public Bundle { 33 | public: 34 | /** 35 | * Constructor which forces the payload location to memory. 36 | */ 37 | TempBundle() : Bundle(BundlePayload::MEMORY) {} 38 | }; 39 | 40 | } // namespace DTN 41 | 42 | 43 | #endif /* _TEMP_BUNDLE_H_ */ 44 | -------------------------------------------------------------------------------- /servlib/security/BundleSecurityConfig.h: -------------------------------------------------------------------------------- 1 | #ifndef SECURITY_POLICY_H 2 | #define SECURITY_POLICY_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include "oasys/serialize/SerializableVector.h" 15 | 16 | #ifdef HAVE_CONFIG_H 17 | # include 18 | #endif 19 | 20 | 21 | #ifdef BSP_ENABLED 22 | #include "SecurityConfig.h" 23 | 24 | using namespace std; 25 | using namespace dtn; 26 | 27 | class BundleSecurityConfig : public oasys::SerializableObject{ 28 | public: 29 | oasys::SerializableVector rules; 30 | 31 | BundleSecurityConfig(); 32 | // the default assignment operator actually suffices for this class! 33 | BundleSecurityConfig(const SecurityConfig *in); 34 | BundleSecurityConfig(const BundleSecurityConfig &in); 35 | static BundleProtocol::bundle_block_type_t get_block_type(int csnum); 36 | 37 | bool is_policy_consistant(dtn::EndpointID &src, dtn::EndpointID &dest, dtn::EndpointID &lastsecdestp, dtn::EndpointID &lastsecdeste) const; 38 | vector > get_outgoing_rules(dtn::EndpointID &src, dtn::EndpointID &dest, dtn::EndpointID &lastsecdestp, dtn::EndpointID &lastsecdeste) const; 39 | 40 | void serialize(oasys::SerializeAction* a); 41 | }; 42 | #endif 43 | #endif 44 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_BA1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CIPHERSUITE_BA1_H_ 18 | #define _CIPHERSUITE_BA1_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include "bundling/BlockProcessor.h" 23 | #include "BA_BlockProcessor.h" 24 | #include "Ciphersuite_BA.h" 25 | 26 | namespace dtn { 27 | 28 | /** 29 | * Block processor implementation for the Bundle Authentication Block 30 | */ 31 | class Ciphersuite_BA1 : public Ciphersuite_BA { 32 | public: 33 | const static int CSNUM_BA = 1; 34 | virtual u_int16_t cs_num() { 35 | return CSNUM_BA; 36 | }; 37 | 38 | const static int RESULT_LEN = 20; 39 | virtual size_t result_len() { 40 | return RESULT_LEN; 41 | } 42 | 43 | private: 44 | }; 45 | 46 | } // namespace dtn 47 | 48 | #endif /* BSP_ENABLED */ 49 | 50 | #endif /* _CIPHERSUITE_BA1_H_ */ 51 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_BA5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CIPHERSUITE_BA5_H_ 18 | #define _CIPHERSUITE_BA5_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include "bundling/BlockProcessor.h" 23 | #include "BA_BlockProcessor.h" 24 | #include "Ciphersuite_BA.h" 25 | 26 | namespace dtn { 27 | 28 | /** 29 | * Block processor implementation for the Bundle Authentication Block 30 | */ 31 | class Ciphersuite_BA5 : public Ciphersuite_BA { 32 | public: 33 | const static int CSNUM_BA = 5; 34 | virtual u_int16_t cs_num() { 35 | return CSNUM_BA; 36 | }; 37 | 38 | const static int RESULT_LEN = 32; 39 | virtual size_t result_len() { 40 | return RESULT_LEN; 41 | } 42 | 43 | private: 44 | }; 45 | 46 | } // namespace dtn 47 | 48 | #endif /* BSP_ENABLED */ 49 | 50 | #endif /* _CIPHERSUITE_BA5_H_ */ 51 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_BA9.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CIPHERSUITE_BA9_H_ 18 | #define _CIPHERSUITE_BA9_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include "bundling/BlockProcessor.h" 23 | #include "BA_BlockProcessor.h" 24 | #include "Ciphersuite_BA.h" 25 | 26 | namespace dtn { 27 | 28 | /** 29 | * Block processor implementation for the Bundle Authentication Block 30 | */ 31 | class Ciphersuite_BA9 : public Ciphersuite_BA { 32 | public: 33 | const static int CSNUM_BA = 9; 34 | virtual u_int16_t cs_num() { 35 | return CSNUM_BA; 36 | }; 37 | 38 | const static int RESULT_LEN = 48; 39 | virtual size_t result_len() { 40 | return RESULT_LEN; 41 | } 42 | 43 | private: 44 | }; 45 | 46 | } // namespace dtn 47 | 48 | #endif /* BSP_ENABLED */ 49 | 50 | #endif /* _CIPHERSUITE_BA9_H_ */ 51 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_PI2.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #define OPENSSL_FIPS 1 /* required for sha256 */ 24 | 25 | #include "Ciphersuite_PI2.h" 26 | #include "bundling/Bundle.h" 27 | #include "bundling/BundleDaemon.h" 28 | #include "bundling/BundleProtocol.h" 29 | #include "bundling/SDNV.h" 30 | #include "contacts/Link.h" 31 | #include "security/EVP_PK.h" 32 | 33 | namespace dtn { 34 | 35 | int Ciphersuite_PI2::calculate_signature_length( string sec_src, size_t digest_len) { 36 | size_t sig_len; 37 | EVP_PK::signature_length(Ciphersuite::config->get_priv_key_sig(sec_src, cs_num()), digest_len, sig_len); 38 | 39 | return sig_len; 40 | } 41 | 42 | 43 | } // namespace dtn 44 | 45 | #endif /* BSP_ENABLED */ 46 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | # Uncomment this to turn on verbose mode. 4 | export DH_VERBOSE=1 5 | 6 | # This is exported to make the rules for binary-indep and binary-arch 7 | # work below 8 | export DH_OPTIONS 9 | 10 | configure: configure-stamp 11 | configure-stamp: 12 | dh_testdir 13 | ./configure -C 14 | touch configure-stamp 15 | 16 | build: configure build-stamp 17 | build-stamp: 18 | dh_testdir 19 | $(MAKE) 20 | $(MAKE) -C applib pythonapi 21 | touch build-stamp 22 | 23 | clean: 24 | dh_testdir 25 | dh_testroot 26 | rm -f configure-stamp build-stamp 27 | $(MAKE) distclean || echo "nothing to clean" 28 | dh_clean 29 | 30 | install: build 31 | dh_clean 32 | dh_testdir 33 | dh_testroot 34 | dh_installdirs 35 | 36 | $(MAKE) DESTDIR=`pwd`/debian/dtn/ install 37 | $(MAKE) DESTDIR=`pwd`/debian/python-dtn/ -C applib pythonapi_install 38 | 39 | # Build architecture-independent files here. 40 | binary-indep: build install 41 | # We have nothing to do by default. 42 | 43 | # Build architecture-dependent files here. 44 | binary-arch: build install 45 | dh_testdir 46 | dh_testroot 47 | dh_installdocs 48 | dh_installexamples 49 | dh_installlogrotate 50 | dh_install -a 51 | dh_installinit 52 | dh_installman 53 | dh_link 54 | dh_strip 55 | dh_compress 56 | dh_fixperms 57 | dh_installdeb 58 | dh_shlibdeps 59 | dh_gencontrol 60 | dh_md5sums 61 | dh_builddeb 62 | 63 | binary: binary-indep binary-arch 64 | .PHONY: build clean binary-indep binary-arch binary install 65 | -------------------------------------------------------------------------------- /sim/Topology.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TOPOLOGY_H_ 18 | #define _TOPOLOGY_H_ 19 | 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | namespace dtnsim { 27 | 28 | class Node; 29 | 30 | 31 | /** 32 | * The class that maintains the topology of the network 33 | */ 34 | class Topology { 35 | 36 | public: 37 | static Node* create_node(const char* name); 38 | static Node* find_node(const char* name); 39 | 40 | typedef oasys::StringHashMap NodeTable; 41 | 42 | static NodeTable* node_table() { return &nodes_; } 43 | 44 | protected: 45 | static NodeTable nodes_; 46 | static const int MAX_NODES = 100; 47 | 48 | }; 49 | } // namespace dtnsim 50 | 51 | #endif /* _TOPOLOGY_H_ */ 52 | -------------------------------------------------------------------------------- /applib/APIBundleQueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _APIBUNDLEQUEUE_H_ 18 | #define _APIBUNDLEQUEUE_H_ 19 | 20 | #include 21 | #include "dtn_types.h" 22 | #include 23 | #include 24 | 25 | namespace dtn { 26 | 27 | /** 28 | * Small encapsulating structure for API bundles. 29 | */ 30 | struct APIBundle { 31 | dtn_bundle_spec_t spec_; 32 | oasys::ScratchBuffer payload_; 33 | }; 34 | 35 | /** 36 | * Type definition of a simple vector of APIBundles. 37 | */ 38 | typedef std::vector APIBundleVector; 39 | 40 | /** 41 | * Type definition of an oasys blocking message queue that stores 42 | * APIBundle structures. 43 | */ 44 | typedef oasys::MsgQueue APIBundleQueue; 45 | 46 | } // namespace dtn 47 | 48 | #endif /* _APIBUNDLEQUEUE_H_ */ 49 | -------------------------------------------------------------------------------- /servlib/bundling/ExpirationTimer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _EXPIRATION_TIMER_H_ 18 | #define _EXPIRATION_TIMER_H_ 19 | 20 | #include 21 | #include "BundleRef.h" 22 | 23 | namespace dtn { 24 | 25 | /** 26 | * Bundle expiration timer class. 27 | * 28 | * The timer is started when the bundle first arrives at the daemon, 29 | * and is cancelled when the daemon removes it from the pending list. 30 | * 31 | */ 32 | class ExpirationTimer : public oasys::Timer { 33 | public: 34 | ExpirationTimer(Bundle* bundle); 35 | 36 | virtual ~ExpirationTimer() {} 37 | 38 | /// The reference to the bundle, which is public since 39 | BundleRef bundleref_; 40 | 41 | protected: 42 | void timeout(const struct timeval& now); 43 | 44 | }; 45 | 46 | } // namespace dtn 47 | 48 | #endif /* _EXPIRATION_TIMER_H_ */ 49 | -------------------------------------------------------------------------------- /applib/sdnv-c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SDNV_C_H_ 18 | #define _SDNV_C_H_ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | #include 25 | 26 | /** 27 | * Return the number of bytes needed to encode the given value. 28 | */ 29 | extern size_t sdnv_encoding_len(u_int64_t val); 30 | 31 | /** 32 | * Convert the given 64-bit integer into an SDNV. 33 | * 34 | * @return The number of bytes used, or -1 on error. 35 | */ 36 | extern int sdnv_encode(u_int64_t val, u_char* bp, size_t len); 37 | 38 | /** 39 | * Convert an SDNV pointed to by bp into a unsigned 64-bit 40 | * integer. 41 | * 42 | * @return The number of bytes of bp consumed, or -1 on error. 43 | */ 44 | extern int sdnv_decode(const u_char* bp, size_t len, u_int64_t* val); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* _SDNV_C_H_ */ 51 | -------------------------------------------------------------------------------- /servlib/routing/StaticBundleRouter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _STATIC_BUNDLE_ROUTER_H_ 18 | #define _STATIC_BUNDLE_ROUTER_H_ 19 | 20 | #include "TableBasedRouter.h" 21 | 22 | namespace dtn { 23 | 24 | class RouteTable; 25 | 26 | /** 27 | * This is the implementation of the basic bundle routing algorithm 28 | * that only does static routing. Routes can be parsed from a 29 | * configuration file or injected via the command line and/or 30 | * management interfaces. 31 | * 32 | * As a result, the class simply uses the default event handlers from 33 | * the table based router implementation. 34 | */ 35 | 36 | class StaticBundleRouter : public TableBasedRouter { 37 | public: 38 | StaticBundleRouter() : TableBasedRouter("StaticBundleRouter", "static") {} 39 | }; 40 | 41 | } // namespace dtn 42 | 43 | #endif /* _STATIC_BUNDLE_ROUTER_H_ */ 44 | -------------------------------------------------------------------------------- /sim/SimRegistration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SIM_REGISTRATION_H_ 18 | #define _SIM_REGISTRATION_H_ 19 | 20 | #include 21 | 22 | #include "Node.h" 23 | #include "reg/Registration.h" 24 | 25 | using namespace dtn; 26 | 27 | namespace dtnsim { 28 | 29 | /** 30 | * Registration used for the simulator 31 | */ 32 | class SimRegistration : public oasys::Formatter, public APIRegistration { 33 | public: 34 | SimRegistration(Node* node, const EndpointID& endpoint, u_int32_t expiration = 10); 35 | 36 | /** 37 | * Deliver the given bundle. 38 | */ 39 | void deliver_bundle(Bundle* bundle); 40 | 41 | /** 42 | * Virtual from Formatter 43 | */ 44 | int format(char* buf, size_t sz) const; 45 | 46 | protected: 47 | Node* node_; 48 | }; 49 | 50 | } // namespace dtnsim 51 | 52 | #endif /* _SIM_REGISTRATION_H_ */ 53 | -------------------------------------------------------------------------------- /servlib/security/PC_BlockProcessor.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #include "PC_BlockProcessor.h" 24 | #include "bundling/Bundle.h" 25 | #include "bundling/BundleDaemon.h" 26 | #include "bundling/BundleProtocol.h" 27 | #include "contacts/Link.h" 28 | 29 | namespace dtn { 30 | 31 | static const char * log = "/dtn/bundle/ciphersuite"; 32 | 33 | //---------------------------------------------------------------------- 34 | PC_BlockProcessor::PC_BlockProcessor() 35 | : AS_BlockProcessor(BundleProtocol::CONFIDENTIALITY_BLOCK) 36 | { 37 | } 38 | 39 | int PC_BlockProcessor::format(oasys::StringBuffer* buf, BlockInfo *block) { 40 | buf->append("PCB "); 41 | return AS_BlockProcessor::format(buf, block); 42 | } 43 | 44 | 45 | } // namespace dtn 46 | 47 | #endif /* BSP_ENABLED */ 48 | -------------------------------------------------------------------------------- /servlib/security/PI_BlockProcessor.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #include "PI_BlockProcessor.h" 24 | #include "bundling/Bundle.h" 25 | #include "bundling/BundleDaemon.h" 26 | #include "bundling/BundleProtocol.h" 27 | #include "contacts/Link.h" 28 | 29 | namespace dtn { 30 | 31 | static const char * log = "/dtn/bundle/ciphersuite"; 32 | 33 | //---------------------------------------------------------------------- 34 | PI_BlockProcessor::PI_BlockProcessor() 35 | : AS_BlockProcessor(BundleProtocol::PAYLOAD_SECURITY_BLOCK) 36 | { 37 | } 38 | 39 | int PI_BlockProcessor::format(oasys::StringBuffer* buf, BlockInfo *block) { 40 | buf->append("PIB "); 41 | return AS_BlockProcessor::format(buf, block); 42 | } 43 | 44 | 45 | } // namespace dtn 46 | 47 | #endif /* BSP_ENABLED */ 48 | -------------------------------------------------------------------------------- /servlib/security/ES_BlockProcessor.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #ifdef BSP_ENABLED 22 | 23 | #include "ES_BlockProcessor.h" 24 | #include "bundling/Bundle.h" 25 | #include "bundling/BundleDaemon.h" 26 | #include "bundling/BundleProtocol.h" 27 | #include "contacts/Link.h" 28 | 29 | namespace dtn { 30 | 31 | static const char * log = "/dtn/bundle/ciphersuite"; 32 | 33 | //---------------------------------------------------------------------- 34 | ES_BlockProcessor::ES_BlockProcessor() 35 | : AS_BlockProcessor(BundleProtocol::EXTENSION_SECURITY_BLOCK) 36 | { 37 | } 38 | 39 | int ES_BlockProcessor::format(oasys::StringBuffer* buf, BlockInfo *block) { 40 | buf->append("ESB "); 41 | return AS_BlockProcessor::format(buf, block); 42 | } 43 | 44 | 45 | } // namespace dtn 46 | 47 | #endif /* BSP_ENABLED */ 48 | -------------------------------------------------------------------------------- /rpm/dtn.spec: -------------------------------------------------------------------------------- 1 | Summary: Delay Tolerant Networking reference implementation 2 | Name: dtn 3 | Version: 2.5.0 4 | Release: 1 5 | License: Apache 6 | Group: Applications/Internet 7 | URL: http://www.dtnrg.org 8 | Source0: %{name}_%{version}.tgz 9 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root 10 | 11 | %description 12 | 13 | This package contains the reference implementation of the Delay 14 | Tolerant Networking (DTN) architecture. This includes the DTN daemon 15 | (dtnd) as well as several example applications that use the DTN 16 | protocols. 17 | 18 | %prep 19 | %setup -q -n %{name}_%{version} 20 | 21 | %build 22 | ./configure 23 | make 24 | 25 | %install 26 | rm -rf $RPM_BUILD_ROOT 27 | DESTDIR=$RPM_BUILD_ROOT make install 28 | 29 | %clean 30 | make clean 31 | rm -rf $RPM_BUILD_ROOT 32 | 33 | 34 | %files 35 | %defattr(-,root,root,-) 36 | %doc README 37 | %config /etc/dtn.conf 38 | %config /etc/DS.xsd 39 | %config /etc/clevent.xsd 40 | %config/etc/router.xsd 41 | 42 | /var/dtn 43 | /var/dtn/bundles 44 | /var/dtn/db 45 | /usr/bin/dtnd 46 | /usr/bin/dtnd-control 47 | /usr/bin/dtncat 48 | /usr/bin/dtncp 49 | /usr/bin/dtncpd 50 | /usr/bin/dtnhttpproxy 51 | /usr/bin/dtnping 52 | /usr/bin/dtnrecv 53 | /usr/bin/dtnsend 54 | /usr/bin/dtntunnel 55 | /usr/bin/dtntraceroute 56 | /usr/lib/libdtnapi++-2.5.0.so 57 | /usr/lib/libdtnapi++.so 58 | /usr/lib/libdtnapi-2.5.0.so 59 | /usr/lib/libdtnapi.so 60 | /usr/lib/libdtntcl-2.5.0.so 61 | /usr/lib/libdtntcl.so 62 | /usr/lib/liboasys.so 63 | /usr/lib/liboasyscompat.so 64 | 65 | 66 | %changelog 67 | 68 | -------------------------------------------------------------------------------- /servlib/security/README-OpenSSL: -------------------------------------------------------------------------------- 1 | README for Bundle Security Protocol usage 2 | 3 | The standard ciphersuites require, amongst other things, 4 | an implementation of sha-256 message digest algorithm. 5 | 6 | The DTN reference code uses OpenSSL for cryptographic 7 | and related functions. Unfortunately, some versions of 8 | OpenSSL do not include sha-256. 9 | 10 | The "configure" process checks for the availability of 11 | sha-256 and provides an error if it is not found. 12 | 13 | If your system's OpenSSL does not have sha-256 then you 14 | can either upgrade it or build and use a local version 15 | of OpenSSL. OpenSSL can be obtained from 16 | http://www.openssl.org 17 | 18 | OpenSSL 0.9.8 version include sha-256 by default. If your 19 | system uses version 0.9.7 and you do not wish to upgrade 20 | then you can enable sha-256 in later versions of 0.9.7, 21 | such as 0.9.7l and 0.9.7m. To enable sha-256, specify "fips" 22 | when running "Configure". 23 | 24 | If you wish to leave you system installation untouched and 25 | build against a local version, then configure dtn using 26 | ./configure --with-bsp --with-openssl=/path/to/openssl 27 | 28 | Mac OS X note: for Mac OS X users ONLY. If you build dtn 29 | against a local OpenSSL using "--with-openssl=/path/to/openssl" 30 | you MUST also specify with it LDFLAGS="-Wl,-search_paths_first". 31 | The configuration for OS X users would then be 32 | ./configure --with-bsp --with-openssl=/path/to/openssl LDFLAGS="-Wl,-search_paths_first" 33 | Note that the quotes are required for the LDFLAGS argument. 34 | -------------------------------------------------------------------------------- /emulab/mail/sendmail-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cluster=$1 4 | num=$2 5 | mode=$3 6 | 7 | if [ -z "$cluster" -o -z "$num" -o -z "$mode" ] ; then 8 | echo "usage: $0 cluster num mode" 9 | exit 1 10 | fi 11 | 12 | i=0 13 | 14 | last=$(($num-1)) 15 | last2=$(($num-2)) 16 | 17 | while [ $i != $num ] ; do 18 | 19 | j=$(($i + 1)) 20 | echo "Installing sendmail config on node $i..." 21 | 22 | if [ ! $i == $last ] ; then 23 | if [ $mode == "hop" ] ; then 24 | smarthost=node-$j-links-$i-$j 25 | else 26 | smarthost=node-$last-links-$last2-$last 27 | fi 28 | else 29 | smarthost= 30 | fi 31 | 32 | sed "s/__SMART_HOST__/$smarthost/" < sendmail.cf.template > /tmp/sendmail.cf.$i 33 | 34 | node=node-$i.$cluster.dtn.emulab.net 35 | 36 | ssh $node sudo /etc/init.d/sendmail stop 37 | 38 | scp /tmp/sendmail.cf.$i $node:/tmp/sendmail.cf 39 | ssh $node sudo cp /tmp/sendmail.cf /etc/mail/sendmail.cf 40 | 41 | ssh $node sudo find /var/spool/mqueue/ -type f -delete 42 | ssh $node sudo find /var/spool/clientmqueue/ -type f -delete 43 | ssh $node rm -f /var/log/maillog 44 | 45 | ssh $node sudo rm -rf /var/run/sendmail_host_status 46 | ssh $node sudo mkdir /var/run/sendmail_host_status 47 | ssh $node sudo chmod 700 /var/run/sendmail_host_status 48 | 49 | scp count_delivery.sh $node:/tmp/count_delivery.sh 50 | 51 | ssh $node sh -c 'cat > /tmp/sysconfig_sendmail < 21 | 22 | #include "BlockProcessor.h" 23 | 24 | namespace dtn { 25 | 26 | /** 27 | * Block processor implementation for any bundle block generated by the API. 28 | */ 29 | class APIBlockProcessor : public BlockProcessor, 30 | public oasys::Singleton { 31 | public: 32 | /// Constructor 33 | APIBlockProcessor(); 34 | 35 | /// @{ Virtual from BlockProcessor 36 | int consume(Bundle* bundle, BlockInfo* block, u_char* buf, size_t len); 37 | int generate(const Bundle* bundle, BlockInfoVec* xmit_blocks, 38 | BlockInfo* block, const LinkRef& link, bool last); 39 | /// @} 40 | }; 41 | 42 | } // namespace dtn 43 | 44 | #endif /* _API_BLOCK_PROCESSOR_H_ */ 45 | -------------------------------------------------------------------------------- /servlib/storage/LinkStore.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include "LinkStore.h" 22 | #include "contacts/Link.h" 23 | 24 | template<> 25 | dtn::LinkStore* oasys::Singleton::instance_ = NULL; 26 | 27 | namespace dtn { 28 | 29 | LinkStore::LinkStore() 30 | : LinkStoreImpl("LinkStore", "/dtn/storage/links", "link", "links") 31 | { 32 | } 33 | 34 | /** 35 | * Boot time initializer that takes as a parameter the storage 36 | * configuration to use. 37 | */ 38 | int 39 | LinkStore::init(const oasys::StorageConfig& cfg, 40 | oasys::DurableStore* store) 41 | { 42 | if (instance_ != NULL) { 43 | PANIC("LinkStore::init called multiple times"); 44 | } 45 | instance_ = new LinkStore(); 46 | return instance_->do_init(cfg, store); 47 | } 48 | 49 | 50 | } // namespace dtn 51 | 52 | -------------------------------------------------------------------------------- /doc/manual/man_dtncat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | DTN2 Man pages: dtncat 4 | 5 | 6 | 7 |

dtncat 8 |

9 | 10 |

11 |

NAME 12 |

13 |

14 | dtncat - source bundles from stdin or receive bundles to stdout. Resembles the nc (netcat) unix program 15 | 16 |

SYNOPSIS 17 |

18 |

19 | To source bundles from stdin: 20 |

21 | usage: dtncat [opts] -s EID -d EID 22 |

23 | To receive bundles to stdout: 24 |

25 | usage: dtncat [opts] -l EID 26 |

DESCRIPTION 27 |

28 |

common options: 29 |

30 |  -v verbose
31 |  -h/H help
32 |  -i regid registration id for listening
33 | receive only options (-l option required):
34 |  -l eid receive bundles destined for eid (instead of sending)
35 |  -n count exit after count bundles received (-l option required)
36 | send only options (-l option prohibited):
37 |  -s eid|demux_string source eid
38 |  -d eid|demux_string destination eid
39 |  -r eid|demux_string reply to eid
40 |  -e time expiration time in seconds (default: one hour)
41 |  -c request custody transfer
42 |  -C request custody transfer receipts
43 |  -D request for end-to-end delivery receipt
44 |  -R request for bundle reception receipts
45 |  -F request for bundle forwarding receipts
46 |  -w wait for bundle status reports
47 |  -S sequence_id sequence id vector
48 |  -O obsoletes_id obsoletes id vector
49 | 
50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_PI10.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CIPHERSUITE_PI10_H_ 18 | #define _CIPHERSUITE_PI10_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include 23 | #include "bundling/BlockProcessor.h" 24 | #include "PI_BlockProcessor.h" 25 | #include "Ciphersuite_PI.h" 26 | 27 | namespace dtn { 28 | 29 | /** 30 | * Block processor implementation for the Payload Integrity Block 31 | * using the ECDSA algorithm. 32 | */ 33 | class Ciphersuite_PI10 : public Ciphersuite_PI { 34 | public: 35 | typedef Ciphersuite::LocalBuffer LocalBuffer; 36 | 37 | const static int CSNUM_PI = 10; 38 | 39 | virtual u_int16_t cs_num() { 40 | return CSNUM_PI; 41 | }; 42 | 43 | virtual u_int16_t hash_len() { 44 | return 384; 45 | } 46 | 47 | private: 48 | }; 49 | 50 | } // namespace dtn 51 | 52 | #endif /* BSP_ENABLED */ 53 | 54 | #endif /* _CIPHERSUITE_PI10_H_ */ 55 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_PI6.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CIPHERSUITE_PI6_H_ 18 | #define _CIPHERSUITE_PI6_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include 23 | #include "bundling/BlockProcessor.h" 24 | #include "PI_BlockProcessor.h" 25 | #include "Ciphersuite_PI.h" 26 | 27 | namespace dtn { 28 | 29 | /** 30 | * Block processor implementation for the Payload Integrity Block 31 | * using the ECDSA algorithm. 32 | */ 33 | class Ciphersuite_PI6 : public Ciphersuite_PI { 34 | public: 35 | typedef Ciphersuite::LocalBuffer LocalBuffer; 36 | 37 | const static int CSNUM_PI = 6; 38 | 39 | virtual u_int16_t cs_num() { 40 | return CSNUM_PI; 41 | }; 42 | 43 | virtual u_int16_t hash_len() { 44 | return 256; 45 | } 46 | 47 | private: 48 | 49 | }; 50 | 51 | } // namespace dtn 52 | 53 | #endif /* BSP_ENABLED */ 54 | 55 | #endif /* _CIPHERSUITE_PI6_H_ */ 56 | -------------------------------------------------------------------------------- /servlib/bundling/BPQResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2011 Trinity College Dublin 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _BPQRESPONSE_H_ 18 | #define _BPQRESPONSE_H_ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | # include 22 | #endif 23 | 24 | #ifdef BPQ_ENABLED 25 | 26 | #include "Bundle.h" 27 | #include "BundleProtocol.h" 28 | #include "BPQBlockProcessor.h" 29 | 30 | namespace dtn { 31 | /** 32 | * Utility class to construct BPQ response bundles. 33 | */ 34 | class BPQResponse { 35 | public: 36 | 37 | /** 38 | * Constructor-like function to create a new BPQ Response bundle 39 | */ 40 | static bool create_bpq_response(Bundle* new_response, 41 | Bundle* query, 42 | Bundle* cached_response, 43 | EndpointID& source_eid); 44 | }; 45 | 46 | } // namespace dtn 47 | 48 | #endif /* BPQ_ENABLED */ 49 | 50 | #endif /* _BPQRESPONSE_H_ */ 51 | -------------------------------------------------------------------------------- /tools/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright 2004-2006 Intel Corporation 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | 20 | 21 | # 22 | # Simple un installation script for the dtn reference implementation 23 | # 24 | 25 | echo "***" 26 | echo "*** Unstalling dtn..." 27 | echo "***" 28 | echo "" 29 | 30 | echo "This script will remove all dtn executables, configuration" 31 | echo "files and data files." 32 | echo "" 33 | echo -n "Are you sure you want to continue? [n]: " 34 | read y 35 | if [ ! "$y" = "y" -o "$y" = "yes" ]; then 36 | echo "uninstall aborted" 37 | exit 0 38 | fi 39 | 40 | echo -n "removing dtn executables: " 41 | apps="dtnsend dtnrecv dtnping dtncp dtncpd" 42 | for f in dtnd $apps ; do 43 | echo -n "$f... " 44 | rm -f /usr/bin/$f 45 | done 46 | echo "" 47 | 48 | echo -n "removing dtn directories: " 49 | for d in /var/dtn/db /var/dtn/bundles /var/dtn ; do 50 | echo -n "$d... " 51 | rm -rf $d 52 | done 53 | echo "" 54 | 55 | echo "uninstallation complete." 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # some defaults pulled from the CVS manual then modified 2 | tags 3 | TAGS 4 | \.\#* 5 | *~ 6 | .del-* 7 | *.a 8 | *.olb 9 | *.o 10 | *.obj 11 | *.so 12 | *.exe 13 | *.elc 14 | *.ln 15 | core 16 | 17 | # other good defaults 18 | .gdb_history 19 | .glimpse_* 20 | *.d 21 | *.dylib 22 | *.swp 23 | autoscan.log 24 | config.cache 25 | config.log 26 | config.status 27 | configure.scan 28 | autom4te.cache 29 | 30 | # specific ignores 31 | Rules.make 32 | System.make 33 | dtn-config.h 34 | build-stamp 35 | configure-stamp 36 | run-* 37 | build* 38 | applib/perl/Makefile 39 | applib/perl/MYMETA.* 40 | applib/perl/blib 41 | applib/perl/dtnapi.bs 42 | applib/perl/pm_to_blib 43 | applib/python/build 44 | applib/python/dtnapi.pyc 45 | apps/tca_admin/tca_admin 46 | apps/dtncat/dtncat 47 | apps/dtncp/dtncp 48 | apps/dtncpd/dtncpd 49 | apps/dtnmoteproxy/dtnmoteproxy 50 | apps/dtnpeek/dtnpeek 51 | apps/dtnperf/dtnperf-client 52 | apps/dtnperf/dtnperf-server 53 | apps/dtnping/dtnping 54 | apps/dtnping/dtnreporter 55 | apps/dtnping/dtntraceroute 56 | apps/dtnpublish/dtnpublish 57 | apps/dtnquery/dtnquery 58 | apps/dtnrecv/dtnrecv 59 | apps/dtnrespond/dtnrespond 60 | apps/dtnsend/dtnsend 61 | apps/dtnsink/dtnsink 62 | apps/dtnsource/dtnsource 63 | apps/dtntest/dtntest 64 | apps/dtntunnel/dtntunnel 65 | apps/num2sdnv/num2sdnv 66 | apps/num2sdnv/sdnv2num 67 | daemon/dtnd 68 | sim/dtnsim 69 | servlib/ipnd.make 70 | test/unit_tests/*-test 71 | oasys 72 | 73 | # debian package build ignores 74 | debian/dtn 75 | debian/dtn.substvars 76 | debian/python-dtn 77 | debian/python-dtn.substvars 78 | debian/*.debhelper 79 | files 80 | -------------------------------------------------------------------------------- /servlib/conv_layers/IPConvergenceLayerUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _IP_CONVERGENCE_LAYER_UTILS_H_ 18 | #define _IP_CONVERGENCE_LAYER_UTILS_H_ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "ConvergenceLayer.h" 26 | 27 | namespace dtn { 28 | 29 | /** 30 | * Utility class for shared functionality between ip-based convergence 31 | * layers. 32 | */ 33 | class IPConvergenceLayerUtils { 34 | public: 35 | /** 36 | * Parse a next hop address specification of the form 37 | * [:?]. 38 | * 39 | * @return true if the conversion was successful, false 40 | */ 41 | static bool parse_nexthop(const char* logpath, const char* nexthop, 42 | in_addr_t* addr, u_int16_t* port); 43 | }; 44 | 45 | } // namespace dtn 46 | 47 | #endif /* _IP_CONVERGENCE_LAYER_UTILS_H_ */ 48 | -------------------------------------------------------------------------------- /test/comparison/check_ping.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright 2005-2006 Intel Corporation 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | 20 | 21 | OTHERHOST=$1 22 | 23 | 24 | COUNT=4 25 | PACKET_SIZE=50; 26 | INTERVAL=0.2 27 | TIMEOUT=3 28 | RETRY=5 29 | rm -f /tmp/ping.$OTHERHOST 30 | 31 | 32 | starttime=`date +%s` 33 | ps -eo cmd > /tmp/$starttime 34 | #CHeck if already running, if yes then exitcat 35 | num=`grep check_ping /tmp/$starttime | wc -l` 36 | echo $num 37 | if [ $num -gt 1 ]; then 38 | exit 0 39 | fi 40 | 41 | while [ 1 ] 42 | do 43 | timenow=`date +%s` 44 | let incr=$timenow-$starttime 45 | ping -q -w $TIMEOUT -i $INTERVAL -c $COUNT -s $PACKET_SIZE $OTHERHOST 2>/dev/null >/dev/null 46 | ret=$? 47 | if [ "$ret" == "0" ]; then 48 | echo $incr UP " At:$timenow :Retry after $RETRY seconds to $OTHERHOST" 49 | else 50 | echo $incr DOWN " At:$timenow :Retry after $RETRY seconds to $OTHERHOST" 51 | fi 52 | sleep $RETRY 53 | done 54 | 55 | -------------------------------------------------------------------------------- /test/startstop.tcl: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2005-2006 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | test::name startstop 18 | net::default_num_nodes 1 19 | 20 | dtn::config 21 | dtn::config_interface tcp 22 | dtn::config_linear_topology ONDEMAND tcp true 23 | 24 | set clean 0 25 | foreach var $opt(opts) { 26 | if {$var == "-clean"} { 27 | set clean 1 28 | } else { 29 | testlog error "ERROR: unrecognized test option '$var'" 30 | exit 1 31 | } 32 | } 33 | 34 | test::script { 35 | testlog "Startstop test script executing..." 36 | dtn::run_dtnd * 37 | 38 | testlog "Waiting for dtnd" 39 | dtn::wait_for_dtnd * 40 | dtn::tell_dtnd * {puts "startstop test"} 41 | 42 | testlog "Shutting down dtnd" 43 | dtn::stop_dtnd * 44 | 45 | testlog "Waiting for dtnd to quit" 46 | run::wait_for_programs 47 | 48 | if {! $clean} { 49 | testlog "Running new dtnds" 50 | dtn::run_dtnd * 51 | 52 | testlog "Leaving dtn daemons running for the test utils to kill them..." 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /servlib/storage/SQLGlobalStore.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SQL_GLOBAL_STORE_H_ 18 | #define _SQL_GLOBAL_STORE_H_ 19 | 20 | #include "GlobalStore.h" 21 | 22 | namespace oasys { 23 | class SQLImplementation; 24 | } 25 | 26 | namespace dtn { 27 | 28 | class SQLStore; 29 | 30 | /** 31 | * Implementation of GlobalStore that uses an underlying SQL database. 32 | */ 33 | class SQLGlobalStore : public GlobalStore { 34 | public: 35 | /** 36 | * Constructor 37 | */ 38 | SQLGlobalStore(oasys::SQLImplementation* impl); 39 | 40 | /** 41 | * Destructor 42 | */ 43 | virtual ~SQLGlobalStore(); 44 | 45 | /** 46 | * Load in the values from the database. 47 | */ 48 | virtual bool load(); 49 | 50 | /** 51 | * Update the values in the database. 52 | */ 53 | virtual bool update(); 54 | 55 | protected: 56 | SQLStore* store_; 57 | }; 58 | } // namespace dtn 59 | 60 | #endif /* _SQL_GLOBAL_STORE_H_ */ 61 | -------------------------------------------------------------------------------- /sim/NodeCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _NODE_COMMAND_H_ 18 | #define _NODE_COMMAND_H_ 19 | 20 | #include 21 | 22 | #include "cmd/BundleCommand.h" 23 | #include "cmd/LinkCommand.h" 24 | #include "cmd/ParamCommand.h" 25 | #include "cmd/RouteCommand.h" 26 | #include "cmd/StorageCommand.h" 27 | 28 | namespace dtnsim { 29 | 30 | class Node; 31 | 32 | /** 33 | * Class to control the node 34 | */ 35 | class NodeCommand : public oasys::TclCommand { 36 | public: 37 | NodeCommand(Node* node); 38 | 39 | /// virtual from TclCommand 40 | virtual int exec(int objc, Tcl_Obj** objv, Tcl_Interp* interp); 41 | 42 | protected: 43 | Node* node_; 44 | dtn::BundleCommand bundle_cmd_; 45 | dtn::LinkCommand link_cmd_; 46 | dtn::ParamCommand param_cmd_; 47 | dtn::RouteCommand route_cmd_; 48 | dtn::StorageCommand storage_cmd_; 49 | }; 50 | 51 | } // namespace dtnsim 52 | 53 | #endif /* _NODE_COMMAND_H_ */ 54 | -------------------------------------------------------------------------------- /servlib/bundling/BP_Local.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _BP_LOCAL_H_ 18 | #define _BP_LOCAL_H_ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | 25 | namespace dtn { 26 | 27 | /** 28 | * Helper class for BlockProcessor local state for a block. 29 | */ 30 | class BP_Local : public oasys::RefCountedObject { 31 | public: 32 | /** 33 | * Constructor. 34 | */ 35 | BP_Local() : RefCountedObject("/dtn/bp_local/refs") { 36 | log_debug_p("/dtn/bp_local/refs", "constructor"); 37 | }; 38 | 39 | /** 40 | * Virtual destructor. 41 | */ 42 | virtual ~BP_Local() { log_debug_p("/dtn/bp_local/refs", "destructor"); }; 43 | 44 | virtual void dummy() {}; 45 | 46 | }; /* BP_Local */ 47 | 48 | /** 49 | * Typedef for a reference to a BP_Local. 50 | */ 51 | typedef oasys::Ref BP_LocalRef; 52 | 53 | } // namespace dtn 54 | 55 | #endif /* _BP_LOCAL_H_ */ 56 | -------------------------------------------------------------------------------- /servlib/bundling/ExpirationTimer.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include "BundleDaemon.h" 22 | #include "BundleEvent.h" 23 | #include "ExpirationTimer.h" 24 | 25 | namespace dtn { 26 | 27 | ExpirationTimer::ExpirationTimer(Bundle* bundle) 28 | : bundleref_(bundle, "expiration timer") 29 | { 30 | } 31 | 32 | void 33 | ExpirationTimer::timeout(const struct timeval& now) 34 | { 35 | (void)now; 36 | oasys::ScopeLock l(bundleref_->lock(), "ExpirationTimer::timeout"); 37 | 38 | // null out the pointer to ourself in the bundle class 39 | bundleref_->set_expiration_timer(NULL); 40 | 41 | // post the expiration event 42 | log_debug_p("/timer/expiration", "Bundle %d expired", bundleref_.object()->bundleid()); 43 | BundleDaemon::post_at_head(new BundleExpiredEvent(bundleref_.object())); 44 | 45 | // clean ourselves up 46 | delete this; 47 | } 48 | 49 | } // namespace dtn 50 | -------------------------------------------------------------------------------- /servlib/contacts/OndemandLink.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifdef HAVE_CONFIG_H 18 | # include 19 | #endif 20 | 21 | #include "OndemandLink.h" 22 | #include "bundling/BundleDaemon.h" 23 | 24 | namespace dtn { 25 | 26 | //---------------------------------------------------------------------- 27 | OndemandLink::OndemandLink(std::string name, 28 | ConvergenceLayer* cl, 29 | const char* nexthop) 30 | : Link(name, ONDEMAND, cl, nexthop) 31 | { 32 | set_state(AVAILABLE); 33 | 34 | // override the default for the idle close time 35 | params_.idle_close_time_ = 30; 36 | } 37 | 38 | //---------------------------------------------------------------------- 39 | void 40 | OndemandLink::set_initial_state() 41 | { 42 | BundleDaemon::post( 43 | new LinkAvailableEvent(LinkRef(this, "OndemandLink"), 44 | ContactEvent::NO_INFO)); 45 | } 46 | 47 | 48 | } // namespace dtn 49 | -------------------------------------------------------------------------------- /servlib/contacts/OpportunisticLink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _OPPORTUNISTIC_LINK_H_ 18 | #define _OPPORTUNISTIC_LINK_H_ 19 | 20 | class Link; 21 | 22 | #include "Link.h" 23 | 24 | namespace dtn { 25 | 26 | /** 27 | * Abstraction for a OPPORTUNISTIC link. It has to be opened 28 | * everytime one wants to use it. It has by definition only 29 | * -one contact- that is associated with the current 30 | * opportunity. The difference between opportunistic link 31 | * and ondemand link is that the ondemand link does not have 32 | * a queue of its own. 33 | */ 34 | class OpportunisticLink : public Link { 35 | public: 36 | /** 37 | * Constructor / Destructor 38 | */ 39 | OpportunisticLink(std::string name, 40 | ConvergenceLayer* cl, 41 | const char* nexthop) 42 | : Link(name, OPPORTUNISTIC, cl, nexthop) 43 | { 44 | } 45 | }; 46 | 47 | } // namespace dtn 48 | 49 | #endif /* _OPPORTUNISTIC_LINK_H_ */ 50 | -------------------------------------------------------------------------------- /servlib/bundling/SessionBlockProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _SESSION_BLOCK_PROCESSOR_H_ 18 | #define _SESSION_BLOCK_PROCESSOR_H_ 19 | 20 | #include "BlockProcessor.h" 21 | 22 | namespace dtn { 23 | 24 | /** 25 | * Block processor implementation for session blocks. 26 | */ 27 | class SessionBlockProcessor : public BlockProcessor { 28 | public: 29 | /// Constructor 30 | SessionBlockProcessor(); 31 | 32 | /// @{ Virtual from BlockProcessor 33 | int prepare(const Bundle* bundle, BlockInfoVec* xmit_blocks, 34 | const BlockInfo* source, const LinkRef& link, 35 | BlockInfo::list_owner_t list); 36 | 37 | int generate(const Bundle* bundle, BlockInfoVec* xmit_blocks, 38 | BlockInfo* block, const LinkRef& link, bool last); 39 | 40 | int consume(Bundle* bundle, BlockInfo* block, u_char* buf, size_t len); 41 | /// @} 42 | }; 43 | 44 | } // namespace dtn 45 | 46 | #endif /* _SESSION_BLOCK_PROCESSOR_H_ */ 47 | -------------------------------------------------------------------------------- /servlib/cmd/TestCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TEST_COMMAND_H_ 18 | #define _TEST_COMMAND_H_ 19 | 20 | // XXX/demmer this really belongs in the daemon directory... 21 | 22 | #include 23 | 24 | namespace dtn { 25 | 26 | /** 27 | * CommandModule for the "test" command. 28 | */ 29 | class TestCommand : public oasys::TclCommand { 30 | public: 31 | TestCommand(); 32 | 33 | /** 34 | * Binding function. Since the class is created before logging is 35 | * initialized, this can't be in the constructor. 36 | */ 37 | void bind_vars(); 38 | 39 | /** 40 | * Virtual from CommandModule. 41 | */ 42 | virtual int exec(int argc, const char** argv, Tcl_Interp* interp); 43 | 44 | int id_; ///< sets the test node id 45 | std::string initscript_; ///< tcl script to run at init 46 | std::string argv_; ///< "list" of space-separated args 47 | }; 48 | 49 | } // namespace dtn 50 | 51 | #endif /* _TEST_COMMAND_H_ */ 52 | -------------------------------------------------------------------------------- /sim/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2004-2006 Intel Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # 18 | # Makefile for DTN2/sim 19 | # 20 | 21 | # 22 | # Make sure SRCDIR is set (.. by default) 23 | # 24 | ifeq ($(SRCDIR),) 25 | SRCDIR := .. 26 | BUILDDIR := .. 27 | endif 28 | 29 | SIM_SRCS := \ 30 | dtnsim.cc \ 31 | Connectivity.cc \ 32 | ConnCommand.cc \ 33 | Node.cc \ 34 | NodeCommand.cc \ 35 | Simulator.cc \ 36 | SimCommand.cc \ 37 | SimConvergenceLayer.cc \ 38 | SimLog.cc \ 39 | SimRegistration.cc \ 40 | Topology.cc \ 41 | TrAgent.cc \ 42 | 43 | SIM_OBJS := $(SIM_SRCS:.cc=.o) 44 | 45 | # 46 | # Default target is to build the simulator 47 | # 48 | all: dtnsim 49 | 50 | # 51 | # Include dtnsim in files to clean with make clean 52 | # 53 | BINFILES += dtnsim 54 | 55 | COMPONENT_LIBS := ../servlib/libdtnserv.a 56 | 57 | dtnsim: $(SIM_OBJS) $(COMPONENT_LIBS) 58 | $(CXX) $(CXXFLAGS) $(SIM_OBJS) $(COMPONENT_LIBS) \ 59 | -o $@ $(LDFLAGS) $(OASYS_LDFLAGS) $(EXTLIB_LDFLAGS) $(LIBS) 60 | 61 | # 62 | # Include the common rules 63 | # 64 | include ../Rules.make 65 | -------------------------------------------------------------------------------- /servlib/reg/LoggingRegistration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2006 Intel Corporation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _LOGGING_REGISTRATION_H_ 18 | #define _LOGGING_REGISTRATION_H_ 19 | 20 | #include 21 | #include 22 | 23 | #include "Registration.h" 24 | 25 | namespace dtn { 26 | 27 | 28 | /** 29 | * A simple utility class used mostly for testing registrations. 30 | * 31 | * When created, this sets up a new registration within the daemon, 32 | * and for any bundles that arrive, outputs logs of the bundle header 33 | * fields as well as the payload data (if ascii). The implementation 34 | * is structured as a thread that blocks (forever) waiting for bundles 35 | * to arrive on the registration's bundle list, then logging the 36 | * bundles and looping again. 37 | */ 38 | class LoggingRegistration : public Registration { 39 | public: 40 | LoggingRegistration(const EndpointIDPattern& endpoint); 41 | void deliver_bundle(Bundle* bundle); 42 | }; 43 | 44 | } // namespace dtn 45 | 46 | #endif /* _LOGGING_REGISTRATION_H_ */ 47 | -------------------------------------------------------------------------------- /servlib/routing/ProphetLink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 Baylor University 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _PROPHET_LINK_H_ 18 | #define _PROPHET_LINK_H_ 19 | 20 | #include "prophet/Link.h" 21 | #include "contacts/Link.h" 22 | 23 | namespace dtn 24 | { 25 | 26 | class ProphetLink : public prophet::Link 27 | { 28 | 29 | public: 30 | ProphetLink(const LinkRef& link) 31 | : ref_("ProphetLink") 32 | { 33 | ref_ = link; 34 | } 35 | 36 | ~ProphetLink() 37 | { 38 | ref_ = NULL; 39 | } 40 | 41 | const LinkRef& ref() const { return ref_; } 42 | 43 | ///@{ Virtual from prophet::Link 44 | const char* nexthop() const 45 | { 46 | return (ref().object() == NULL) ? "" : ref()->nexthop(); 47 | } 48 | const char* remote_eid() const 49 | { 50 | return (ref().object() == NULL) ? "" : ref()->remote_eid().c_str(); 51 | } 52 | ///@} 53 | 54 | protected: 55 | 56 | LinkRef ref_; ///< DTN Link object 57 | }; // class ProphetLink 58 | 59 | }; // namespace dtn 60 | 61 | #endif // _PROPHET_LINK_H_ 62 | -------------------------------------------------------------------------------- /servlib/discovery/EthAnnounce.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Lana Black 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _ETH_ANNOUNCE_H_ 18 | #define _ETH_ANNOUNCE_H_ 19 | 20 | #ifndef DTN_CONFIG_STATE 21 | #error "MUST INCLUDE dtn-config.h before including this file" 22 | #endif 23 | 24 | #include "Announce.h" 25 | #include "EthDiscovery.h" 26 | 27 | namespace dtn { 28 | 29 | class EthAnnounce : public Announce 30 | { 31 | public: 32 | 33 | size_t format_advertisement(u_char*, size_t); 34 | 35 | virtual ~EthAnnounce() {} 36 | 37 | protected: 38 | 39 | friend class Announce; 40 | 41 | // Some stuff from EthConvergenceLayer here 42 | typedef EthDiscovery::EthBeaconHeader EthBeaconHeader; 43 | static const u_int8_t ETHCL_VERSION = 0x01; 44 | static const u_int16_t ETHERTYPE_DTN = 0xd710; 45 | static const u_int8_t ETHCL_BEACON = 0x01; 46 | 47 | 48 | EthAnnounce(); 49 | 50 | bool configure(const std::string& name, ConvergenceLayer* cl, 51 | int argc, const char *argv[]); 52 | }; 53 | 54 | } // dtn 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_PI2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CIPHERSUITE_PI2_H_ 18 | #define _CIPHERSUITE_PI2_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include 23 | #include "bundling/BlockProcessor.h" 24 | #include "PI_BlockProcessor.h" 25 | #include "Ciphersuite_PI.h" 26 | 27 | namespace dtn { 28 | 29 | /** 30 | * Block processor implementation for the bundle authentication block. 31 | */ 32 | class Ciphersuite_PI2 : public Ciphersuite_PI { 33 | public: 34 | typedef Ciphersuite::LocalBuffer LocalBuffer; 35 | 36 | const static int CSNUM_PI = 2; 37 | 38 | virtual u_int16_t cs_num() { 39 | return CSNUM_PI; 40 | }; 41 | 42 | virtual u_int16_t hash_len() { 43 | return 256; 44 | }; 45 | 46 | private: 47 | virtual int calculate_signature_length(std::string sec_src, 48 | size_t digest_len); 49 | 50 | 51 | }; 52 | 53 | } // namespace dtn 54 | 55 | #endif /* BSP_ENABLED */ 56 | 57 | #endif /* _CIPHERSUITE_PI2_H_ */ 58 | -------------------------------------------------------------------------------- /servlib/security/Ciphersuite_ES4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 SPARTA Inc 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _CIPHERSUITE_ES4_H_ 18 | #define _CIPHERSUITE_ES4_H_ 19 | 20 | #ifdef BSP_ENABLED 21 | 22 | #include "Ciphersuite_ES.h" 23 | 24 | namespace dtn { 25 | 26 | class Ciphersuite_ES4 : public Ciphersuite_ES { 27 | public: 28 | Ciphersuite_ES4(); 29 | 30 | u_int16_t cs_num(); 31 | 32 | virtual int encrypt( 33 | std::string security_dest, 34 | const LocalBuffer& input, // the Bundle Encryption Key (BEK) to be encrypted 35 | LocalBuffer& result); // encrypted BEK will go here 36 | 37 | virtual int decrypt( 38 | std::string security_dest, 39 | const LocalBuffer& enc_data, // RSA-encrypted Bundle Encryption Key (BEK) 40 | LocalBuffer& result); // decrypted BEK will go here 41 | 42 | const static int CSNUM_ES = 4; 43 | }; 44 | 45 | } 46 | 47 | #endif /* BSP_ENABLED */ 48 | 49 | #endif /* _CIPHERSUITE_ES4_H_ */ 50 | --------------------------------------------------------------------------------