summaryrefslogtreecommitdiff
path: root/irmd.conf.in
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2023-03-04 03:48:48 +0100
committerSander Vrijders <sander@ouroboros.rocks>2023-03-08 15:59:37 +0100
commit89b58eaa2706c54aeb0a48252d1cfbd2b5ae01b7 (patch)
tree891c4a2de37e06fdb8879741911a6b7ff2f1b4b8 /irmd.conf.in
parentf16b4a1954ab4fbca0ec403f6a04c80375328921 (diff)
downloadouroboros-89b58eaa2706c54aeb0a48252d1cfbd2b5ae01b7.tar.gz
ouroboros-89b58eaa2706c54aeb0a48252d1cfbd2b5ae01b7.zip
irmd: Add configuration file support
This adds initial support for configuration files using the C99 TOML parser (to be installed separately from https://github.com/cktan/tomlc99). The default location for the IRMd configuration file is /etc/ouroboros/irmd.conf. This is configurable at build time. An example file will be installed in the configuration directory with the name irmd.conf.example. Config file support can be disabled using the DISABLE_CONFIGFILE build option. There were some refactors and changes to the configuration messages and protobuf files. This works towards consolidation of protobuf C as an option for more generic handling of serialization/deserialization of various messages. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'irmd.conf.in')
-rw-r--r--irmd.conf.in111
1 files changed, 111 insertions, 0 deletions
diff --git a/irmd.conf.in b/irmd.conf.in
new file mode 100644
index 00000000..fe280a1e
--- /dev/null
+++ b/irmd.conf.in
@@ -0,0 +1,111 @@
+### Example Ouroboros configuration file
+#
+# This file contains a summary of current machine configuration
+# options for the O7s prototype. The IRMd will attempt to load its
+# configuration file during startup from the file
+# @OUROBOROS_CONFIG_DIR@@OUROBOROS_CONFIG_FILE@.
+#
+# At the top level, it accepts configuration of
+# services via the "name" directive, and configuration of the network
+# specifying different IPCPs in the system. So, the list of accepted
+# top level stanza is:
+#
+# [name.<name of service>] add a new name to the system.
+# [local.<name for IPCP>] add a new local IPCP to the system.
+# [eth-llc.<name for IPCP>] add a new IPCP over Ethernet (LLC) to the system.
+# [eth-dix.<name for IPCP>] add a new IPCP over Ethernet (DIX) to the system.
+# [eth-udp.<name for IPCP>] add a new IPCP over UDP/IPv4 to the system.
+# [broadcast.<name of IPCP>] add a new broadcast IPCP to the system.
+# [unicast.<name of IPCP>] add a new unicast IPCP to the system.
+#
+# Options for names:
+#
+# A name can be created without any parameters. The following options will
+# allow more useful configurations:
+# prog: bind programs to this name. Whenever an instance of one of these
+# programs is started, it will accept incoming flows for this name.
+# args: When provided the program at the same index in the prog list will be
+# automatically started if there is an incoming flow for that name.
+# lb: Load-balancing option, if there are multiple processes accepting flows
+# for that name, the flow will get assigned to the process according to
+# the specified load-balancing algorithm.
+#
+# Options for IPCPs:
+#
+# bootstrap=<layer_name>: Immediately bootstrap this IPCP in this layer.
+# enrol=<dst>: Enrol with this neigbor (broadcast and unicast only).
+# conn=[<dst>]: Create mgmt and data flows with these neighbors.
+# reg=[<names>]: Register these names with the IPCP.
+# Bootstrap options can be set as in the examples below.
+# For more details on the configuration options for each of the IPCP types,
+# please refer to the Ouroboros man page.
+
+[name.oping]
+prog=["@INSTALL_DIR@/oping"] # Defaults to [].
+args=["-l"] # Defaults to disabled. Autostart server with these args.
+lb="round-robin" # Defaults to spill (load-balancing options: spill, round-robin).
+
+[name.oecho]
+lb="round-robin" # Defaults to spill (load-balancing options: spill, round-robin).
+args="-l" # Defaults to disabled. Autostart server with these args.
+
+[name.ocbr]
+prog=["@INSTALL_DIR@/ocbr"] # Defaults to [].
+
+[name.ovpn]
+prog=["@INSTALL_DIR@/ovpn"] # Defaults to [].
+
+[local.local1]
+bootstrap="local1" # Defaults to not set.
+ # BOOTSTRAP CONFIGURATION
+# hash="SHA3_224" # Defaults to SHA3_256.
+ # NAMES KNOWN
+reg=["bc1", "LAN"] # Defaults to [].
+
+[eth-llc.ethl]
+bootstrap="ethl1" # Defaults to not set.
+ # BOOTSTRAP CONFIGURATION
+dev="lo"
+# hash="SHA3_224" # Defaults to SHA3_256.
+
+[eth-dix.eth1]
+bootstrap="eth1" # Defaults to not set.
+ # BOOTSTRAP CONFIGURATION
+dev="lo"
+# ethertype=0xA007 # Defaults to 0xA000.
+# hash="SHA3_224" # Defaults to SHA3_256.
+reg=["lan1"]
+
+[udp.udp1]
+bootstrap="udp" # Defaults to not set.
+ # BOOTSTRAP CONFIGURATION
+ip="127.0.0.1"
+# port=9000 # Defaults to 3435.
+# dns="127.0.0.1" # Requires a DDNS server. Disables DDNS support if not set.
+
+[broadcast.bc1]
+bootstrap="broadcast" # Defaults to not set.
+autobind=true # Defaults to false.
+
+[broadcast.bc2]
+enrol="bc1"
+# autobind=true # Defaults to false.
+
+[unicast.lan1]
+bootstrap="LAN" # Defaults to not set.
+autobind=true # Defaults to false.
+ # BOOTSTRAP CONFIGURATION
+# hash="SHA3_224" # Defaults to SHA3_256.
+# addr_size=4 # Defaults to 4 (32-bit addresses).
+# eid_size=8 # Defaults to 8 (64-bit endpoint IDs, only accepted option).
+# max_ttl=60 # Defaults to 60 (max 255).
+# addr-auth="flat" # Defaults to flat (currently only option).
+# routing="lfa" # Defaults to link-state (options: link-state, lfa, ecmp).
+# congestion="none" # Defaults to mb-ecn (options: none, mb-ecn).
+ # NAMES KNOWN
+reg=["oping"] # Defaults to [].
+
+[unicast.lan2]
+enrol="LAN" # Defaults to not set.
+conn=["lan1"] # Defaults to [].
+autobind=true # Defaults to false.