Commit graph

30 commits

Author SHA1 Message Date
Maximilian Nitsch
a837c7d722 docs: Add manpage to mkdocs
Uses pandoc to convert the manpage into a markdown document and add it
to the mkdocs documentation.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2025-06-13 17:55:24 +02:00
Maximilian Nitsch
f1634f090c Makefile: Add make target to build HTML docs
- Add `make doc` target to run protoc-gen-doc before mkdocs
- Ignore auto generated markdown files

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-12-05 09:31:37 +01:00
Felix Walter
e5c7ecdf13 tools, mk: clang-{check,tidy}: Simplify invocation, add missing dirs
- This simplifies ithe invocation via Makefile and documents the arguments.
- We missed to add the storage CLA + agent and the compat. router
  directories there.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-09-11 10:10:43 +02:00
Maximilian Nitsch
2055faa2b3 ud3tn_utils+pyd3tn: Migrate setup.py to pyproject.toml
`pyproject.toml` is the new unified Python project settings file
that replaces `setup.py` and other build-systems by introducing a
build-system independent format for source trees. The installation of
setuptools and wheel is no longer necessary as it is automatically
bootstrapped.

https://peps.python.org/pep-0517/

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-01 10:10:56 +02:00
Felix Walter
3188d40317 Makefile: Remove installation of unnecessary dependencies in venv setup
We do not need the extra requirements from `nanopb`, not even for
building the proto headers. They depend on C code that needs to be
built, which significantly delays the venv update.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-28 09:35:53 +02:00
Maximilian Nitsch
bfec915a77 ud3tn-utils: Add SQLiteAgent Protobuf bindings
Adds protobuf Python language bindings and a build target to create them
to the python-ud3tn-utils package.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-06-03 13:41:58 +02:00
Maximilian Nitsch
1321c59c22 sqlite_agent: Add an agent to interact with the SQLiteCLA
The SQLiteAgent enables SQLiteCLA to read packages from the database and
return them to μD3TN. For this purpose, the SQLiteAgent writes commands
to the queue that SQLiteCLA is waiting for.

The SQLiteAgent itself can be controlled by protobuf messages that
describe which action is to be applied to which set of bundles.

Currently the operations "Push" and "Delete" are implemented and a
filter based on a destination EID pattern.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-06-03 13:41:58 +02:00
Felix Walter
0d662afb95 Makefile: Do not build libraries by default
The static library build target has issues with rebuilding after
changes. Often one has to execute `make clean` beforehand so it builds.
As we do not need the library in most cases, we can make building it
explicit.

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
Felix Walter
81c3caba4b mk: Move generated PB components to generated/
We do not need the `components/` subdirectory and it makes the call to
the Protobuf compiler more complicated.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
1dd5961bc4 Add AAP 2.0 component stub with Protobuf support via Nanopb
This adds the Nanopb library as submodule under `external/` and adds
corresponding build configuration to the Makefiles. Additionally, a
Protobuf stub for AAP 2.0 is included along with a `make` target to
build the corresponding C language files (`aap2-proto-headers`).

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
7338297b35 mk: Make options available via yes/no switches available in config.mk
This allows us to enable some options that were intended as CLI
arguments to `make` also via `config.mk` and documents those options in
`config.mk.example`.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-09-29 14:36:25 +02:00
Felix Walter
e16ec4c579 Enable building a BPv7 decoder binary
This adds a target `data-decoder` which builds a binary to decode a
specified binary file using uD3TN's parsing logic (based on the CLA RX
subsystem) and print details about it. In this first version only the
decoding of BPv7 bundles is implemented.

This binary can be used, e.g., for fuzz testing.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-16 11:34:14 +02:00
Felix Walter
13fb85b60e
Merge branch 'feature/static-library'
See !76
2023-05-15 14:20:22 +02:00
Oleksandr Nazymko
06b937452c Add code coverage report
This integrates code coverage report into gitlab CI. Also adds an option for generating code coverage
report after running unit tests to the Makefile.

Signed-off-by: Oleksandr Nazymko <oleksandr.nazymko@d3tn.com>
2023-05-12 11:30:27 +02:00
Felix Walter
7539d07fc0 Makefile: Build libraries as well by default
A simple call of `make` will now also build the libraries.

Please note:
We have a quite specific way to re-execute `make` inside the Makefile with
a specific `PLATFORM` set. If we specify multiple targets outside of
this, `make` will execute itself twice concurrently if a `-j` option is
set, leading to race conditions. Thus, we add a new `posix-all` target
that is used to invoke the "inner" `make` process with the proper
`posix` and `posix-lib` targets.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 10:44:10 +02:00
Felix Walter
6f0de0c7f0 mk: Also build a static library
This combines the static libraries into one libud3tn.a that can be used
for static linking. It shall be noted that we are using a "thin" archive
(containing symlinks) for maximum compatibility - e.g., the ARM version
of ar does not support conversion and we cannot always assume libtool to
be present. The main objective is to build a library usable for linking
it into uD3TN-NG.

See: https://stackoverflow.com/a/23621751

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 10:44:10 +02:00
Felix Walter
b2c95e89d8 Add flags to enable ASAN and UBSAN in build process
You can now specify `sanitize=yes` to the `make` command, which enables
the address and UB sanitizers. For Clang builds, it enables checks for
unsigned integer ovewrflow and implicit conversions, additionally. Thus,
it is advised to compile as follows:

    make TOOLCHAIN=clang sanitize=yes

There also is the option to pass `sanitize-strict=yes`, which will set
`-fno-sanitize-recover=` such that the program execution aborts in case
the sanitizers detect something.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 09:00:27 +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
71fb7e2b24 Make Clang check script more flexible and fix clang-tidy job
This allows the user to specify the checker binary and fixes the
"clang-tidy" CI job by using a newer version and directly invoking the
script.

Fixes: #43

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-10 11:22:51 +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
4e800ca143 Makefile: Fix Python library installation in venv
Previously, the ud3tn Python libraries were not properly installed as
"editable", thus, changes made in the development setup were not
respected until another `pip install -e` command was issued.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-01-26 21:05:42 +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
f9e513a934 Rename CONFIG_AGENT_REMOTE_CONFIGURATION build flag
See !29, it not only refers to the config agent anymore.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2021-07-27 15:00:50 +02:00
Maximilian Nitsch
bbd0900deb config_agent: Only accept config MSGs from local EIDs
To be protected against unauthorized remote configuration, by default
only configuration bundles with a local source EID are processed by the
config agent. This feature can be disabled by setting
CONFIG_AGENT_REMOTE_CONFIGURATION to true at compile time.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2020-12-18 14:27:53 +01: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
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
007bd33071 Makefile: Use ncat instead of telnet for *flash commands
It seems the use of telnet broke with a recent update of the tooling.
Instead, we now use ncat (the netcat implementation from the nmap
package) which has a consistent interface and works without issues with
openocd.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2020-11-15 14:22:11 +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