ud3tn/include/bundle7/create.h
Felix Walter 973f35d132 Implement status report support in AAP 2.0
This enables AAP 2.0 clients to receive status reports with a new ADU
flag (as we already deliver BIBE bundles). Moreover, it allows clients
to set a report-to EID and sets all of the status report flags on newly
created bundles in case a report-to EID is provided.

Closes: #241

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2025-06-05 17:13:17 +02:00

31 lines
1.3 KiB
C

// SPDX-License-Identifier: BSD-3-Clause OR Apache-2.0
#ifndef BUNDLE7_CREATE_H_INCLUDED
#define BUNDLE7_CREATE_H_INCLUDED
#include "ud3tn/bundle.h"
#include <stddef.h>
#include <stdint.h>
/**
* Creates a local BPv7-bis bundle using the specified parameters.
*
* @param payload The binary payload data which should be encapsulated.
* Memory management will be taken over by the bundle handling
* functions. In case of errors, the memory is freed.
* @param payload_length The length of the payload data.
* @param source The source EID the created bundle originated from.
* @param destination The destination EID the bundle is addressed to.
* @param report_to The report-to EID, or NULL, if not set.
* @param creation_time_ms The bundle creation timestamp (a DTN timestamp in milliseconds).
* @param sequence_number The bundle sequence number.
* @param lifetime_ms The bundle lifetime, in milliseconds.
* @param proc_flags Additional processing flags to be set for the bundle.
*/
struct bundle *bundle7_create_local(
void *payload, size_t payload_length,
const char *source, const char *destination, const char *report_to,
uint64_t creation_time_ms, uint64_t sequence_number,
uint64_t lifetime_ms, enum bundle_proc_flags proc_flags);
#endif // BUNDLE7_CREATE_H_INCLUDED