Commit graph

60 commits

Author SHA1 Message Date
Felix Walter
b01d74bb21
Merge branch 'fix/docs'
See !182
2024-07-15 23:01:49 +02:00
Maximilian Nitsch
40d6ec7b55 doc/sqlite-storage: Move description to the corresponding subsection
After merging !184, the description of how the storage can be accessed
when using the integrated routing agent must be moved to the
corresponding subsection.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-15 14:25:07 +02:00
Maximilian Nitsch
b2dd484b27 Apply 5 suggestion(s) to 4 file(s)
Co-authored-by: Felix Walter <code@felix-walter.eu>
2024-07-15 12:06:09 +00:00
Felix Walter
87be9749af Re-integrate v0.13.0 routing code as "integrated default BDM"
This makes µD3TN behave the same as v0.13.0 when executed without an
additional commandline argument. A new commandline argument `-d` /
`--external-dispatch` is added, which enables the use of external BDMs.
The default forwarding implementation is now again provided using the
v0.13 code, extracted from e1621765a4 and
adapted to the new agent-based forwarding implementation.

Central changes to the old code include:

- A new "Routing Agent" that handles incoming configuration commands,
  FIB updates, and BDM dispatch requests.
- The use of the BDM authorization flag to authorize contact
  configuration commands.
- The Contact Manager now only triggers the creation and removal of
  links / FIB entries; bundle dispatch is triggered through the FIB and
  BDM callback functions of the Routing Agent.
- The fragmentation logic is adapted to store the original bundle along
  with an offset and length value, instead of pre-creating and storing
  the fragments.
- The bundle re-scheduling logic integrated into the Routing Agent is
  simplified and does not support changing the fragmentation parameters.
  A new function is added to the Router that searches for a new route
  for such fragments that were already scheduled at some point,
  considering them as un-fragmentable bundle with overridden fragment
  offset and length.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
d480ce3e4c doc: Extend sqlite CLA docs to capture three options to use it
This also fixes the CLA address specified with `aap2-config` - it has to
contain a colon at the end.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-14 23:32:31 +02:00
Maximilian Nitsch
099f40421d doc/sqlite-storage: Use AAP2 instead of AAP commands
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-12 11:02:22 +02:00
Maximilian Nitsch
9367b4b65f doc/posix_quick_start_quide: Use AAP2 instead of AAP commands
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-12 10:33:24 +02:00
Maximilian Nitsch
76702b35fd man page: Add missing description of the CLI argument --bdm-secret-var
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-12 10:33:24 +02:00
Maximilian Nitsch
15c77e2c50 doc: Update docs to reflect the latest changes to μD3TN
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-12 10:33:23 +02:00
Maximilian Nitsch
4435d42dcf doc/aap2: Fix AAP2 documentation
- Replace a), b) enumeration with 1., 2. because this was not displayed
  correctly by Gitlab
- Fix figure link to `aap20-seq_link_dispatch.svg`

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-11 09:05:49 +02:00
Felix Walter
d92c77da46 doc: Update Manpage
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-04 16:03:26 +02:00
Maximilian Nitsch
3ba8281796 treewide: Use python-ud3tn-utils scripts instead of those from tools/
Changes all occurrences of the old script paths from tools/ to the
scripts installed by python-ud3tn-utils.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-01 10:10:56 +02:00
Felix Walter
2dcf3b35d9 aap2: Secure the control of the storage and BDMs through AAP 2.0
With the addition of the storage agent and the compat. BDM we have the
issue that two new agents accept configuration through bundles, which
cannot check that those bundles come from trustworthy sources. In the
past we restricted contact configuration messages to local clients and
performed an "EID spoofing detection" so that we could check the source
EID - if it is the same as the local node ID, we allowed the
configuration bundle to be processed. With AAPv2 and potentially more
security-relevant components (such as BDMs) appearing in the future, we
need a new mechanism.

The idea behind the implemented mechanism is to reuse the existing AAP
2.0 shared-secret authentication that is applied for BDMs themselves
also for sending configuration messages: We add the possibility to
register an AAP 2.0 RPC agent (one that sends commands *toward* uD3TN)
with the "dispatch" authorization flag. This client can then request a
special flag to be added when sending bundles. The new flag is only
added internally by uD3TN to its in-memory data structure and is
delivered to all internal agents as well as AAP 2.0 clients receiving
the marked bundles. Those agents and clients (such as the sqlite/storage
agent) can then easily check for the flag to be present and thus
determine whether the bundle comes from an authenticated and authorized
source.

Note: The `adu_flags` field for the BundleADU AAP 2.0 message is now a
`repeated` field to represent the option of multiple flags being present
(Protobuf does not support bit fields for this purpose).

