mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-13 12:33:27 +02:00
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>
15 lines
400 B
C
15 lines
400 B
C
// SPDX-License-Identifier: BSD-3-Clause OR Apache-2.0
|
|
#ifndef BUNDLE6_SERIALIZER_H_INCLUDED
|
|
#define BUNDLE6_SERIALIZER_H_INCLUDED
|
|
|
|
#include "ud3tn/bundle.h"
|
|
#include "ud3tn/result.h"
|
|
|
|
#include <stddef.h>
|
|
|
|
enum ud3tn_result bundle6_serialize(
|
|
struct bundle *bundle,
|
|
enum ud3tn_result (*write)(void *cla_obj, const void *, const size_t),
|
|
void *cla_obj);
|
|
|
|
#endif /* BUNDLE6_SERIALIZER_H_INCLUDED */
|