BSL v0.0.0 - 0.geda3e66
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
encode.h File Reference

Declarations for bundle and block encoding. More...

#include "eid.h"
#include "agent.h"
#include <qcbor/qcbor_encode.h>
+ Include dependency graph for encode.h:
+ This graph shows which files directly or indirectly include 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.

Function Documentation

◆ bsl_mock_encode_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

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().