BSL v0.0.0
AMMOS Bundle Protocol Security Library (BSL)
|
Definitions for bundle and block encoding. More...
#include <BPSecLib_Private.h>
#include "bsl_mock_bpa.h"
#include "bsl_mock_bpa_encode.h"
#include "bsl_mock_bpa_crc.h"
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. | |
static int | _cmp (const void *a, const void *b) |
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. | |
Variables | |
static const uint8_t | zero_crc [] = { 0, 0, 0, 0 } |
Definitions for bundle and block encoding.
Definition in file bsl_mock_bpa_encode.c.
|
static |
Definition at line 159 of file bsl_mock_bpa_encode.c.
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().
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().
int bsl_mock_encode_eid | ( | QCBOREncodeContext * | enc, |
const BSL_HostEID_t * | eid | ||
) |
Encode a single EID.
[in] | enc | The encoder. |
[in] | eid | The EID value. |
Definition at line 33 of file bsl_mock_bpa_encode.c.
References bsl_mock_eid_t::as_ipn, bsl_mock_eid_t::as_raw, bsl_eid_ipn_ssp_t::auth_num, BSL_MOCK_EID_IPN, CHKERR1, BSL_HostEID_s::handle, BSL_Data_s::len, bsl_eid_ipn_ssp_t::ncomp, bsl_eid_ipn_ssp_t::node_num, BSL_Data_s::ptr, bsl_mock_eid_t::scheme, bsl_mock_eid_t::ssp, and bsl_eid_ipn_ssp_t::svc_num.
Referenced by bsl_mock_bpa_init(), and bsl_mock_encode_primary().
int bsl_mock_encode_primary | ( | QCBOREncodeContext * | enc, |
const MockBPA_PrimaryBlock_t * | blk | ||
) |
Encode primary block to a CBOR data.
[in] | enc | The encoder. |
[in] | blk | primary block information to be encoded |
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().
|
static |
Definition at line 77 of file bsl_mock_bpa_encode.c.