This adds a `bundle_is_valid` function checking for further MUST
constraints defined by the spec., which further processing inside uD3TN
may depend on.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
Otherwise memory is leaked so we cannot run negative tests with memory
leak detection (ASAN) enabled.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This enables us to differentiate from sanitizer errors - e.g. the UB
sanitizer returns 1 as exit status.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
We have adapted the length fields inside bundles to 64 bits, so we need
to use a 64-bit format specifier here.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
Otherwise the program aborts on `ASSERT(result != NULL)` in this case.
See also the BPv7 tests for an explanation of the parser's behavior.
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
We also need argv to be non-const for this to work. Switching to const
everywhere collides with out handling of command line arguments in
`cmdline.c`.
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>