Fixes: #187

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-26 10:23:17 +02:00
Felix Walter
2f17075ff3
Merge branch 'feature/sqlite-in-memory-db'
See !174
2024-06-26 10:04:30 +02:00
Maximilian Nitsch
ed6bdcbf96 SQLiteCLA: Support volatile in-memory database
Adds support for a volatile in-memory database by enabling support for
URI-based database file names. Since the in-memory DB can only be
accessed within the process, the integration tests are changed so that
external SQL queries are only performed when a persistent DB file is
used.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-06-26 09:28:45 +02:00
Felix Walter
3fc93b6507 aap2: Pass the next-hop node ID and CLA address to the BDM
When transmission had been attempted and generated a "TX
success/failure" result, the BDM will need the information which
transmission is affected by the generated dispatch. Additionally, the
term "DispatchRequest" is imprecise, as uD3TN does not require the BDM
to dispatch the bundle in any case (it can do so, but especially after
TX success/failure, oftentimes, it is intended to just proceed with
normal bundle processing).

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-25 10:25:12 +02:00
Felix Walter
447723feaa doc: Update AAP 2.0 documentation - add forwarding and storage details
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-17 13:33:31 +02:00
Maximilian Nitsch
c304173462 doc: Add SQLite storage documentation
Adds a brief description of the SQLite-based storage and a guide on how
to interact with the storage.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-06-03 13:41:58 +02:00
Maximilian Nitsch
218246e789 cla_sqlite: Add SQLite-based storage CLA skeleton
In order to prepare the implementation of a SQLite-based storage CLA, a
basic structure of this CLA with empty functions is created and
adjustments are made to the configuration/initialization functions and
the build system.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-06-03 13:41:58 +02:00
Felix Walter
1eacb0a526 doc: Document log level in Manpage
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-12-22 11:36:43 +01:00
Felix Walter
73cb8b4b8c Update date in Manpage
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-12-22 11:36:43 +01:00
Felix Walter
594eca6c8d Apply first suggestions from !126
- remove comments on "callback-style" serialization (not needed)
- define magic number in Python AAP 2.0 client via descriptive var
- make `secret` in Python AAP 2.0 client a private variable (used
  nowhere else and should not be a class property)
- add missing Python docstrings
- add some comments explaining behavior
- language enhancements and fixes in docs and comments

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:53 +01:00
Felix Walter
704045ec8b doc: aap20: Fix path to figure
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:53 +01:00
Felix Walter
3d467f09e8 doc: Adapt README and Manpage to mention AAP 2.0
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
9f777d29aa doc: Add a brief description of AAP 2.0
This still excludes FIB and BDM functionality, which will be added later
on.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
80053d85fe doc: Update Manpage rgd. dates, minor language fixes, imprecisions
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-23 10:58:19 +02:00
Oleksandr Nazymko
40c2f967ca Adjust testing documentation
This adjusts the commands for the integration tests. uD3TN needs to be started with remote configuration enabled for the tests to work.

Signed-off-by: Oleksandr Nazymko <oleksandr.nazymko@d3tn.com>
2023-05-17 11:07:13 +02:00
Felix Walter
a4463e3653
Merge branch 'feature/interop-test-docs'
See !100
2023-05-12 08:46:06 +02:00
Felix Walter
0b279f9904
Merge branch 'feature/improve-python-venv-setup'
See !95
2023-05-12 08:45:43 +02:00
Felix Walter
06f7a64edd Makefile: Remove pip installation via curl
Even if this uses a secure connection, piping stuff returned by `curl`
into an interpreter is bad practice and can lead to security problems.
We now assume that `pip` and `setuptools` are installed on the target
system, which is reasonable IMO.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 08:24:45 +02:00
Felix Walter
96cef53b76 Makefile: Make it possible to just install the Python dependencies
This moves the commands to install up-to-date versions of all
Python dependencies to the `update-virtualenv` target, so it can be
executed on its own if the user is using an own venv manager.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 08:24:30 +02:00
Felix Walter
6b0b1ddac8 doc: Add ION interop tests to testing.md
Closes: #125

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 08:22:20 +02:00
Felix Walter
b07a653389 AAP: Return bundle creation timestamp and sequence number in bundle ID
See the added description in the AAP documentation - this adds an
internal format to the 64 bit integer value returned as "bundle ID" in
the `SENDCONFIRM` AAP message to uniquely identify the created bundle in
conformance to RFC 9171.

Closes: #60

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 17:03:29 +02:00
Marius Feldmann
691b7c3172 Remove STM32/FreeRTOS support from uD3TN
Former releases of uD3TN have included support for STM32/FreeRTOS.
Having this support from the first moment on was a good thing in
order to optimize for platforms with limited resources. As this
platform is not used in current uD3TN setups and as it results in quite
some maintenance work, it is removed with this commit. The removed parts
cover the implementation itself, tests, tools, documentation, parts of
the build/make scripts as well as licensing information.

