BSL v1.1.1 - 19.g31939de
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
AbsSecBlock.h File Reference

Concrete implementation of ASB and its functionality. More...

#include <stddef.h>
#include <stdint.h>
#include <m-shared-ptr.h>
#include <m-array.h>
#include <BPSecLib_Public.h>
#include "IdValPair.h"
+ Include dependency graph for AbsSecBlock.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  BSL_AbsSecBlock_Target_t
 
struct  BSL_AbsSecBlock_t
 Represents the Abstract Security Block as defined in RFC9172. More...
 

Macros

#define M_OPL_BSL_AbsSecBlock_Target_t()    (INIT(API_2(BSL_AbsSecBlock_Target_Init)), INIT_SET(0), SET(0), CLEAR(API_2(BSL_AbsSecBlock_Target_Deinit)))
 M*LIB OPLIST for BSL_AbsSecBlock_Target_t.
 

Functions

void BSL_AbsSecBlock_Target_Init (BSL_AbsSecBlock_Target_t *self)
 Initialize a new target structure.
 
void BSL_AbsSecBlock_Target_Deinit (BSL_AbsSecBlock_Target_t *self)
 Deinitialize a target structure.
 
BSL_AbsSecBlock_Target_tBSL_AbsSecBlock_AddTarget (BSL_AbsSecBlock_t *self, uint64_t target_block_num)
 Adds a given block ID as a security target covered by this ASB.
 

Detailed Description

Concrete implementation of ASB and its functionality.

Forthcoming

See https://www.rfc-editor.org/rfc/rfc9172.html#name-abstract-security-block

Macro Definition Documentation

◆ M_OPL_BSL_AbsSecBlock_Target_t

#define M_OPL_BSL_AbsSecBlock_Target_t ( )     (INIT(API_2(BSL_AbsSecBlock_Target_Init)), INIT_SET(0), SET(0), CLEAR(API_2(BSL_AbsSecBlock_Target_Deinit)))

M*LIB OPLIST for BSL_AbsSecBlock_Target_t.

Function Documentation

◆ BSL_AbsSecBlock_AddTarget()

BSL_AbsSecBlock_Target_t * BSL_AbsSecBlock_AddTarget ( BSL_AbsSecBlock_t *  self,
uint64_t  target_block_num 
)

Adds a given block ID as a security target covered by this ASB.

Parameters
[in,out]selfThis ASB.
[in]target_block_numID of a block, 0 indicates primary block as usual.
Returns
The new target and its results.

References ASSERT_PRECONDITION, BSL_AbsSecBlock_IsConsistent(), and BSL_AbsSecBlock_Target_t::target_block_num.

Referenced by BSL_AbsSecBlock_DecodeFromCBOR(), and BSL_ExecAnySource_Post().

◆ BSL_AbsSecBlock_Target_Deinit()

void BSL_AbsSecBlock_Target_Deinit ( BSL_AbsSecBlock_Target_t self)

Deinitialize a target structure.

References BSL_AbsSecBlock_Target_t::results, and BSL_AbsSecBlock_Target_t::target_block_num.

◆ BSL_AbsSecBlock_Target_Init()

void BSL_AbsSecBlock_Target_Init ( BSL_AbsSecBlock_Target_t self)

Initialize a new target structure.

References BSL_AbsSecBlock_Target_t::results, and BSL_AbsSecBlock_Target_t::target_block_num.