#include <freeradius-devel/util/pair.h>
#include <freeradius-devel/util/talloc.h>
Go to the source code of this file.
|
ssize_t | fr_internal_decode_list_dbuff (TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent, fr_dbuff_t *dbuff, void *decode_ctx) |
| Retrieve all pairs from the dbuff. More...
|
|
ssize_t | fr_internal_decode_pair (TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent, uint8_t const *data, size_t data_len, void *decode_ctx) |
| Create a single fr_pair_t and all its nesting. More...
|
|
ssize_t | fr_internal_decode_pair_dbuff (TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent, fr_dbuff_t *dbuff, void *decode_ctx) |
|
ssize_t | fr_internal_encode_list (fr_dbuff_t *dbuff, fr_pair_list_t const *list, void *encode_ctx) |
| Encode a list of pairs using the internal encoder. More...
|
|
ssize_t | fr_internal_encode_pair (fr_dbuff_t *dbuff, fr_dcursor_t *cursor, void *encode_ctx) |
| Encode a data structure into an internal attribute. More...
|
|
◆ fr_internal_encode_ctx_t
struct fr_internal_encode_ctx_t |
Definition at line 35 of file internal.h.
Data Fields |
bool |
allow_name_only |
Allow name only pairs. This should be set to true when encoding data that's being passed between threads in the same process. It should be set to false when encoding data that's stored in an external database or in the cache module.
|
◆ FR_INTERNAL_FLAG_EXTENDED
#define FR_INTERNAL_FLAG_EXTENDED 0x01 |
◆ FR_INTERNAL_FLAG_INTERNAL
#define FR_INTERNAL_FLAG_INTERNAL 0x40 |
◆ FR_INTERNAL_FLAG_TAINTED
#define FR_INTERNAL_FLAG_TAINTED 0x02 |
◆ FR_INTERNAL_FLAG_UNKNOWN
#define FR_INTERNAL_FLAG_UNKNOWN 0x80 |
◆ FR_INTERNAL_MASK_LEN
#define FR_INTERNAL_MASK_LEN 0x1c |
◆ FR_INTERNAL_MASK_TYPE
#define FR_INTERNAL_MASK_TYPE 0xe0 |
◆ fr_internal_decode_list_dbuff()
Retrieve all pairs from the dbuff.
- Parameters
-
ctx | to create new pairs in |
out | list to append pairs to |
parent | attribute within which which to decode |
dbuff | to parse |
decode_ctx | to pass to decoder function |
- Returns
- bytes of dbuff consumed
- < 0 on error
Definition at line 310 of file decode.c.
◆ fr_internal_decode_pair()
Create a single fr_pair_t and all its nesting.
Definition at line 273 of file decode.c.
◆ fr_internal_decode_pair_dbuff()
◆ fr_internal_encode_list()
Encode a list of pairs using the internal encoder.
- Parameters
-
[out] | dbuff | Where to write encoded data. |
[in] | list | List of attributes to encode. |
[in] | encode_ctx | Additional data to be used by the encoder. |
- Returns
- length of encoded data on success
- < 0 on failure
Definition at line 303 of file encode.c.
◆ fr_internal_encode_pair()
Encode a data structure into an internal attribute.
- Parameters
-
[in,out] | dbuff | Where to write encoded data and how much one can write. |
[in] | cursor | Specifying attribute to encode. |
[in] | encode_ctx | Additional data such as the shared secret to use. |
- Returns
- >0 The number of bytes written to out.
- 0 Nothing to encode (or attribute skipped).
- <0 an error occurred.
Definition at line 281 of file encode.c.