BSL v1.1.1 - 39.g9f43410
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
encode.c File Reference

Definitions for bundle and block encoding. More...

#include "encode.h"
#include "agent.h"
#include "crc.h"
#include "bsl/BPSecLib_Private.h"
#include <netinet/in.h>
+ Include dependency graph for encode.c:

Functions

static int bsl_mock_encode_eid_internal (QCBOREncodeContext *enc, const bsl_mock_eid_t *obj)
 Match BSL_CBOR_Encode_f signature.
 
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.
 

Detailed Description

Definitions for bundle and block encoding.

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.

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

◆ bsl_mock_encode_canonical()

int bsl_mock_encode_canonical ( QCBOREncodeContext *  enc,
const MockBPA_CanonicalBlock_t blk 
)

◆ bsl_mock_encode_eid()

int bsl_mock_encode_eid ( const BSL_HostEID_t eid,
BSL_Data_t encoded_bytes,
size_t *  encoded_size 
)

◆ bsl_mock_encode_eid_internal()

◆ bsl_mock_encode_primary()