#include <freeradius-devel/util/talloc.h>
static fr_table_num_ordered_t const dict_attr_ext_table[] = {
- { L("name"), FR_DICT_ATTR_EXT_NAME },
- { L("children"), FR_DICT_ATTR_EXT_CHILDREN },
- { L("vendor"), FR_DICT_ATTR_EXT_REF },
- { L("enumv"), FR_DICT_ATTR_EXT_VENDOR },
- { L("da_stack"), FR_DICT_ATTR_EXT_ENUMV },
- { L("name"), FR_DICT_ATTR_EXT_DA_STACK }
+ { L("name"), FR_DICT_ATTR_EXT_NAME },
+ { L("children"), FR_DICT_ATTR_EXT_CHILDREN },
+ { L("ref"), FR_DICT_ATTR_EXT_REF },
+ { L("vendor"), FR_DICT_ATTR_EXT_VENDOR },
+ { L("da_stack"), FR_DICT_ATTR_EXT_DA_STACK },
+ { L("enumv"), FR_DICT_ATTR_EXT_ENUMV },
+ { L("namespace"), FR_DICT_ATTR_EXT_NAMESPACE },
+ { L("protocol-specific"), FR_DICT_ATTR_EXT_PROTOCOL_SPECIFIC }
};
static size_t dict_attr_ext_table_len = NUM_ELEMENTS(dict_attr_ext_table);
};
static size_t dict_enum_ext_table_len = NUM_ELEMENTS(dict_enum_ext_table);
+void fr_dict_attr_ext_debug(fr_dict_attr_t const *da)
+{
+ fr_ext_debug(&fr_dict_attr_ext_def, da->name, da);
+}
+
/** Holds additional information about extension structures
*
*/
{
int i;
- FR_FAULT_LOG("%sext total_len=%zu", name, talloc_get_size(chunk));
+ FR_FAULT_LOG("%s ext total_len=%zu", name, talloc_get_size(chunk));
for (i = 0; i < (int)def->max; i++) {
- uint8_t *chunk_ext = CHUNK_EXT(def->info, def->offset_of_exts);
+ uint8_t *chunk_ext = CHUNK_EXT(chunk, def->offset_of_exts);
if (chunk_ext[i]) {
void *ext = CHUNK_EXT_PTR(chunk, chunk_ext, i);
size_t ext_len = fr_ext_len(def, chunk, i);
i, "<INVALID>");
if (ext_len > 1024) {
- FR_FAULT_LOG("%sext id=%s - possibly bad length %zu - limiting dump to 1024",
+ FR_FAULT_LOG("%s ext id=%s - possibly bad length %zu - limiting dump to 1024",
name, ext_name, ext_len);
ext_len = 1024;
}
- FR_FAULT_LOG("%sext id=%s start=%p end=%p len=%zu",
+ FR_FAULT_LOG("%s ext id=%s start=%p end=%p len=%zu",
name, ext_name, ext, ((uint8_t *)ext) + ext_len, ext_len);
FR_FAULT_LOG_HEX(ext, ext_len);
}