|
BSL v1.1.1 - 39.g9f43410
AMMOS Bundle Protocol Security Library (BSL)
|
Declarations for bundle and block encoding. More...
Include dependency graph for encode.h:
This graph shows which files directly or indirectly include this file:Functions | |
| int | bsl_mock_encode_eid (const BSL_HostEID_t *eid, BSL_Data_t *encoded_bytes, size_t *encoded_size) |
| 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. | |
Declarations for bundle and block encoding.
| 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.
References MockBPA_Bundle_t::blocks, bsl_mock_encode_canonical(), bsl_mock_encode_primary(), and MockBPA_Bundle_t::primary_block.
Referenced by LLVMFuzzerTestOneInput(), mock_bpa_ctr_encode(), test_bsl_mock_encode_bundle(), and TEST_CASE().
| 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.
References MockBPA_CanonicalBlock_t::blk_num, MockBPA_CanonicalBlock_t::blk_type, BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, MockBPA_CanonicalBlock_t::btsd, MockBPA_CanonicalBlock_t::btsd_len, MockBPA_CanonicalBlock_t::crc_type, MockBPA_CanonicalBlock_t::flags, mock_bpa_crc_apply(), and mock_bpa_crc_zero().
Referenced by bsl_mock_encode_bundle(), and test_bsl_mock_encode_canonical().
| int bsl_mock_encode_eid | ( | const BSL_HostEID_t * | eid, |
| BSL_Data_t * | encoded_bytes, | ||
| size_t * | encoded_size | ||
| ) |
Encode a single EID.
Matches the BSL_HostDescriptors_t::eid_to_cbor signature.
References ASSERT_ARG_NONNULL, BSL_CBOR_Encode_GetSize(), BSL_CBOR_Encode_Twopass(), BSL_ERR_ARG_INVALID, bsl_mock_encode_eid_internal(), and BSL_HostEID_t::handle.
Referenced by MockBPA_Agent_Descriptors().
| 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 |
References MockBPA_PrimaryBlock_t::adu_length, BSL_BUNDLE_IS_FRAGMENT, BSL_BUNDLECRCTYPE_16, BSL_BUNDLECRCTYPE_32, BSL_CBOR_EncodeEID(), MockBPA_CreationTimestamp_t::bundle_creation_time, MockBPA_PrimaryBlock_t::crc_type, MockBPA_PrimaryBlock_t::dest_eid, MockBPA_PrimaryBlock_t::flags, MockBPA_PrimaryBlock_t::frag_offset, MockBPA_PrimaryBlock_t::lifetime, mock_bpa_crc_apply(), mock_bpa_crc_zero(), MockBPA_PrimaryBlock_t::report_to_eid, MockBPA_CreationTimestamp_t::seq_num, MockBPA_PrimaryBlock_t::src_node_id, MockBPA_PrimaryBlock_t::timestamp, and MockBPA_PrimaryBlock_t::version.
Referenced by bsl_mock_encode_bundle(), and test_bsl_mock_encode_primary().