// SPDX-License-Identifier: BSD-3-Clause OR Apache-2.0 #ifndef BUNDLE6_REPORTS_INCLUDED #define BUNDLE6_REPORTS_INCLUDED #include "ud3tn/bundle.h" // struct bundle, struct bundle_status_report #include #include /** * Generates a RFC 5050 administrative record bundle of type * "Bundle status report" for the given bundle that can be sent * to the Report-To EID. * * @param bundle Bundle for which the status report should be created * @param status the status report status flags; note that only one bit must be set * @param reason the status report reason code * @param source source EID for the status report bundle * @param status_timestamp_ms the DTN time when the SR was generated (typically the current time) * * @return a bundle representing the SR, or NULL on error */ struct bundle *bundle6_generate_status_report( const struct bundle *const bundle, enum bundle_status_report_status_flags status, enum bundle_status_report_reason reason, const struct eid source, uint64_t status_timestamp_ms); /** * Parses the payload block of the a RFC 5050 administrative record */ struct bundle_administrative_record *bundle6_parse_administrative_record( const uint8_t *const data, const size_t length); #endif /* BUNDLE6_REPORTS_INCLUDED */