The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Protocol encoder/decoder support functions. More...
#include <freeradius-devel/build.h>
#include <freeradius-devel/missing.h>
#include <freeradius-devel/util/dict.h>
Go to the source code of this file.
Data Structures | |
struct | fr_da_stack_t |
Structure for holding the stack of dictionary attributes being encoded. More... | |
Macros | |
#define | CHECK_FREESPACE(_have, _need) |
#define | FR_PROTO_HEX_DUMP(_data, _data_len, _fmt, ...) if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_print_hex_data(__FILE__, __LINE__, _data, _data_len, _fmt, ## __VA_ARGS__) |
#define | FR_PROTO_HEX_MARKER(_data, _data_len, _slen, _fmt, ...) if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_print_hex_marker(__FILE__, __LINE__, _data, _data_len, _slen, _fmt, ## __VA_ARGS__) |
#define | FR_PROTO_STACK_PRINT(_stack, _depth) if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_da_stack_print(__FILE__, __LINE__, __FUNCTION__, _stack, _depth) |
#define | FR_PROTO_TRACE(_fmt, ...) if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_print(__FILE__, __LINE__, _fmt, ## __VA_ARGS__) |
Functions | |
void | fr_proto_da_stack_build (fr_da_stack_t *stack, fr_dict_attr_t const *da) |
Build a complete DA stack from the da back to the root. More... | |
void | fr_proto_da_stack_build_partial (fr_da_stack_t *stack, fr_dict_attr_t const *parent, fr_dict_attr_t const *da) |
Complete the DA stack for a child attribute. More... | |
void | fr_proto_da_stack_print (char const *file, int line, char const *func, fr_da_stack_t *da_stack, unsigned int depth) |
void * | fr_proto_next_encodable (fr_dlist_head_t *list, void *current, void *uctx) |
Implements the default iterator to encode pairs belonging to a specific dictionary that are not internal. More... | |
void | fr_proto_print (char const *file, int line, char const *fmt,...)) |
void | fr_proto_print_hex_data (char const *file, int line, uint8_t const *data, size_t data_len, char const *fmt,...) |
void | fr_proto_print_hex_marker (char const *file, int line, uint8_t const *data, size_t data_len, ssize_t slen, char const *fmt,...) |
Protocol encoder/decoder support functions.
Definition in file proto.h.
struct fr_da_stack_t |
Structure for holding the stack of dictionary attributes being encoded.
Data Fields | ||
---|---|---|
fr_dict_attr_t const * | da[FR_DICT_MAX_TLV_STACK+1] | The stack. |
uint8_t | depth | Deepest attribute in the stack. |
#define CHECK_FREESPACE | ( | _have, | |
_need | |||
) |
#define FR_PROTO_HEX_DUMP | ( | _data, | |
_data_len, | |||
_fmt, | |||
... | |||
) | if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_print_hex_data(__FILE__, __LINE__, _data, _data_len, _fmt, ## __VA_ARGS__) |
#define FR_PROTO_HEX_MARKER | ( | _data, | |
_data_len, | |||
_slen, | |||
_fmt, | |||
... | |||
) | if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_print_hex_marker(__FILE__, __LINE__, _data, _data_len, _slen, _fmt, ## __VA_ARGS__) |
#define FR_PROTO_STACK_PRINT | ( | _stack, | |
_depth | |||
) | if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_da_stack_print(__FILE__, __LINE__, __FUNCTION__, _stack, _depth) |
#define FR_PROTO_TRACE | ( | _fmt, | |
... | |||
) | if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_print(__FILE__, __LINE__, _fmt, ## __VA_ARGS__) |
void fr_proto_da_stack_build | ( | fr_da_stack_t * | stack, |
fr_dict_attr_t const * | da | ||
) |
void fr_proto_da_stack_build_partial | ( | fr_da_stack_t * | stack, |
fr_dict_attr_t const * | parent, | ||
fr_dict_attr_t const * | da | ||
) |
void fr_proto_da_stack_print | ( | char const * | file, |
int | line, | ||
char const * | func, | ||
fr_da_stack_t * | da_stack, | ||
unsigned int | depth | ||
) |
void* fr_proto_next_encodable | ( | fr_dlist_head_t * | list, |
void * | current, | ||
void * | uctx | ||
) |
Implements the default iterator to encode pairs belonging to a specific dictionary that are not internal.
[in] | list | to iterate over. |
[in] | current | The fr_pair_t cursor->current. Will be advanced and checked to see if it matches the specified fr_dict_t. |
[in] | uctx | The fr_dict_t to search for. |
Definition at line 100 of file proto.c.
void fr_proto_print | ( | char const * | file, |
int | line, | ||
char const * | fmt, | ||
... | |||
) |