The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions | Variables
decode.c File Reference

Functions to decode data in our internal structure. More...

#include <freeradius-devel/internal/internal.h>
#include <freeradius-devel/io/pair.h>
#include <freeradius-devel/io/test_point.h>
#include <freeradius-devel/util/proto.h>
#include <freeradius-devel/util/types.h>
+ Include dependency graph for decode.c:

Go to the source code of this file.

Functions

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 *list, 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)
 
static ssize_t internal_decode_pair (TALLOC_CTX *ctx, fr_pair_list_t *head, fr_dict_attr_t const *parent_da, fr_dbuff_t *dbuff, void *decode_ctx)
 
static ssize_t internal_decode_pair_value (TALLOC_CTX *ctx, fr_pair_list_t *head, fr_dict_attr_t const *parent_da, fr_dbuff_t *dbuff, bool tainted, UNUSED void *decode_ctx)
 Decodes the value of an attribute, potentially producing a pair (added to the cursor) More...
 
static ssize_t internal_decode_structural (TALLOC_CTX *ctx, fr_pair_list_t *head, fr_dict_attr_t const *parent_da, fr_dbuff_t *dbuff, void *decode_ctx)
 Decode a group. More...
 

Variables

fr_test_point_pair_decode_t internal_tp_decode_pair
 

Detailed Description

Functions to decode data in our internal structure.

Id
9be87d70b467a35b339f1667545bb4b2f0808e01

Because what we need is yet ANOTHER serialisation scheme.

Definition in file decode.c.

Function Documentation

◆ fr_internal_decode_list_dbuff()

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.

Parameters
ctxto create new pairs in
outlist to append pairs to
parentattribute within which which to decode
dbuffto parse
decode_ctxto pass to decoder function
Returns
  • bytes of dbuff consumed
  • < 0 on error

Definition at line 310 of file decode.c.

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

◆ fr_internal_decode_pair()

ssize_t fr_internal_decode_pair ( TALLOC_CTX *  ctx,
fr_pair_list_t list,
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.

Definition at line 273 of file decode.c.

+ Here is the call graph for this function:

◆ fr_internal_decode_pair_dbuff()

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 
)

Definition at line 279 of file decode.c.

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

◆ internal_decode_pair()

static ssize_t internal_decode_pair ( TALLOC_CTX *  ctx,
fr_pair_list_t head,
fr_dict_attr_t const *  parent_da,
fr_dbuff_t dbuff,
void *  decode_ctx 
)
static

Definition at line 99 of file decode.c.

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

◆ internal_decode_pair_value()

static ssize_t internal_decode_pair_value ( TALLOC_CTX *  ctx,
fr_pair_list_t head,
fr_dict_attr_t const *  parent_da,
fr_dbuff_t dbuff,
bool  tainted,
UNUSED void *  decode_ctx 
)
static

Decodes the value of an attribute, potentially producing a pair (added to the cursor)

Definition at line 41 of file decode.c.

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

◆ internal_decode_structural()

static ssize_t internal_decode_structural ( TALLOC_CTX *  ctx,
fr_pair_list_t head,
fr_dict_attr_t const *  parent_da,
fr_dbuff_t dbuff,
void *  decode_ctx 
)
static

Decode a group.

Definition at line 69 of file decode.c.

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

Variable Documentation

◆ internal_tp_decode_pair

fr_test_point_pair_decode_t internal_tp_decode_pair
Initial value:
= {
.test_ctx = NULL,
}
ssize_t fr_internal_decode_pair(TALLOC_CTX *ctx, fr_pair_list_t *list, 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.
Definition: decode.c:273

Definition at line 329 of file decode.c.