25RCSID(
"$Id: da3a48948135cca202e585d5cffad878447c8b2e $")
27#include <freeradius-devel/unlang/xlat_priv.h>
51 if (data_len == 0)
return 0;
56 end =
data + data_len;
64 return len - (p -
data);
92 fr_value_box_list_t *
in)
105 RWDEBUG(
"Skipping value \"%pV\", expected value of type %s, got type %s",
113 vb->vb_octets, vb->vb_length, decode_ctx,
decode);
fr_dict_attr_t const * fr_dict_root(fr_dict_t const *dict)
Return the root attribute of a dictionary.
ssize_t(* fr_pair_decode_t)(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)
A generic interface for decoding fr_pair_ts.
@ FR_TYPE_OCTETS
Raw octets.
static fr_radius_decode_fail_t decode(TALLOC_CTX *ctx, fr_pair_list_t *reply, uint8_t *response_code, bio_handle_t *h, request_t *request, bio_request_t *u, uint8_t const request_authenticator[static RADIUS_AUTH_VECTOR_LENGTH], uint8_t *data, size_t data_len)
Decode response packet data, extracting relevant information and validating the packet.
void fr_pair_list_init(fr_pair_list_t *list)
Initialise a pair list header.
#define RDEBUG_ENABLED2()
Stores an attribute, a value and various bits of other data.
fr_pair_t * fr_pair_list_next(fr_pair_list_t const *list, fr_pair_t const *item))
Get the next item in a valuepair list after a specific entry.
void fr_pair_list_free(fr_pair_list_t *list)
Free memory used by a valuepair list.
void fr_pair_list_append(fr_pair_list_t *dst, fr_pair_list_t *src)
Appends a list of fr_pair_t from a temporary list to a destination list.
size_t fr_pair_list_num_elements(fr_pair_list_t const *list)
Get the length of a list of fr_pair_t.
static char const * fr_type_to_str(fr_type_t type)
Return a static string containing the type name.
#define fr_value_box_list_foreach(_list_head, _iter)
static size_t char ** out
int xlat_decode_value_box_list(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, void *decode_ctx, fr_pair_decode_t decode, fr_value_box_list_t *in)
Decode all of the value boxes into the output cursor.
static ssize_t fr_pair_decode_multi(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_t decode)
Keep decoding pairs until all of the data has been used.