#####################################
# IBR-DTN daemon                    #
#####################################

#
# the local eid of the dtn node
# default is the hostname
#
local_uri = dtn://AIC-DTN

#
# specifies an additional logfile
#
logfile = /var/log/ibrdtn/ibrdtn.log

#
# Limit the block size of all bundles.
#
# The value accepts different multipliers.
# G = 1,000,000,000 bytes
# M = 1,000,000 bytes
# K = 1,000 bytes
#
#limit_blocksize = 1.3G

#
# Limit the block size of foreign bundles.
# Foreign bundles are not address from or to the
# local node.
#
# The value accepts different multipliers.
# G = 1,000,000,000 bytes
# M = 1,000,000 bytes
# K = 1,000 bytes
#
#limit_foreign_blocksize = 500M

#
# Limit the offset of predated timestamps to a max value.
# Bundles with an invalid timestamp will be rejected.
#
#limit_predated_timestamp = 604800

#
# Limit the max. lifetime of a bundle.
# Bundles with a lifetime greater than this value will be rejected.
#
#limit_lifetime = 604800

# limit the numbers of bundles in transit (default: 5)
#limit_bundles_in_transit = 5

# bind API to a named socket instead of an interface
#api_socket = /tmp/ibrdtn.sock

# define the interface for the API, choose any to bind on all interfaces
#api_interface = any

# define the port for the API to bind on
#api_port = 4550

#
# enable fragmentation support
# (default is enabled)
#
#fragmentation = no

#
# if fragmentation is enabled, it is possible to split up
# bundles larger than a specific limit into fragments
#
# limit_payload = 500K

#####################################
# storage configuration             #
#####################################

#
# define a folder for temporary storage of bundles
# if this is not defined bundles will processed in memory
#
#blob_path = /tmp

#
# define a folder for persistent storage of bundles
# if this is not defined bundles will stored in memory only
#
storage_path = /var/spool/ibrdtn/bundles

#
# defines the storage module to use
# default is "simple" using memory or disk (depending on storage_path)
# storage strategy. if compiled with sqlite support, you could change
# this to sqlite to use a sql database for bundles.
#
storage = default

#
# Defines, whether bundleSets are stored persistently in the storage
# path or the SQLite database. This feature is experimental, therefore
# the default value is no.
#
use_persistent_bundlesets = yes

#
# Limit the size of the storage.
# The value accepts different multipliers.
# G = 1,000,000,000 bytes
# M = 1,000,000 bytes
# K = 1,000 bytes
#
#limit_storage = 20M


#####################################
# convergence layer configuration   #
#####################################

#
# discovery over UDP/IP
#
# You can specify an multicast address to listen to for discovery announcements.
# If no address is specified the multicast equivalent of broadcast is used.
#
discovery_address = ff02::142 224.0.0.142

# Specify how often discovery beacons are sent. The default is every 5 seconds.
#discovery_interval = 5

# use short IPND beacons
#discovery_short = 0

# specify the discovery mechanism to use
# 0 = DTN2 compatible discovery
# 1 = IPND version 0
# 2 = IPND version 1 (default)
#discovery_version = 2

# To disable discovery announcements, set this option to zero.
# (default is 1)
#
#discovery_announce = 0

# Enable crosslayer discovery
# If disabled the daemon do not distribute its own addresses via
# IPND. Instead we except that the receiver extract this information
# using the sender IP address.
#
#discovery_crosslayer = yes

#
# a list (seperated by spaces) of names for convergence layer instances.
#
net_interfaces = lan0 wlan0 eth0

#
# Try to connect to other nodes each x seconds.
# This option keeps connections up all the time.
#
#net_autoconnect = 60

#
# Defines the interface with global internet access. With this definition
# the daemon can detect internet access by its own and might assume specific
# nodes as available or unavailable depending on the internet state.
#
net_internet = eth0

#
# configuration for a convergence layer named lan0
#
net_lan0_type = tcp					# we want to use TCP as protocol
net_lan0_interface = wlan0			# listen on interface wlan0 
net_lan0_port = 4556				# with port 4556 (default)

