24RCSIDH(proto_h,
"$Id: 5c8b72f7662da4006def57c31445e4e5b4664555 $")
30#include <freeradius-devel/build.h>
31#include <freeradius-devel/missing.h>
32#include <freeradius-devel/util/dict.h>
34#define CHECK_FREESPACE(_have, _need) \
36 if (unlikely((size_t)(_have) < (size_t)(_need))) return -((size_t)(_need) - (size_t)(_have)); \
40# define FR_PROTO_TRACE(_fmt, ...) if (fr_debug_lvl >= L_DBG_LVL_4) fr_proto_print(__FILE__, __LINE__, _fmt, ## __VA_ARGS__)
41# 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__)
42# 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__)
43# 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)
45# define FR_PROTO_TRACE(_fmt, ...)
46# define FR_PROTO_HEX_DUMP(_data, _data_len, _fmt, ...)
47# define FR_PROTO_HEX_MARKER(_data, _data_len, _slen, _fmt, ...)
48# define FR_PROTO_STACK_PRINT(_x, _y)
static int const char * fmt
#define FR_DICT_MAX_TLV_STACK
Maximum TLV stack size.
Head of a doubly linked list.
static char * stack[MAX_STACK]
static uint8_t depth(fr_minmax_heap_index_t i)
static rc_request_t * current
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.
void fr_proto_print(char const *file, int line, char const *fmt,...))
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 inter...
void fr_proto_da_stack_print(char const *file, int line, char const *func, fr_da_stack_t *da_stack, unsigned int depth)
uint8_t depth
Deepest attribute in the stack.
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_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.
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,...)
Structure for holding the stack of dictionary attributes being encoded.