diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-08-16 18:55:15 +0000 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-08-31 08:31:45 +0200 |
| commit | 5c239c128c04883dbed6d66f574edf8b48d11e11 (patch) | |
| tree | 6dfcc043c81bd10e1366172b9db5cf5ce93bb8d8 /irmd.conf.in | |
| parent | a830ed966eb3b7d6dbcc43e42a7b6b7c5d796c6a (diff) | |
| download | ouroboros-5c239c128c04883dbed6d66f574edf8b48d11e11.tar.gz ouroboros-5c239c128c04883dbed6d66f574edf8b48d11e11.zip | |
lib: Replace shim IPCPs with points of attachment
Removes the UDP and Ethernet shim IPCPs. The unicast and broadcast
IPCPs can now directly attach to a "legacy" socket. We adopt Saltzer's
Point-of-Attachment terminology, also advocated in Day's "Patterns in
Network Architecture". The "poa" component manages these
PoA's with one management thread, one link monitoring thread and one
thread per attached point.
For Ethernet PoA's the irm connect and enroll can resolve the
destination IPCP or Layer name with a broadcast name query over the
attached PoAs (first reply wins). UDP PoA's require a destination IP
address or FQDN.
attach to a local endpoint (required both server and client side):
irm ipcp poa attach name a udp 10.0.0.1
irm ipcp poa attach name a udp 10.0.0.1:3435
irm ipcp poa attach name a udp [::1]:3435
irm ipcp poa attach name a eth dev eth0
irm ipcp poa attach name a eth dev eth0 ethertype 0xA000
release a PoA (refused while it carries a flow):
irm ipcp poa detach name a udp 10.0.0.1:3435
irm ipcp poa detach name a eth eth0
list an IPCP's PoAs:
irm ipcp poa list name a
connect to a peer, by name or at an address:
irm ipcp connect name b dst a
irm ipcp connect name b dst a eth
irm ipcp connect name b dst a eth dev eth0
irm ipcp connect name b dst a udp 10.0.0.1:3435
irm ipcp connect name b dst a udp peer.example.com:3435
disconnect by peer name, no address:
irm ipcp disconnect name b dst a
irm ipcp disconnect name b dst a component mgmt
enroll has the same shape as connect:
irm ipcp enroll name b layer lr autobind
irm ipcp enroll name b layer lr autobind eth dev eth0
irm ipcp enroll name b layer lr autobind udp 10.0.0.1:3435
the IRMd config file attaches PoAs and names peers the same way:
udp = [ "10.0.0.1", "10.0.0.1:3436" ]
eth = [ "eth0", {dev="eth1", ethertype=0xA007} ]
enrol={dst="LAN", eth={dev="eth0"}}
conn=[{dst="lan3", eth={}}, {dst="lan4", udp="10.0.0.1:3435"}]
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.in | 95 |
1 files changed, 59 insertions, 36 deletions
diff --git a/irmd.conf.in b/irmd.conf.in index 02cb1da3..c3cfe5e5 100644 --- a/irmd.conf.in +++ b/irmd.conf.in @@ -7,10 +7,6 @@ # # [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. -# [udp4.<name for IPCP>] add a new IPCP over UDP/IPv4 to the system. -# [udp6.<name for IPCP>] add a new IPCP over UDP/IPv6 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. # @@ -32,6 +28,49 @@ # 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. +# +# enrol, and each element of conn, also accept a table instead of a bare +# name, to reach that peer over one specific point of attachment: +# +# {dst=<name>, eth={}} Resolve dst by query over every +# attached eth PoA. +# {dst=<name>, eth={dev=<device>}} Same, pinned to one device. eth +# accepts an optional +# ethertype=<ethertype>, default +# 0xA000. +# {dst=<name>, udp=<addr>[:<port>]} Literal peer; IPv4, bracketed IPv6 +# ("[::1]:3435"), bare IPv6, or a +# host name the IRMd resolves. Port +# defaults to 3435. +# +# A table names at most one of eth or udp; dst is required. +# +# A unicast or broadcast IPCP binds its own points of attachment. udp +# and eth are each an array of strings or tables, one udp for both +# address families: +# +# udp = [<addr>, ...] <addr> is a literal IPv4 or +# IPv6 address, with an optional +# port ("<addr>:<port>", +# bracketed for IPv6: +# "[::1]:3435"). Port defaults +# to 3435. A table, +# {addr=<addr>[:<port>]}, is +# also accepted. +# eth = [<device>, ...] <device> is a bare device +# name, or a table +# {dev=<device>[, ethertype= +# <ethertype>]}. Ethertype +# defaults to 0xA000. +# +# Because a table element is accepted, the array-of-tables spelling +# still works too, e.g. [[unicast.lan1.udp]] with addr="<addr>" as a +# separate stanza; repeat the stanza, or the array, to attach more +# than one PoA. +# +# Unlike conn/enrol above, a PoA binds locally: only literal addresses +# are accepted here, not host names. +# # 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. @@ -57,11 +96,11 @@ prog=["@INSTALL_DIR@/oping"] # Defaults to []. args=["--listen"] # Defaults to disabled. Autostart server with these args. lb="round-robin" # Defaults to spill (load-balancing options: spill, round-robin). # server_sec_file=/path/to/sec.conf Default: @OUROBOROS_SRV_CRT_DIR@/<name>/sec.conf -# server_crt_file=/path/to/crt.pem Default: @OUROBOROS_SRV_CRT_DIR@/<name>/crt.pem -# server_key_file=/path/to/key.pem Default: @OUROBOROS_SRV_CRT_DIR@/<name>/key.pem +# server_crt_file=/path/to/crt.pem Default: @OUROBOROS_SRV_CRT_DIR@/<name>/crt.pem +# server_key_file=/path/to/key.pem Default: @OUROBOROS_SRV_CRT_DIR@/<name>/key.pem # client_sec_file=/path/to/sec.conf Default: @OUROBOROS_CLI_CRT_DIR@/<name>/sec.conf -# client_crt_file=/path/to/crt.pem Default: @OUROBOROS_CLI_CRT_DIR@/<name>/crt.pem -# client_key_file=/path/to/key.pem Default: @OUROBOROS_CLI_CRT_DIR@/<name>/key.pem +# client_crt_file=/path/to/crt.pem Default: @OUROBOROS_CLI_CRT_DIR@/<name>/crt.pem +# client_key_file=/path/to/key.pem Default: @OUROBOROS_CLI_CRT_DIR@/<name>/key.pem [local.local1] bootstrap="local1" # Defaults to not set. @@ -70,34 +109,6 @@ bootstrap="local1" # Defaults to not set. # 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"] - -[udp4.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. - -[udp6.udp2] -bootstrap="udp2" # Defaults to not set. - # BOOTSTRAP CONFIGURATION -ip="::1" -# port=9000 # Defaults to 3435. -# dns="::1" # Requires a DDNS server. Disables DDNS support if not set. - [broadcast.bc1] bootstrap="broadcast" # Defaults to not set. # autobind=true # Defaults to false. @@ -130,7 +141,19 @@ autobind=true # Defaults to false. # NAMES KNOWN reg=["oping"] # Defaults to []. + # POINTS OF ATTACHMENT +udp = ["127.0.0.1", "127.0.0.1:3436"] # Two PoAs; port defaults to 3435. +# udp = ["127.0.0.1:9000"] # Or pick a port explicitly. + +[[unicast.lan1.eth]] +dev="lo" +# ethertype=0xA007 # Defaults to 0xA000. + [unicast.lan2] enrol="LAN" # Defaults to not set. +# enrol={dst="LAN", eth={dev="eth0"}} # Or enrol over a specific PoA. conn=["lan1"] # Defaults to []. +# conn=["lan1", +# {dst="lan3", eth={}}, +# {dst="lan4", udp="10.0.0.1:3435"}] # Or connect over specific PoAs. autobind=true # Defaults to false. |
