mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-13 12:33:27 +02:00
The main reason here is to not initialize a CLA that has a hard limit on the maximum bundle size (TCPSPP) by default. TCPSPP is rarely used anyway, so we can disable it and save some memory in the default configuration. Signed-off-by: Felix Walter <felix.walter@d3tn.com>
254 lines
9.4 KiB
Text
254 lines
9.4 KiB
Text
# Example for build-time configuration options.
|
|
# Copy this to `config.mk` and adjust as needed. The values shown below are
|
|
# usage examples, whereas the first one always represents the default value.
|
|
# Please note that you should trigger a clean build (`make clean && make`) after
|
|
# changing any of these settings.
|
|
|
|
##################
|
|
# Build settings #
|
|
##################
|
|
|
|
# Note: The following settings are expected to be provided mainly on the `make`
|
|
# command line. If needed, however, they can be specified here.
|
|
|
|
# If set to `release`, build without debug symbols and optimize the binary.
|
|
#type ?= debug
|
|
#type ?= release
|
|
|
|
# If set to `yes`, enable further warnings. If set to `all`, enable even more
|
|
# warnings, including those that could be false positive.
|
|
#wextra ?= yes
|
|
#wextra ?= no
|
|
#wextra ?= all
|
|
|
|
# If set to `yes`, make warnings terminate the build process.
|
|
#werror ?= no
|
|
#werror ?= yes
|
|
|
|
# If set to `yes`, print all commands issued during build.
|
|
#verbose ?= no
|
|
#verbose ?= yes
|
|
|
|
# Enable sanitizers. As some of them are incompatible, there are multiple
|
|
# options: `yes` means to use the address and UB sanitizers, `memory` (only
|
|
# available with Clang) the memory sanitizer, and `thread` (only available with
|
|
# Clang) the thread sanitizer.
|
|
#sanitize ?= no
|
|
#sanitize ?= yes
|
|
#sanitize ?= memory
|
|
#sanitize ?= thread
|
|
|
|
# If set to `yes`, terminate the program on sanitizer errors.
|
|
#sanitize-strict ?= no
|
|
#sanitize-strict ?= yes
|
|
|
|
# If set to `yes`, build a binary instrumented for coverage analysis.
|
|
#coverage ?= no
|
|
#coverage ?= yes
|
|
|
|
#####################
|
|
# Toolchain options #
|
|
#####################
|
|
|
|
# Toolchain to be used. `gcc` or `clang` can be selected. Note that this can
|
|
# also be specified on the command line, e.g.: `make TOOLCHAIN=clang`
|
|
#TOOLCHAIN := gcc
|
|
|
|
# Toolchain prefix, useful for cross-compilation.
|
|
# can be left empy most of the time (default: search in $PATH)
|
|
#TOOLCHAIN_POSIX :=
|
|
#TOOLCHAIN_POSIX := arm-linux-gnueabihf-
|
|
|
|
# Prefix for the Clang compiler
|
|
#CLANG_PREFIX :=
|
|
#CLANG_PREFIX := /opt/my-clang-installation/
|
|
|
|
# --sysroot provided to the Clang compiler, useful for providing the path to
|
|
# the embedded toolchain so the proper headers are found.
|
|
# If left empty, the option is not provided to the compiler.
|
|
#CLANG_SYSROOT_POSIX :=
|
|
|
|
# Value passed to the compiler via `-march`. If not specified, will use
|
|
# `-march=native` on x86/x86_64 platforms and not pass the parameter on others.
|
|
#ARCH :=
|
|
#ARCH := armv7-m
|
|
|
|
# Use flags suitable for the macOS linker. If not specified, autodetect.
|
|
#EXPECT_MACOS_LINKER := 0
|
|
|
|
# Additional compiler flags.
|
|
#CPPFLAGS +=
|
|
|
|
# Additional linker flags.
|
|
#LDFLAGS +=
|
|
|
|
# Additional flags passed to compiler and linker.
|
|
#ARCH_FLAGS +=
|
|
|
|
########################
|
|
# Compile-time defines #
|
|
########################
|
|
|
|
# The listen() backlog for incoming connections in the AAP 2.0 agent.
|
|
#CPPFLAGS += -DAAP2_AGENT_LISTEN_BACKLOG=2
|
|
|
|
# The maximum number of items waiting in the queue toward an AAP2 agent.
|
|
#CPPFLAGS += -DAAP2_AGENT_QUEUE_LENGTH=10
|
|
|
|
# The number of milliseconds the AAP 2.0 agent will wait for a response to an
|
|
# AAPMessage that it sends to a Client (before closing the connection).
|
|
#CPPFLAGS += -DAAP2_AGENT_TIMEOUT_MS=1000
|
|
|
|
# The minimum number of characters the pre-shared administrative secret for
|
|
# FIB and BDM operations is allowed to have. In debug builds, not providing
|
|
# a secret or providing a secret that is too short will only trigger a warning,
|
|
# while in release builds the program will abort.
|
|
#CPPFLAGS += -DAAP2_MINIMUM_PRE_SHARED_SECRET_LENGTH=16
|
|
|
|
# The sink identifier of the config agent for dtn-scheme EIDs.
|
|
#CPPFLAGS += -DAGENT_ID_CONFIG_DTN=\"config\"
|
|
|
|
# The sink identifier (service no.) of the config agent for ipn-scheme EIDs.
|
|
#CPPFLAGS += -DAGENT_ID_CONFIG_IPN=\"9000\"
|
|
|
|
# The sink identifier of the echo agent for dtn-scheme EIDs.
|
|
#CPPFLAGS += -DAGENT_ID_ECHO_DTN=\"echo\"
|
|
|
|
# The sink identifier (service no.) of the echo agent for ipn-scheme EIDs.
|
|
#CPPFLAGS += -DAGENT_ID_ECHO_IPN=\"9002\"
|
|
|
|
# The sink identifier of the sqlite agent for dtn-scheme EIDs.
|
|
#CPPFLAGS += -DAGENT_ID_SQLITE_DTN=\"sqlite\"
|
|
|
|
# The sink identifier (service no.) of the sqlite agent for ipn-scheme EIDs.
|
|
#CPPFLAGS += -DAGENT_ID_SQLITE_IPN=\"9003\"
|
|
|
|
# The socket `listen()` backlog length of the Application Agent.
|
|
#CPPFLAGS += -DAPPLICATION_AGENT_BACKLOG=2
|
|
|
|
# The size, in bytes, of the receive buffer used by the Application Agent.
|
|
#CPPFLAGS += -DAPPLICATION_AGENT_RX_BUFFER_SIZE=512
|
|
|
|
# Whether to be compatible with the Bundle-in-Bundle-Encapsulation draft v1,
|
|
# which is used by ION (thus, needed for the interoperability test).
|
|
#CPPFLAGS += -DBIBE_CL_DRAFT_1_COMPATIBILITY=0
|
|
|
|
# The maximum size of bundles that the BPA is allowed to process.
|
|
#CPPFLAGS += -DBUNDLE_MAX_SIZE=1073741824
|
|
|
|
# The maximum length of the bundle processor queue until it starts blocking.
|
|
#CPPFLAGS += -DBUNDLE_QUEUE_LENGTH=4000
|
|
|
|
# The maximum number of milliseconds the bundle processor blocks when writing
|
|
# into the bundle transmission queue.
|
|
#CPPFLAGS += -DBUNDLE_SEND_TIMEOUT_MS=10
|
|
|
|
# Whether or not to close an active connection after the end of a contact.
|
|
# Note that closure by the other peer may often not be recognized and, thus,
|
|
# setting this to zero may lead to dead connections being used for some time.
|
|
#CPPFLAGS += -DCLA_MTCP_CLOSE_AFTER_CONTACT=1
|
|
|
|
# The size of the chunked-read buffer of the CLA RX task.
|
|
#CPPFLAGS += -DCLA_RX_BUFFER_SIZE=64
|
|
|
|
# The maximum time interval, in milliseconds, between receiving two bytes part
|
|
# of the same bundle. When this time has passed, all parsers are reset.
|
|
# Setting this can help when broken records may be part of the incoming data.
|
|
#CPPFLAGS += -DCLA_RX_READ_TIMEOUT=0
|
|
|
|
# The length of the command queue between the SQLiteCLA and the SQLiteAgent.
|
|
#CPPFLAGS += -DCLA_SQLITE_AGENT_QUEUE_LENGTH=10
|
|
|
|
# Set a SQLite busy timeout in milliseconds. Set to zero to turn off.
|
|
# See: https://www.sqlite.org/c3ref/busy_timeout.html
|
|
# Especially under load and with concurrent access to the storage agent it is
|
|
# necessary to use a timeout to prevent SQLITE_BUSY errors.
|
|
# See also: https://www.sqlite.org/src/doc/204dbc15a682125c/doc/wal-lock.md
|
|
#CPPFLAGS += -DCLA_SQLITE_BUSY_TIMEOUT_MS=100
|
|
|
|
# The node ID that the SQLite CLA will register (create a FIB entry) for.
|
|
#CPPFLAGS += -DCLA_SQLITE_NODE_ID=\"dtn:storage\"
|
|
|
|
# Whether to abort() uD3TN in case a TCP CLA terminates finally.
|
|
#CPPFLAGS += -DCLA_TCP_ABORT_ON_LINK_TASK_TERMINATION=0
|
|
|
|
# Whether to set SO_REUSEPORT on listening TCP sockets. Note that this may have
|
|
# security implications and it is Linux-/BSD-specific.
|
|
#CPPFLAGS += -DCLA_TCP_ALLOW_REUSE_PORT=0
|
|
|
|
# Maximum number of attempts to create a connection on contact start.
|
|
# The default value of 0 means infinite.
|
|
#CPPFLAGS += -DCLA_TCP_MAX_RETRY_ATTEMPTS=0
|
|
|
|
# The length of the listen backlog for multi-connection TCP CLAs.
|
|
#CPPFLAGS += -DCLA_TCP_MULTI_BACKLOG=64
|
|
|
|
# The number of slots in the TCP multi-connection CLA parameters hash table,
|
|
# which stores the currently-active connections to other nodes.
|
|
#CPPFLAGS += -DCLA_TCP_PARAM_HTAB_SLOT_COUNT=32
|
|
|
|
# Interval between attempts to create a connection on contact start, in ms.
|
|
#CPPFLAGS += -DCLA_TCP_RETRY_INTERVAL_MS=1000
|
|
|
|
# The length of the listen backlog for single-connection TCP CLAs.
|
|
#CPPFLAGS += -DCLA_TCP_SINGLE_BACKLOG=1
|
|
|
|
# The SPP timestamp format preamble to be sent by the TCPSPP CLA.
|
|
#CPPFLAGS += -DCLA_TCPSPP_TIMESTAMP_FORMAT_PREAMBLE=0x1c
|
|
|
|
# Whether or not to encode and read the SPP timestamp P-field.
|
|
#CPPFLAGS += -DCLA_TCPSPP_TIMESTAMP_USE_P_FIELD="(true)"
|
|
|
|
# Whether or not to encode and read the SPP CRC checksum.
|
|
#CPPFLAGS += -DCLA_TCPSPP_USE_CRC="(true)"
|
|
|
|
# The maximum size of space packets, which is used for calculating the maximum
|
|
# bundle size reported by the CLA.
|
|
#CPPFLAGS += -DCLA_TCPSPP_SPP_MAX_SIZE="(1 << 16)"
|
|
|
|
# The maximum number of bundles to be sent per second, to prevent overloading
|
|
# the underlying communication system (default: unlimited).
|
|
#CPPFLAGS += -DCLA_TX_RATE_LIMIT=0
|
|
|
|
# The length of the outgoing-bundle queue toward the TX task.
|
|
#CPPFLAGS += -DCONTACT_TX_TASK_QUEUE_LENGTH=100
|
|
|
|
# The default value for the `--aap-socket` argument.
|
|
#CPPFLAGS += -DDEFAULT_AAP_NODE=\"0.0.0.0\"
|
|
|
|
# The default value for the `--aap-socket` argument.
|
|
#CPPFLAGS += -DDEFAULT_AAP_SERVICE=\"4242\"
|
|
|
|
# The default value for the `--aap-socket` argument.
|
|
#CPPFLAGS += -DDEFAULT_AAP_SOCKET_FILENAME=\"ud3tn.socket\"
|
|
|
|
# The default value for the `--aap2-socket` argument.
|
|
#CPPFLAGS += -DDEFAULT_AAP2_SOCKET_FILENAME=\"ud3tn.aap2.socket\"
|
|
|
|
# The default CRC type used for newly-created BPv7 bundles. See `bundle.h`.
|
|
#CPPFLAGS += -DDEFAULT_BPV7_CRC_TYPE=BUNDLE_CRC_TYPE_16
|
|
|
|
# The default value for the `--lifetime` argument, in seconds.
|
|
#CPPFLAGS += -DDEFAULT_BUNDLE_LIFETIME_S=86400
|
|
|
|
# The default value for the `--bp-version` argument - either `6` or `7`.
|
|
#CPPFLAGS += -DDEFAULT_BUNDLE_VERSION=7
|
|
|
|
# The default value for the `--cla` argument.
|
|
#CPPFLAGS += -DDEFAULT_CLA_OPTIONS="\"sqlite:file::memory:?cache=shared;tcpclv3:*,4556;smtcp:*,4222,false;mtcp:*,4224\""
|
|
|
|
# The default value for the `--eid` argument.
|
|
#CPPFLAGS += -DDEFAULT_EID=\"dtn://ud3tn.dtn/\"
|
|
|
|
# The default value for the `--log-level` argument.
|
|
# For release builds, if this is not set, the default value is 2 (WARNING).
|
|
# Note that log level 4 (DEBUG) is only available in debug builds.
|
|
#CPPFLAGS += -DDEFAULT_LOG_LEVEL=3
|
|
|
|
# The number of slots in the node hashtable of µD3TN's Forwarding Information
|
|
# Base (FIB).
|
|
#CPPFLAGS += -DFIB_NODE_HTAB_SLOT_COUNT=32
|
|
|
|
# The number of slots in the CLA-address hashtable of µD3TN's Forwarding
|
|
# Information Base (FIB).
|
|
#CPPFLAGS += -DFIB_CLA_ADDR_HTAB_SLOT_COUNT=64
|