Commit graph

17 commits

Author SHA1 Message Date
Felix Walter
229f884a57 python-ud3tn-utils: Introduce JSON configuration format
This introduces a JSON contact configuration format for the
deterministic first-contact forwarding (DFCF) implementation as a modern
alternative to our homebrewn configuration messages. For now, it is only
supported in the external DFCF BDM, but integration into the "router
agent" is planned.

Example JSON configuration string (from our tests):

```
{

    "command": "ADD",
    "node_id": "dtn://ud3tn2.dtn/",
    "cla_addr": "mtcp:127.0.0.1:4223",
    "reachable_eids": [
        "ipn:1.0"
    ],
    "contact_list": [
        {
            "start": 1401519306972,
            "end": 1401519316972,
            "data_rate": 2400,
            "reachable_eids": [
                "dtn://66553/",
                "dtn://89326/"
            ]
        },
        {
            "start": 1401519506972,
            "end": 1401519516972,
            "data_rate": 1200,
            "reachable_eids": [
                "dtn://12349/",
                "dtn://89326/"
            ]
        }
    ]
}
```

Closes: #15

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2025-06-05 17:03:39 +02:00
Felix Walter
5ee7dcc5dd CI: Add a test for max. bundle size enforcement
This also extends the MTCP sink script to allow writing to stdout so we
can check the returned payload.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-04 16:03:31 +02:00
Felix Walter
9c1a437dd7 pyd3tn: Do not specify the event loop in the async TCPCLv3 client
The argument has been deprecated in newer Python versions.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-01-30 18:00:17 +01: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
Georg Alexander Murzik
298431c68f Insert SPDX license expression comments into our .c, .h, .py, and .sh code
ud3tn is available under multiple licenses and we want to reflect this in
our source code. But which license information should appear first and how
can we manage this efficiently in the future? The Linux Kernel uses SPDX
expressions instead of boilerplate sections. This seems to be a great
approach, so we do the same here.

Signed-off-by: Georg Alexander Murzik <georg.murzik@d3tn.com>
2022-02-20 16:24:38 +01:00
Felix Walter
7c10d22b32 test: 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
68d73cfd2c test & tools: Fixup used EID format
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-01-26 21:05:42 +01:00
Tobias Nöthlich
ab955d4b17 Add compatibility to older BIBE versions to PyD3TN
This commit remedies the issue of having to modifiy the bundle7.py before
being able to run the automated ION interoperability test by introducing
the --compatibility switch to bibe_over_mtcp_test.py. This command line
argument forces the generated BIBE bundle to use the administrative
record type code 7 instead of 3, ensuring compatibility to ION'S BIBE
implementation.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-12-21 10:04:59 +01:00
Tobias Nöthlich
3d228f6a46 Adapt bibe_over_mtcp_test.py to the documentation
Changed default value of --outer from dtn://ud3tn.dtn to
dtn://lower.dtn, to match the description in the BIBE documentation.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-12-10 10:37:03 +01:00
Tobias Nöthlich
60813aa49e Fix python-stylecheck warnings and errors
This commit remedies code smells introduced to pyd3tn and the python
tools while implementing the BIBE CLA.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-11-29 13:29:31 +01:00
Tobias Nöthlich
682a646f5a Refactor bibe_over_mtcp_test.py
This commit renames the --outer_destination and --inner_destination
commandline parameters to --outer and --inner respectively. It also
adds short forms (-o and -i).

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-11-29 11:51:05 +01:00
Tobias Nöthlich
d7d1da136f Fix minor issues in bibe_over_mtcp_test.py
The default port the script connected to was 4222 instead
of the mtcp port (4224). Also the destinations of the inner and outer
bundles were hardcoded and not changeable via commandline parameters.

This commit fixes those issues by changing the default port and adding
the outer_destination and inner_destination commandline arguments.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-11-12 14:52:50 +01:00
Tobias Nöthlich
52ffb6f558 Add simple script for sending BIBE bundles
To effectively test whether reception and parsing of BIBE administrative
records work, a script for sending bundles containing dummy data is
needed.

This commit adds a simple python script for sending BPDUs to a local
uD3TN instance.

Signed-off-by: Tobias Nöthlich <tobias.noethlich@d3tn.com>
2021-10-25 12:14:09 +02:00
Maximilian Nitsch
45bbccebb6 Prepare PyPi packages
To distribute the pyD3TN DTN protocol implementations as well as the
uD3TN python utilities on PyPi, the Python code is organized in separate
directories and the PyPi packaging guideline is applied. The
restructuring also requires an adjustment of the imports in the scripts
in tools/ and test/.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2020-11-19 12:38:39 +01:00
Felix Walter
057411ccce tools: Adjust mentions of uPCN to the new name
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2020-11-17 15:51:10 +01:00
Felix Walter
bc271aa444 Rename binary, main component, and config defaults "ud3tn"
This changes the core component name as well as the output binary names
(including the library and test binaries) from "upcn" to "ud3tn".
Additionally, the default configuration for the created socket and the
used EID is adapted.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2020-11-17 15:51:10 +01:00
Felix Walter
0ce4bee910
Initial import of uPCN v0.8.0 source code
This is the initial commit for uD3TN. uD3TN is a fork of uPCN v0.8.0,
which will be developed and maintained in a public Git repository.

For questions concerning the history of and code provided with uPCN,
please get in touch with us via: contact <at> d3tn <dot> com

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2020-11-14 11:56:40 +01:00