BSL v1.0.0 - 29.g99f1b76
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
SamplePolicyConfigParser.h File Reference
#include <inttypes.h>
#include <stdio.h>
#include <jansson.h>
#include <BPSecLib_Private.h>
#include <CryptoInterface.h>
#include <security_context/rfc9173.h>
#include "SamplePolicyProvider.h"
+ Include dependency graph for SamplePolicyConfigParser.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  BSLP_InitParams_t
 

Typedefs

typedef uint32_t BSLP_BitstringPolicyConfiguration_t
 Bitwise Diagram of the mock bpa config data structure:
 

Functions

int BSLP_InitParams_Init (BSLP_InitParams_t *params)
 Initialize local policy provider parameters.
 
void BSLP_InitParams_Deinit (BSLP_InitParams_t *params)
 Deinitialize local policy provider parameters.
 
int BSLP_RegisterPolicyFromJSON (const char *policy_cfg_path, BSLP_PolicyProvider_t *policy)
 Initialize local policy provider from JSON file.
 
int BSLP_RegisterPolicyFromBitstringList (const char *policies, BSLP_PolicyProvider_t *policy)
 Initialize local policy provider from list of bit strings.
 

Typedef Documentation

◆ BSLP_BitstringPolicyConfiguration_t

Bitwise Diagram of the mock bpa config data structure:

uint32_t : bsl_mock_policy_configuration_t
[ x x x x | x x x x | x x x x | x x x x ]
[ --------- unused -------] | | [---] [---] [---] | |
| | | | | | |
"Don't care": set EIDs s.t. -| | | | | | |
bundle doens't match any rule -| | | | | | |
| | | | | |
Use Wrapped Key for BCB -| | | | | |
| | | | |
BSL Role: 00 - source, 01 - verifier, -| | | | |
10 - acceptor, 11: undefined -| | | | |
| | | |
Policy Action: 00 - nothing, 01 - drop block, -| | | |
10 - drop bundle, 11: undefined -| | | |
| | |
Target Block Type: 00 - primary, 01 - payload, -| | |
10 - private/experimental (192), 11 - bundle age -| | |
| |
Target Block Type: -| | |
Policy Location: 0 - CLOUT, 1 - CLIN -| |
|
Sec Block Type: 0 - BIB, 1 - BCB -|

Function Documentation

◆ BSLP_InitParams_Deinit()

◆ BSLP_InitParams_Init()

◆ BSLP_RegisterPolicyFromBitstringList()

int BSLP_RegisterPolicyFromBitstringList ( const char *  policies,
BSLP_PolicyProvider_t policy 
)

Initialize local policy provider from list of bit strings.

Parameters
[in]policiescomma separated policy bit strings as described by BSLP_BitstringPolicyConfiguration_t
[in,out]policypolicy provider to configure. Must be initialize/allocated

References BSL_LOG_ERR, BSL_SUCCESS, BSLP_InitParams_Deinit(), BSLP_InitParams_Init(), BSLP_RegisterPolicyFromBitstring(), CHK_ARG_NONNULL, and policy.

Referenced by main().

◆ BSLP_RegisterPolicyFromJSON()