diff -r 000000000000 -r 2b3e5ec03512 daemon/dtn.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/daemon/dtn.conf Thu Apr 21 14:57:45 2011 +0100 @@ -0,0 +1,227 @@ +# +# dtn.conf +# +# Default configuration file for Internet-connected DTN nodes. The +# daemon uses a tcl interpreter to parse this file, thus any standard +# tcl commands are valid, and all settings are get/set using a single +# 'set' functions as: set +# + +log /dtnd info "dtnd parsing configuration..." + +######################################## +# +# Daemon Console Configuration +# +######################################## + +# +# console set stdio [ true | false ] +# +# If set to false, disable the interactive console on stdin/stdout. +# The default is set to true (unless the dtnd process is run as a +# daemon). +# +# console set stdio false + +# +# console set addr +# console set port +# +# Settings for the socket based console protocol. +# (this interprets user commands) +# +console set addr 127.0.0.1 +console set port 5050 + +# +# console set prompt +# +# Set the prompt string. Helps if running multiple dtnd's +# +set shorthostname [lindex [split [info hostname] .] 0] +console set prompt "$shorthostname dtn% " + +######################################## +# +# Storage Configuration +# +######################################## + +# +# storage set type [ berkeleydb | external | memorydb ] +# +# Set the storage system to be used +# +storage set type berkeleydb + +# the following are for use with external data stores +# +# The server port to connect to (on localhost) +# Note that 62345 has no special significance -- chosen randomly +storage set server_port 62345 + +# The external data store schema location, which can be +# found in dtn2/oasys/storage/DS.xsd. +storage set schema /etc/DS.xsd + + +# +# Do a runtime check for the standard locations for the persistent +# storage directory +# +set dbdir "" +foreach dir {/var/dtn /var/tmp/dtn} { + if {[file isdirectory $dir]} { + set dbdir $dir + break + } +} + +if {$dbdir == ""} { + puts stderr "Must create /var/dtn or /var/tmp/dtn storage directory" + exit 1 +} + +# +# storage set payloaddir +# +# Set the directory to be used for bundle payload files +# +storage set payloaddir $dbdir/bundles + +# +# storage set dbname +# +# Set the database name (appended with .db as the filename in berkeley +# db, used as-is for SQL variants +# +storage set dbname DTN + +# +# storage set dbdir +# +# +# When using berkeley db, set the directory to be used for the +# database files and the name of the files and error log. +# +storage set dbdir $dbdir/db + +######################################## +# +# Routing configuration +# +######################################## + +# +# Set the algorithm used for dtn routing. +# +# route set type [static | flood | neighborhood | linkstate | external] +# +route set type static + +# +# route local_eid +# +# Set the local administrative id of this node. The default just uses +# the internet hostname plus the appended string ".dtn" to make it +# clear that the hostname isn't really used for DNS lookups. +# +route local_eid "dtn://[info hostname].dtn" + +# +# External router specific options +# +# route set server_port 8001 +# route set hello_interval 30 +# route set schema "/etc/router.xsd" + +######################################## +# +# TCP convergence layer configuration +# +######################################## + +# +# interface add [name] [CL] +# +# Add an input interface to listen on addr:port for incoming bundles +# from other tcp / udp convergence layers +# +# For IP-based interfaces, interfaces listen on INADDR_ANY port 4556 +# by default. These can be overridden by using the local_addr and/or +# local_port arguments. +interface add tcp0 tcp +interface add udp0 udp + +# +# link add +# +# Add a link to a peer node. +# +# For IP-based links (tcp or udp), the nexthop should contain a DNS +# hostname or IP address, followed optionally by a : and a port. If +# the port is not specified, the default of 4556 is used. +# +# e.g. link add link1 dtn.dtnrg.org ONDEMAND tcp +# link add link2 dtn2.dtnrg.org:10000 ONDEMAND tcp + +# +# route add +# +# Add a route to the given bundle endpoint id pattern using the +# specified link name or peer endpoint. +# +# e.g. route add dtn://host.domain/* tcp0 + +######################################## +# +# Service discovery +# +######################################## + +# +# discovery add +# discovery announce +# +# Add a local neighborhood discovery module +# +# e.g. discovery add discovery_bonjour bonjour + +######################################## +# +# Parameter Tuning +# +######################################## + +# +# Set the size threshold for the daemon so any bundles smaller than this +# size maintain a shadow copy in memory to minimize disk accesses. +# +# param set payload_mem_threshold 16384 + +# +# Test option to keep all bundle files in the filesystem, even after the +# bundle is no longer present at the daemon. +# +# param set payload_test_no_remove true + +# +# Set the size for which the tcp convergence layer sends partial reception +# acknowledgements. Used with reactive fragmentation +# +# param set tcpcl_partial_ack_len 4096 + +# +# Set if bundles are automatically deleted after transmission +# +# param set early_deletion true + +# (others exist but are not fully represented here) + +log /dtnd info "dtnd configuration parsing complete" + +## emacs settings to use tcl-mode by default +## Local Variables: *** +## mode:tcl *** +## End: ***