#
# configuration for a convergence layer named lan1
#
#net_lan1_type = udp				# we want to use UDP as protocol
#net_lan1_interface = eth0			# listen on interface eth0 
#net_lan1_port = 4556				# with port 4556 (default)

#
# TCP tuning options
#
# NODELAY option in TCP disables the nagle algorithm, if set to yes (default). 
#tcp_nodelay = yes
#
# The bundles are split into chunks while they are transmitted over TCP. This
# parameter defines the size of these chunks (4096 is the default).
#tcp_chunksize = 4096
#
# The timeout for idle TCP connection in seconds. 0 = disabled
#tcp_idle_timeout = 0

#
# Keep-alive time-out for connections
# (e.g. TCP-CL)
#
#keepalive_timeout = 60


#####################################
# P2P configuration                 #
#####################################

#
# Define the path of the wpa_supplicant control interface
#
#p2p_ctrlpath = /var/run/wpa_supplicant/wlan1


#####################################
# routing configuration             #
#####################################

#
# routing strategy
#
# values: default | epidemic | flooding | prophet | none
#
# In the "default" the daemon only delivers bundles to neighbors and static
# available nodes. The alternative module "epidemic" spread all bundles to
# all available neighbors. Flooding works like epidemic, but do not send the
# own summary vector to neighbors. Prophet forwards based on the probability
# to encounter other nodes (see RFC 6693).
#
routing = prophet

#
# forward bundles to other nodes (yes/no)
#
routing_forwarding = yes

#
# forward singleton bundles directly if the destination is a neighbor
#
routing_prefer_direct = yes

#
# Scheduling adds a sorted bundle index to the daemon instance which is used
# to order the bundles using the priority defined in the SchedulingBlock and
# several other indicators.
#
#scheduling = no

# Interval between two requests on all interfaces in order to determine added or
# removed addresses. This option is only applicable, if netlink is not supported
# (in milliseconds, default is 5000)
#
#link_request_interval = 5000

#
# static routing rules
# - a rule is a regex pattern
# - format is <target-scheme> <routing-node>
#
# route all bundles for "dtn://*.moon.dtn/*" to dtn://router.dtn
#route1 = ^dtn://[[:alpha:]].moon.dtn/[[:alpha:]] dtn://router.dtn	

#
# static connections
# for configure static connections it is important to begin with "static1_"
# and count up ("static2_", "static3_", ...)
#

### node-five.dtn ###
#static1_address = 10.0.0.5			# the node has the address 10.0.0.5
#static1_port = 4556				# accept bundles on port 4556
#static1_uri = dtn://node-five.dtn	# eid of the node is "dtn://node-five.dtn"
#static1_proto = tcp				# reachable over TCP
#static1_immediately = yes			# connect immediately to this node
#static1_global = yes				# this node is only reachable with internet access

### node-ten.dtn ###
#static2_address = 192.168.0.10		# the node has the address 10.0.0.10
#static2_port = 4556				# accept bundles on port 4556
#static2_uri = dtn://node-ten.dtn	# eid of the node is "dtn://node-ten.dtn"
#static2_proto = udp				# reachable over UDP
#static2_immediately = no			# connect on-demand to this node

### node-fifteen.dtn ###
#static3_email = fifteen@example.com    # the email address of the node
#static3_uri = dtn://node-fifteen.dtn   # eid of the node is "dtn://node-fifteen.dtn"
#static3_proto = email                  # reachable over MCL

### prophet configuration ###
#prophet_p_encounter_max = 0.7        #affects how strong the predictability is
                                      #increased on an encounter
#prophet_p_encounter_first = 0.5      #the predictability of a neighbor on the
                                      #first encounter
#prophet_p_first_threshold = 0.1      #lowest predictability when neighbors
                                      #predictabilities are forgotten
#prophet_beta = 0.9                   #Weight of the transitive property
#prophet_gamma = 0.999                #Determines how quickly predictabilities
                                      #age
#prophet_delta = 0.01                 #(1-delta) is the maximum predictability
#prophet_time_unit = 1                #time unit in seconds
#prophet_i_typ = 300                  #typical time interval between two node
                                      #encounters
#prophet_next_exchange_timeout = 120  #timeout how often handshakes should be
                                      #executed
