CBPR encoding and decoding.
More...
#include <freeradius-devel/util/cbor.h>
Go to the source code of this file.
|
static ssize_t | cbor_decode_count (uint64_t *out, int expected, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_date (UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_ethernet (UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_int64 (int64_t *out, fr_dbuff_t *dbuff, fr_type_t type) |
|
static ssize_t | cbor_decode_integer (uint64_t *out, uint8_t info, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_ipv4_addr (UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_ipv4_prefix (UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_ipv6_addr (UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_ipv6_prefix (UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_octets_memcpy (uint8_t *dst, size_t dst_min, size_t dst_max, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_decode_time_delta (UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff) |
|
static ssize_t | cbor_encode_int64 (fr_dbuff_t *dbuff, int64_t neg) |
|
static ssize_t | cbor_encode_integer (fr_dbuff_t *dbuff, uint8_t type, uint64_t data) |
|
static ssize_t | cbor_encode_octets (fr_dbuff_t *dbuff, uint8_t const *data, size_t data_len) |
|
static fr_type_t | cbor_guess_type (fr_dbuff_t *dbuff, bool pair) |
| Guess the data type of the CBOR data. More...
|
|
ssize_t | fr_cbor_decode_pair (TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dbuff_t *dbuff, fr_dict_attr_t const *parent, bool tainted) |
|
ssize_t | fr_cbor_decode_value_box (TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff, fr_type_t type, fr_dict_attr_t const *enumv, bool tainted) |
|
ssize_t | fr_cbor_encode_pair (fr_dbuff_t *dbuff, fr_pair_t *vp) |
| Encode a pair. More...
|
|
ssize_t | fr_cbor_encode_value_box (fr_dbuff_t *dbuff, fr_value_box_t *vb) |
| Encode CBOR. More...
|
|
CBPR encoding and decoding.
- Copyright
- 2024 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file cbor.c.
◆ CBOR_1_BYTE
◆ CBOR_2_BYTE
◆ CBOR_4_BYTE
◆ CBOR_8_BYTE
◆ CBOR_ARRAY
◆ cbor_encode_array
◆ cbor_encode_key
◆ cbor_encode_tag
◆ CBOR_FLOAT
◆ CBOR_INTEGER
◆ CBOR_MAP
◆ CBOR_NEGATIVE
◆ CBOR_OCTETS
◆ CBOR_STRING
◆ CBOR_TAG
◆ return_slen
◆ cbor_decode_type_t
◆ cbor_decode_count()
static ssize_t cbor_decode_count |
( |
uint64_t * |
out, |
|
|
int |
expected, |
|
|
fr_dbuff_t * |
dbuff |
|
) |
| |
|
static |
◆ cbor_decode_date()
◆ cbor_decode_ethernet()
◆ cbor_decode_int64()
◆ cbor_decode_integer()
◆ cbor_decode_ipv4_addr()
◆ cbor_decode_ipv4_prefix()
◆ cbor_decode_ipv6_addr()
◆ cbor_decode_ipv6_prefix()
◆ cbor_decode_octets_memcpy()
◆ cbor_decode_time_delta()
◆ cbor_encode_int64()
◆ cbor_encode_integer()
◆ cbor_encode_octets()
◆ cbor_guess_type()
Guess the data type of the CBOR data.
We've parsed the attribute number, and found that we don't have a dictionary entry for it. But rather than create an attribute of type octets, we try to guess the data type.
Definition at line 1526 of file cbor.c.
◆ fr_cbor_decode_pair()
◆ fr_cbor_decode_value_box()
◆ fr_cbor_encode_pair()
Encode a pair.
Definition at line 1436 of file cbor.c.
◆ fr_cbor_encode_value_box()
Encode CBOR.
Values 0..23 can be encoded in place. Other values can be encoded using the closest smallest integer
Definition at line 166 of file cbor.c.
◆ cbor_decode_type
Initial value:= {
}
static ssize_t cbor_decode_ipv4_addr(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff)
static ssize_t cbor_decode_ipv6_addr(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff)
static ssize_t cbor_decode_date(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff)
static ssize_t cbor_decode_time_delta(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff)
static ssize_t cbor_decode_ipv4_prefix(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff)
static ssize_t cbor_decode_ethernet(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff)
static ssize_t cbor_decode_ipv6_prefix(UNUSED TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff)
@ FR_TYPE_TIME_DELTA
A period of time measured in nanoseconds.
@ FR_TYPE_IPV4_ADDR
32 Bit IPv4 Address.
@ FR_TYPE_ETHERNET
48 Bit Mac-Address.
@ FR_TYPE_IPV6_PREFIX
IPv6 Prefix.
@ FR_TYPE_DATE
Unix time stamp, always has value >2^31.
@ FR_TYPE_IPV6_ADDR
128 Bit IPv6 Address.
@ FR_TYPE_IPV4_PREFIX
IPv4 Prefix.
Definition at line 972 of file cbor.c.
◆ cbor_type_to_str
const char* cbor_type_to_str[8] |
|
static |
Initial value:= {
"integer", "negative", "octets", "string",
"array", "map", "tag", "float"
}
Definition at line 41 of file cbor.c.
◆ cbor_type_to_tag
Initial value:
Definition at line 53 of file cbor.c.