BSL v0.0.0
AMMOS Bundle Protocol Security Library (BSL)
|
Implementation of a RFC9172 Result. More...
#include "SecResult.h"
Go to the source code of this file.
Functions | |
int | BSL_SecResult_Init (BSL_SecResult_t *self, uint64_t result_id, uint64_t context_id, uint64_t target_block_num, BSL_Data_t content) |
Populate a pre-allocated SecResult. | |
bool | BSL_SecResult_IsConsistent (const BSL_SecResult_t *self) |
Return true when internal invariant checks pass. | |
size_t | BSL_SecResult_Sizeof (void) |
Returns size in bytes of BSL_SecResult_t. | |
Implementation of a RFC9172 Result.
Definition in file SecResult.c.
int BSL_SecResult_Init | ( | BSL_SecResult_t * | self, |
uint64_t | result_id, | ||
uint64_t | context_id, | ||
uint64_t | target_block_num, | ||
BSL_Data_t | content | ||
) |
Populate a pre-allocated SecResult.
self | Non-NULL pointer to allocated result. |
result_id | Result ID of corresponding result bytestring, meaning dependent on security context. |
context_id | ID of security context. |
target_block_num | Target of the given security result, included here for convenience. |
content | Read-only view to data containing the bytes of the security result, which is copied out of here. |
Definition at line 28 of file SecResult.c.
References BSL_SecResult_s::_bytelen, BSL_SecResult_s::_bytes, BSL_SecResult_IsConsistent(), BSL_SUCCESS, BSL_SecResult_s::context_id, BSL_Data_s::len, BSL_Data_s::ptr, BSL_SecResult_s::result_id, and BSL_SecResult_s::target_block_num.
bool BSL_SecResult_IsConsistent | ( | const BSL_SecResult_t * | self | ) |
Return true when internal invariant checks pass.
self | This security result |
Definition at line 47 of file SecResult.c.
References BSL_SecResult_s::_bytelen, BSL_SecResult_s::context_id, BSL_SecResult_s::result_id, and BSL_SecResult_s::target_block_num.
Referenced by BSL_SecOutcome_AppendResult(), and BSL_SecResult_Init().
size_t BSL_SecResult_Sizeof | ( | void | ) |
Returns size in bytes of BSL_SecResult_t.
Definition at line 59 of file SecResult.c.