Commit graph

17 commits

Author SHA1 Message Date
Felix Walter
973f35d132 Implement status report support in AAP 2.0
This enables AAP 2.0 clients to receive status reports with a new ADU
flag (as we already deliver BIBE bundles). Moreover, it allows clients
to set a report-to EID and sets all of the status report flags on newly
created bundles in case a report-to EID is provided.

Closes: #241

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2025-06-05 17:13:17 +02:00
Maximilian Nitsch
94218d6116 python-ud3tn-utils: Re-generate protobuf files
Regenerates the Python protobuf bindings with the updated `protoc`.

```sh
make aap2-proto-headers
make storage-agent-proto-headers
```

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2025-06-05 10:58:12 +02:00
Maximilian Nitsch
f152663e32 python-ud3tn-utils: Rebuild protobuf language bindings
Since the updated nixpkgs contains a new python.protobuf package version
(4.25.3 -> 5.28.3), the language bindings are regenerated.

See: https://gitlab.com/d3tn/ud3tn/-/issues/200

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-12-05 18:07:10 +01:00
Felix Walter
78bef1a089 Refactor FIB: Separate node entry from CLA link
The FIB fulfils two purposes: 1) map node IDs to next-hop CLA addresses
and 2) store the current status of a link associated with a given CLA
address.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-08-23 11:59:02 +02:00
Felix Walter
ee59a74443 aap2, cla, cmdline: Pass maximum bundle size to BDM
We should be able to honor the fragmentation threshold again. This
passes the maximum bundle size variable to the AAPv2 agent. The value is
determined as the minimum of all maximum bundle sizes reported by the
CLAs and the one specified on the command line, with the special case
of the value 0, which means a maximum bundle size of 2^64 ("unlimited").

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-04 16:00:30 +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
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
7b959e4cb8 aap2, FIB: Implement direct dispatch
This adds a "flags" field to the FIB link, allowing for configuring a
link for "direct dispatch", i.e., to make it usable without first
contacting a BDM. It is important to make this optional as otherwise
contact-based routing and QoS could not be implemented properly via a
BDM.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-21 12:39:59 +02:00
Felix Walter
6d2f204af5 Replace integrated next-hop forwarding with AAP 2.0
This adds functionality to dispatch bundles and control the FIB to AAP
2.0 and the bundle processor, replacing the old "router" completely.
AAP 2.0 is extended slightly to enable fragmentation.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-17 13:33:32 +02:00
Felix Walter
58e6e39944 aap2: Integrate Protobuf definitions for link and dispatch control
This adds the data structures necessary for controlling the set of CLA
links and dispatching bundles from AAP 2.0 Clients.
See also the new documentation in doc/aap20.md.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-17 13:33:31 +02:00
Maximilian Nitsch
8f55444280 nix+ud3tn-utils: Use protobuf==4.21.12
Since protobuf==4.24.4 is not (currently) part of nixpkgs, but
protobuf==4.21.12, the pinned version is changed to reduce the effort
for packaging version 4.24.4 itself.

The protobuf Python language bindings have been regenerated to
incorporate the changes from the modified version.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2023-11-16 17:02:33 +01:00
Felix Walter
7362c0dafb aap2: Temporarily remove FIB and dispatch functionality
There might be incompatible changes in those messages before their
public release. As we only support basic send/receive functionality over
AAPv2, we do not need to include the definitions of other messages.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:53 +01:00
Felix Walter
536aee55fd aap2: Check secret for new agent registrations
If there is already an agent registered for the other direction of
communication, registration will fail as long as the provided secrets do
not match.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
4853036d5c aap2: Add lifetime to Bundle message
This is an important field for routing/forwarding decisions.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
a007f89a68 aap2: Remove FIBInfo message
This is considered a future extension as it is a performance
optimization (overhead reduction).

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
785507a583 aap2: Allow providing more information to the dispatcher
This adds a DispatchRequest message containing a DispatchReason in
extension to the bundle headers. By that we can pass more information to
the BDM about why the dispatch request was triggered and have it
extensible in the future.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
a81f481e22 python-ud3tn-utils, tools: Add basic AAP2 tooling (send, receive, ping)
This adds adapted versions of `aap_send.py`, `aap_receive.py`, and
`aap_ping.py` for AAP2 and implements the required client classes in
the `ud3tn_utils` module.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00