Functions to encode / decode structures on the wire.
More...
#include <freeradius-devel/util/struct.h>
#include <freeradius-devel/util/encode.h>
#include <freeradius-devel/io/pair.h>
Go to the source code of this file.
|
ssize_t | fr_struct_from_network (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, fr_pair_decode_value_t decode_value, fr_pair_decode_value_t decode_tlv) |
| Convert a STRUCT to one or more VPs. More...
|
|
ssize_t | fr_struct_to_network (fr_dbuff_t *dbuff, fr_da_stack_t *da_stack, unsigned int depth, fr_dcursor_t *parent_cursor, void *encode_ctx, fr_encode_dbuff_t encode_value, fr_encode_dbuff_t encode_pair) |
|
static int8_t | pair_sort_increasing (void const *a, void const *b) |
|
static int | put_bits_dbuff (fr_dbuff_t *dbuff, uint8_t *p, int start_bit, uint8_t num_bits, uint64_t data) |
| Put bits into an output dbuff. More...
|
|
static void * | struct_next_encodable (fr_dlist_head_t *list, void *current, void *uctx) |
|
Functions to encode / decode structures on the wire.
- Copyright
- 2018 The FreeRADIUS server project
-
2018 Alan DeKok (aland.nosp@m.@fre.nosp@m.eradi.nosp@m.us.o.nosp@m.rg)
Definition in file struct.c.
◆ fr_struct_from_network()
Convert a STRUCT to one or more VPs.
Definition at line 33 of file struct.c.
◆ fr_struct_to_network()
◆ pair_sort_increasing()
static int8_t pair_sort_increasing |
( |
void const * |
a, |
|
|
void const * |
b |
|
) |
| |
|
static |
◆ put_bits_dbuff()
Put bits into an output dbuff.
- Parameters
-
dbuff | where the bytes go |
p | where leftover bits go |
start_bit | start bit in the dbuff where the data goes, 0..7 |
num_bits | number of bits to write to the output, 0..55 |
data | data to write, all in the lower "num_bits" of the uint64_t variable |
- Returns
- >= 0 the next value to pass in for start_bit < 0 no space or invalid start_bit or num_bits parameter
Definition at line 414 of file struct.c.
◆ struct_next_encodable()
static void* struct_next_encodable |
( |
fr_dlist_head_t * |
list, |
|
|
void * |
current, |
|
|
void * |
uctx |
|
) |
| |
|
static |