mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-17 13:07:35 +02:00
Incoming status reports can contain multiple timestamps, depending on which flags are set, as in BPv7. In outgoing bundles, we do not support this, but we must support it when parsing received SRs. The approach to parse the conditionally-present fields is to always fall through all the `case` labels and only stop (+ parse) where we see the corresponding flag. Otherwise we would need a big jump table for every individual step (checking if any of the remaining flags is present). As the `switch` construct already represents such an overall jump table, we just leverage it (and tell the compiler that it is fine to fall through there). This also adds two functions to initialize AR and SR data structures, so we do not miss initializing any fields (which we were, previously!) and cause UB. Signed-off-by: Felix Walter <felix.walter@d3tn.com> |
||
|---|---|---|
| .. | ||
| aap | ||
| aap2 | ||
| agents | ||
| bundle6 | ||
| bundle7 | ||
| cla | ||
| platform | ||
| routing/compat | ||
| spp | ||
| ud3tn | ||