The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions
xlat_pair.c File Reference

Protocol agnostic encode/decoders. More...

#include <freeradius-devel/unlang/xlat_priv.h>
+ Include dependency graph for xlat_pair.c:

Go to the source code of this file.

Functions

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. More...
 
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. More...
 

Detailed Description

Protocol agnostic encode/decoders.

Id
da3a48948135cca202e585d5cffad878447c8b2e

Definition in file xlat_pair.c.

Function Documentation

◆ fr_pair_decode_multi()

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 
)
static

Keep decoding pairs until all of the data has been used.

Parameters
[in]ctxto allocate new pairs in.
[in]outthe cursor to update
[in]parentto use as the root
[in]datato decode.
[in]data_lenThe length of the incoming data.
[in]decode_ctxAny decode specific data such as secrets or configurable.
[in]decodethe function used to decode one specific pair.
Returns
  • <= 0 on error. May be the offset (as a negative value) where the error occurred.
  • > 0 on success. How many bytes were decoded.

Definition at line 42 of file xlat_pair.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xlat_decode_value_box_list()

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.

Parameters
[in]ctxto allocate new pairs in.
[in]outthe cursor to update
[in]requestthe request
[in]decode_ctxAny decode specific data such as secrets or configurable.
[in]decodethe function used to decode one specific pair.
[in]inthe list of value boxes to decode
Returns
  • <= 0 on error. May be the offset (as a negative value) where the error occurred.
  • > 0 on success. How many value boxes were decoded

Definition at line 90 of file xlat_pair.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: