BSL v0.0.0
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
bsl_mock_bpa_encode.h File Reference

Declarations for bundle and block encoding. More...

#include "bsl_mock_bpa.h"
#include "bsl_mock_bpa_eid.h"
#include <qcbor/qcbor_encode.h>
+ Include dependency graph for bsl_mock_bpa_encode.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int bsl_mock_encode_eid (QCBOREncodeContext *enc, const BSL_HostEID_t *eid)
 Encode a single EID.
 
int bsl_mock_encode_primary (QCBOREncodeContext *enc, const MockBPA_PrimaryBlock_t *blk)
 Encode primary block to a CBOR data.
 
int bsl_mock_encode_canonical (QCBOREncodeContext *enc, const MockBPA_CanonicalBlock_t *blk)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int bsl_mock_encode_bundle (QCBOREncodeContext *enc, const MockBPA_Bundle_t *bundle)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Detailed Description

Declarations for bundle and block encoding.

Definition in file bsl_mock_bpa_encode.h.

Function Documentation

◆ bsl_mock_encode_bundle()

int bsl_mock_encode_bundle ( QCBOREncodeContext *  enc,
const MockBPA_Bundle_t bundle 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 167 of file bsl_mock_bpa_encode.c.

References bsl_mock_encode_canonical(), and bsl_mock_encode_primary().

◆ bsl_mock_encode_canonical()

int bsl_mock_encode_canonical ( QCBOREncodeContext *  enc,
const MockBPA_CanonicalBlock_t blk 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 126 of file bsl_mock_bpa_encode.c.

References BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, and mock_bpa_crc_apply().

Referenced by bsl_mock_encode_bundle().

◆ bsl_mock_encode_eid()

int bsl_mock_encode_eid ( QCBOREncodeContext *  enc,
const BSL_HostEID_t eid 
)

◆ bsl_mock_encode_primary()

int bsl_mock_encode_primary ( QCBOREncodeContext *  enc,
const MockBPA_PrimaryBlock_t blk 
)

Encode primary block to a CBOR data.

Parameters
[in]encThe encoder.
[in]blkprimary block information to be encoded
Returns
0 if successful

Definition at line 79 of file bsl_mock_bpa_encode.c.

References BSL_BUNDLE_IS_FRAGMENT, BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, bsl_mock_encode_eid(), and mock_bpa_crc_apply().

Referenced by bsl_mock_encode_bundle().