Signed-off-by: Marius Feldmann <marius.feldmann@d3tn.com>
2022-03-22 00:05:13 +01:00
Felix Walter
bf4d1b5aca doc: Adapt the manpage to the current state
This adapts the provided manual page so the current command line
arguments are properly reflected, in alphabetical order (like in the
--help output). Furthermore, some typos are fixed and the name of uD3TN
is mentioned consistently.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-03-04 15:46:51 +01:00
Felix Walter
312cbfbbb6 doc: Remove superfluous argument from quick start guide
The quick start guide recommends to add a `--dest-eid` argument to the
call to `aap_config.py` when configuring the contact from node A to B.
This is indeed unnecessary as `aap_config.py` can automatically
determine the local configuaration endpoint. The `--dest-eid` argument
is only required in more advanced cases (configuration over multiple
nodes) and implies enabling remote configuration in uD3TN.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-02-01 12:53:26 +01:00
Felix Walter
c5680b822b
Merge branch 'hotfix/contact-size-overflow'
See !46
2022-01-28 16:53:47 +01:00
Felix Walter
b8a7d0ca27 doc: Document the concept of infinite-size contacts
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-01-28 14:11:34 +01:00
Felix Walter
ea8c18bc3e doc: BIBE: Add trailing slashes to dtn EIDs without demux
As per the BPv7 specification.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-01-28 10:55:38 +01:00
Felix Walter
37e39104aa Fix EID validation for dtn and ipn according to BPv7 draft 31
-> https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bpbis-31#section-4.2.5

The previous validation methods were not sufficient to check validity of
dtn as well as ipn EIDs. This adds further functions to easily detect
the EID scheme and validate dtn plus ipn EIDs. Tests for the most common
cases where validity checks should be successful and where they might
fail are added as well.

Due to this change the default EID of uD3TN gets a slash appended, as
dtn EIDs always have to contain the name delimiter '/'.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-01-26 21:05:41 +01:00
Felix Walter
449d0bc17c Add proper support for the ipn EID scheme
Previously uD3TN implicitly assumed string EID in many places such as
the agent manager. This adds proper handling for ipn-scheme EIDs,
using numerical service numbers as agent IDs in case uD3TN is started
with an ipn-scheme EID. If the ipn scheme is used, uD3TN always has to
be configured with the service number 0. The config and management agent
IDs can be configured in config.h and are 9000 and 9001, respectively,
to keep the lower range of service numbers free. It is intentional that
agents can register with a service number of zero - uD3TN does not
provide specific functionality under this service number.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-01-26 21:05:41 +01:00
Felix Walter
0625c07cbb
Merge branch 'feature/39-implement-bibe'
See !43
2022-01-26 21:04:34 +01:00
Tobias Nöthlich
cfb3ed526c Move BIBE AR creation from bibe_proto to AppAgent
In order to have SENDBIBE and RECVBIBE messages have the same kind of
payload data (BPDUs) the creation of the administrative record needed
for BIBE bundles was moved from the bibe_proto.c file to the application
agent.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2022-01-26 21:04:02 +01:00
Tobias Nöthlich
72c2bf438c Update AAP docs with SEND-/RECVBIBE
This commit updates the AAP docs with explanations for the SEND- and
RECVBIBE message types. It also adds a short note regarding backward
compatibility with older AAP implementations that do not support BIBE.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2022-01-10 13:34:20 +01:00
Tobias Nöthlich
269cabcc56 Update BIBE docs
This commit addresses some issues concerning the documentation of
µD3TN's implementation of Bundle-in-Bundle Encapsulation.

It mostly fixes typos and changes unclear wording to be more precise,
but also expands some parts of the docs with more information.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2022-01-10 11:47:36 +01:00
Tobias Nöthlich
304d26908e Fix typos and remove unnecessary curly brackets
This commit fixes some typos in the BIBE documentation and removes
an unnecessary pair of curly brackets from the bibe_proto.c file.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-12-10 19:22:09 +01:00
Tobias Nöthlich
c4c5ba3e9d Update Bundle-in-Bundle Encapsulation_(BIBE).md 2021-12-10 09:48:25 +00:00
Tobias Nöthlich
8bc8879f9e Add first draft of BIBE documentation
In order to make BIBE useable for everyone a short documentation
containing information on what BIBE is, how it works in µD3TN and
how to use it has been added.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-12-10 10:34:23 +01:00
Felix Walter
3ab90dcffb Make the remote configuration capability a command line flag
Previously, we had a build-time flag for enabling configuration via
bundles received from other nodes. Thus, changing the flag required a
re-build. As we are depending on it also for our integration tests and
it is often handy in further setups, this change makes it a command
line argument "--allow-remote-config".

As the STM32 platform does not support command line arguments, remote
configuration is enabled by default there via config.h.

See also: !13, #32

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2021-11-11 23:00:09 +01:00
Felix Walter
942db2d257
Merge branch 'feature/deny-remote-time-management'
See !29
2021-07-30 15:48:57 +02:00