#prophet_forwarding_strategy = GRTR   #The forwarding strategy used GRTR | GTMX
#prophet_gtmx_nf_max = 30             #Maximum times to forward in the GTMX
                                      #strategy

#####################################
# bundle security protocol          #
#####################################

#
# the level specifies the security constrains
#
# 0 = no constrains (default)
# 1 = accept only authenticated bundles
# 2 = accept only encrypted bundles
# 4 = accept only signed bundles
#
# Combination is allowed by adding values
# e.g. 5 = accept only bundles which are signed AND authenticated
#
#security_level = 0

#
# bab default key
#
#security_bab_default_key = /etc/ibrdtn/bpsec/default-bab-key.mac

#
# key path
#
security_path = /etc/ibrdtn/bpsec

#
# If set to "yes", the automatic generation of the
# DH params for the key-exchange component is enabled.
#
#generate_dh_params = yes

#
# TLS for TCP convergence layer
# Authentication and encryption (optional) support for every
# tcp connection between the daemons.
#
# certificate signed by the authority (public key)
#security_certificate = /etc/ibrdtn/tls/local.crt

# local TLS key
#security_key = /etc/ibrdtn/tls/local.key

# path to trusted certificates
security_trusted_ca_path = /etc/ibrdtn/certs

# set to 'yes' if tcp connections without TLS are not allowed
#security_tls_required = yes

# set to 'yes' to disable encryption in the TLS streams
#security_tls_disable_encryption = yes


#####################################
# time synchronization              #
#####################################

#
# set to yes if this node is connected to a high precision time reference
# like GPS, DCF77, NTP, etc.
#
time_reference = yes

#
# synchronize with neighbors
#
#time_synchronize = yes

#
# announce time sync capabilities in discovery messages
#
time_discovery_announcements = yes

#
# Parameters for the QoT aging process.
#
#time_sigma = 1.001
#time_psi = 0.9
#time_sync_level = 0.15

#
# Adjust the clock of the host on each sync 
#
#time_set_clock = no


#####################################
# DHTNameService settings           #
#####################################

#
# Enable the DHT, if it was compiled
# Default is no
#
dht_enabled = yes

#
# Set the udp port, the DHT should working on
# Default is 9999
# If Port is 0, a random Port will be chosen for each run
#
#dht_port = 9999

#
# Here you can choose a static DHT ID, which is very common
# Default is none -> a random ID per run will be generated
#dht_id = <randomstring>

#
# Enables DHT on IPv4 socket
# Default is yes
#
#dht_enable_ipv4 = yes

#
# Enables DHT on IPv6 socket
# Default is yes
#
#dht_enable_ipv6 = yes

#
# Bind the DHT to a specific IPv4 Address
# Default is the any device
#
#dht_bind_ipv4 = 127.0.0.1

#
# Bind the DHT to a specific IPv6 Address
# Default is the any device
#
#dht_bind_ipv6 = ::1

#
# Specify the file, where the DHT can save all good nodes
# for faster restart on next session
# Default is no file, but it should be set
# 
#dht_nodes_file = <filepath>

#
# Enable DNS Bootstrapping for the DHT
#
#dht_bootstrapping = yes

#
# DNS Bootstrapping by giving domain names of wellknown nodes
#dht_bootstrapping_domains = [domain] [...]
#
# Example:
#dht_bootstrapping_domains = dtndht.ibr.cs.tu-bs.de
#
# Default is an empty string
#dht_bootstrapping_domains =

#
# IP Bootstrapping from wellknown IP (and port) addresses of nodes
#dht_bootstrapping_ips = [ip [port]]; [ip [port]]; ...
#
# Example:
#dht_bootstrapping_ips = 192.168.0.1; 192.168.0.2 8888;
#
# Default is an empty string
#dht_bootstrapping_ips =

#
# Blacklist support of the DHT can be switch on and off
#
# Default is yes
#dht_blacklist = yes

#
# Announcing myself on the DHT
#
# Default is yes
#dht_self_announce = yes

#
# Minimum necessary rating of a DHT information
#
# The lowest rating is 0: the node information has been sent by only one DHT node
# The maximum rating is 10 (for single lookups) and means: 10 or more different DHT nodes sent the information
#
# If the rating of an incoming information is lower, it will be ignored
#
# Default is 1
#dht_min_rating = 1

