|
BSL v1.0.0 - 29.g99f1b76
AMMOS Bundle Protocol Security Library (BSL)
|
Container structs for BPv7 data. More...
Include dependency graph for ctr.c:Functions | |
| void | mock_bpa_ctr_init (mock_bpa_ctr_t *ctr) |
| void | mock_bpa_ctr_init_move (mock_bpa_ctr_t *ctr, mock_bpa_ctr_t *src) |
| void | mock_bpa_ctr_deinit (mock_bpa_ctr_t *ctr) |
| void | mock_bpa_ctr_sort_blocks (mock_bpa_ctr_t *ctr) |
| Sort canonical blocks in a bundle by descending block number. | |
| int | mock_bpa_ctr_decode (mock_bpa_ctr_t *ctr) |
| Decode a bundle PDU into a container. | |
| int | mock_bpa_ctr_encode (mock_bpa_ctr_t *ctr) |
| Encode to a bundle PDU in a container. | |
Container structs for BPv7 data.
| int mock_bpa_ctr_decode | ( | mock_bpa_ctr_t * | ctr | ) |
Decode a bundle PDU into a container.
| [in,out] | ctr | The container to read and decode PDU data from. |
References BSL_CHKERR1, bsl_mock_decode_bundle(), mock_bpa_ctr_t::bundle_ref, BSL_BundleRef_t::data, mock_bpa_ctr_t::encoded, BSL_Data_t::len, MockBPA_Bundle_Deinit(), MockBPA_Bundle_Init(), and BSL_Data_t::ptr.
Referenced by BSL_TestUtils_LoadBundleFromCBOR(), MockBPA_Agent_work_over_rx(), MockBPA_Agent_work_under_rx(), TEST_CASE(), and test_mock_bpa_ctr_decode_invalid().
| void mock_bpa_ctr_deinit | ( | mock_bpa_ctr_t * | ctr | ) |
References BSL_CHKVOID, BSL_Data_Deinit(), BSL_free(), mock_bpa_ctr_t::bundle, mock_bpa_ctr_t::encoded, and MockBPA_Bundle_Deinit().
Referenced by BSL_TestContext_Deinit(), MockBPA_Agent_Exec(), MockBPA_Agent_work_deliver(), MockBPA_Agent_work_forward(), MockBPA_Agent_work_over_rx(), MockBPA_Agent_work_under_rx(), TEST_CASE(), and test_mock_bpa_ctr_decode_invalid().
| int mock_bpa_ctr_encode | ( | mock_bpa_ctr_t * | ctr | ) |
Encode to a bundle PDU in a container.
| [in,out] | ctr | The container to encode and write PDU data into. |
References BSL_CHKERR1, BSL_Data_Resize(), BSL_LOG_DEBUG, BSL_LOG_INFO, bsl_mock_encode_bundle(), mock_bpa_ctr_t::bundle_ref, BSL_BundleRef_t::data, mock_bpa_ctr_t::encoded, encoder, BSL_Data_t::len, and BSL_Data_t::ptr.
Referenced by MockBPA_Agent_work_deliver(), MockBPA_Agent_work_forward(), TEST_CASE(), test_RFC9173_AppendixA_Example4_Acceptor(), test_SecurityContext_BIB_Acceptor(), test_SecurityContext_BIB_Source(), and test_SecurityContext_BIB_Verifier().
| void mock_bpa_ctr_init | ( | mock_bpa_ctr_t * | ctr | ) |
References BSL_calloc(), BSL_CHKVOID, BSL_Data_Init(), mock_bpa_ctr_t::bundle, mock_bpa_ctr_t::bundle_ref, BSL_BundleRef_t::data, mock_bpa_ctr_t::encoded, and MockBPA_Bundle_Init().
Referenced by BSL_TestContext_Init(), MockBPA_Agent_Exec(), MockBPA_Agent_Join(), TEST_CASE(), and test_mock_bpa_ctr_decode_invalid().
| void mock_bpa_ctr_init_move | ( | mock_bpa_ctr_t * | ctr, |
| mock_bpa_ctr_t * | src | ||
| ) |
| void mock_bpa_ctr_sort_blocks | ( | mock_bpa_ctr_t * | ctr | ) |
Sort canonical blocks in a bundle by descending block number.
This ensures the primary block is the last block.
| [in,out] | ctr | The container to read and decode PDU data from. |
References MockBPA_Bundle_t::blocks, BSL_CHKVOID, and mock_bpa_ctr_t::bundle.
Referenced by MockBPA_Agent_work_deliver(), MockBPA_Agent_work_forward(), and test_SecurityContext_BIB_Source().