Adds a SPDX-License-Identifier to all nix files and adjust
`license-check.sh` to consider Nix files and the corresponding
directories.
Filtering directories that should not be checked is now performed in the
find command instead of in the iteration. In addition, the iteration
function is changed, as the for loop splits by spaces, which leads to an
error for file names with spaces — linebreaks are used instead.
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
If the write method of the CLA fails, the serailizers will now return
early and this failure is handled properly by the TX task.
In the case of the BPv6 serializer, we add the necessary flow control to
the `write_bytes` macro, to prevent needing a conditional for every
write* or serialize* statement.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
- Implement management of FIB and BDM agents:
* add administrative secret which is required for registering FIB and
BDM agents
* allow registering reverse-direction agents for TX/RX of ADUs when
passing the admin secret
* add cmdline option to pass the admin secret via an env variable
* make administrative secret optional in debug builds
- Register agents by number, as FIB and BDM agents may not have a sink
ID. Numbers are allocated by the agent_register function.
- Remove global state, add function to de-allocate everything.
- Add comprehensive unit tests.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
- Introduces a CompoundBundleId to filter exactly one bundle
- Filter bundles either by their ID or selected metadata
- Transfer the entire StorageCall object to the CLA via the agent queue
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
For protecting µD3TN from proprietary forks that do not give back to the
open-source project, we decided to re-license the µD3TN project under
the GNU Affero General Public License v3.0 (AGPLv3).
To still enable proprietary projects to use µD3TN, D3TN will start to
offer proprietary licenses. To ensure that all future contributions are
compatible with this dual licensing scheme, all external contributions
will still be accepted under the terms of the Apache 2.0 license.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
- pyd3tn: Fix pinned cbor version
- python-ud3tn-utils: Update protobuf to version 2.24.4
- tools: Update flake8 to version 6.1.0
Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
This adds the AAP 2.0 typedefs to the checkpatch list, so it will not
complain about style when declaring a variable or function argument as
`<typedef> *const <name>`.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
- We have files generated from Protobuf in the codebase, which do not
contain the license header.
- We have a new component directory (`aap2`).
- The license header check is extended to the `proto` and `options`
files.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
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>
This enables a set of "strict" diagnostics from `checkpatch.pl` but
disables some that would cause excessive refactoring or do only apply to
the Kernel.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This...
- sets the line length limit to 100 chars in accordance with the new
Linux kernel line length limit
- ignores things we have no control or which do not apply to us: camel
case (used via TinyCBOR, simplequeue, and FreeRTOS), and macros and types
we have not implemented (things only part of the Linux kernel)
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
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>
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>
There is a false positive in clang-tidy that keeps happening in various
places. I checked all usages of valist and they are properly allocated,
used, and freed anytime. This disables the broken checks.
Note the removed single quotes around the extra arguments to clang-tidy:
bash somehow double-quoted the arguments when adding these and
clang-tidy did not process the filter consequently (checked via set -x).
See: https://github.com/llvm/llvm-project/issues/40656
See: https://github.com/llvm/llvm-project/issues/55009
See: https://reviews.llvm.org/D124239Fixes: #117
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
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>
The script checks that the SPDX expression in LICENSE is present in
most of our source code files.
Signed-off-by: Georg Alexander Murzik <georg.murzik@d3tn.com>
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>
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>
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>