#
# Allow announcing neighbours
#
# Default is yes
#dht_allow_neighbour_announcement = yes

#
# Allow all neighbours announce them to be neighbour to me
# For privacy reasons, you could turn this off
#
# Default is yes
#dht_allow_neighbours_to_announce_me = yes

#
# Ignoring the neighbour information sent by a node, found on the DHT
#
# Default is no
#dht_ignore_neighbour_informations = no


#####################################
# Email Convergence Layer settings  #
#####################################

#
# The email address of the local node 
#
#email_address = root@localhost

#
# The address of the SMTP server. You may provide the hostname or an
# IPv4/IPv6 address
#
#email_smtp_server = localhost

#
# The port of the SMTP server
#
#email_smtp_port = 25

#
# If authentication is needed to submit mails via the given SMTP server you
# need to set this option to 'yes'
#
#email_smtp_need_authentication = no

#
# The username for the SMTP server
#
#email_smtp_username = root

#
# The password for the SMTP server
#
#email_smtp_password =

#
# The submit interval in seconds. If you set this to 0 or below, bundles will
# be submitted immediately
#
#email_smtp_submit_interval = 60

#
# If specified the email convergence layer will wait the specified seconds
# for an answer from the SMTP server. If the server does not answer the
# connection will be closed
#
#email_smtp_connection_timeout =

#
# After transmission of a bundle the connection will be kept open to allow
# a fast transmission of following bundles. The time is specified in seconds 
#
#email_smtp_keep_alive = 30

#
# Specifies the used socket type for the SMTP connection. You can set this
# to 'tls' to use a TLS encrypted connection or to 'ssl' to use an SSL one.
# If nothing is specified a plain connection will be used
#
#email_smtp_socket_type =

#
# The address of the IMAP server. You may provide the hostname or an
# IPv4/IPv6 address
#
#email_imap_server = localhost

#
# The port of the IMAP server
#
#email_imap_port = 143

#
# The username for the IMAP server. If nothing is specified the SMTP username
# will be reused
#
#email_imap_username =

#
# The password for the IMAP server. If nothing is specified the SMTP password
# will be reused
#
#email_imap_password =

#
# Sets the IMAP folder in which the email convergence layer will look for
# new mails. The folders will be separated by a forward slash '/'
# (e.g. 'email_imap_folder = INBOX/folder 1/New Bundles')
#
#email_imap_folder =

#
# The lookup interval for new emails in seconds. If set to 0 or below,
# the lookup will be disabled
#
#email_imap_lookup_interval =

#
# If specified the email convergence layer will wait the specified seconds
# for an answer from the IMAP server. If the server does not answer the
# connection will be closed
#
#email_imap_connection_timeout =

#
# Specifies the used socket type for the IMAP connection. You can set this
# to 'tls' to use a TLS encrypted connection or to 'ssl' to use a SSL one.
# If nothing is specified a plain connection will be used
#
#email_imap_socket_type =

#
# If set to 'yes' parsed emails will be deleted instead of being marked as read
#
#email_imap_purge_mail = no

#
# If you use a secured connection (tls/ssl) you need to provide the root CAs
# here. Use a comma separated list to provide more than one certificate
# (e.g. 'email_certs_ca = /certs/first.ca.pem,/certs/second.cs.pem'). The
# certificate itself may be DER or PEM encoded
#
#email_certs_ca =

#
# If you use a secured connection (tls/ssl) you may provide a list of explicit
# trusted certificates. Use a comma separated list to provide more than one
# certificate (e.g. 'email_certs_ca = /certs/first.pem,/certs/second.pem'). The
# certificate itself may be DER or PEM encoded
#
#email_certs_user =

#
# If a node with email convergence layer is discovered by DHT or IPND you
# can specify here for how long this node is still available through the
# email convergence layer after disappearing. The time is given in
# seconds
#
#email_node_available_time = 1800

#
# If the node's mail server is unable to deliver a mail, an error message in
# form of an email will be created. You can specify here after how many checks
# for new mails a bundle will be marked as delivered. If a returning mail
# matches a not delivered bundle the delivery will be re-attempted
#
#email_returning_mails_checks = 3
