TYPE="FR_TYPE_DATE"
;;
- 'extended')
- TYPE="FR_TYPE_EXTENDED"
- ;;
-
'tlv')
TYPE="FR_TYPE_TLV"
;;
extern fr_dict_attr_autoload_t radsnmp_dict_attr[];
fr_dict_attr_autoload_t radsnmp_dict_attr[] = {
- { .out = &attr_extended_attribute_1, .name = "Extended-Attribute-1", .type = FR_TYPE_EXTENDED, .dict = &dict_radius },
+ { .out = &attr_extended_attribute_1, .name = "Extended-Attribute-1", .type = FR_TYPE_TLV, .dict = &dict_radius },
{ .out = &attr_freeradius_snmp_failure, .name = "FreeRADIUS-SNMP-Failure", .type = FR_TYPE_UINT8, .dict = &dict_radius },
{ .out = &attr_freeradius_snmp_operation, .name = "FreeRADIUS-SNMP-Operation", .type = FR_TYPE_UINT8, .dict = &dict_radius },
{ .out = &attr_freeradius_snmp_type, .name = "FreeRADIUS-SNMP-Type", .type = FR_TYPE_UINT8, .dict = &dict_radius },
#define FR_TYPE_VARARGS FR_TYPE_TLV
#define FR_TYPE_OPTIONAL FR_TYPE_STRUCT
-#define FR_TYPE_ALTERNATE FR_TYPE_EXTENDED
+#define FR_TYPE_ALTERNATE FR_TYPE_VSA
#define FR_TYPE_ALTERNATE_CHOICE FR_TYPE_GROUP
/** Find a command
name = "VSA";
break;
- case FR_TYPE_EXTENDED:
- name = "EXTENDED";
- break;
-
case FR_TYPE_TLV:
name = "TLV";
break;
break;
case FR_TYPE_TLV:
- case FR_TYPE_EXTENDED:
is_root:
if (fr_dict_unknown_attr_afrom_num(n, &our_da, our_parent, num) < 0) {
goto error;
[FR_TYPE_TLV] = {2, ~0},
[FR_TYPE_STRUCT] = {1, ~0},
- [FR_TYPE_EXTENDED] = {1, ~0},
-
[FR_TYPE_VSA] = {4, ~0},
[FR_TYPE_MAX] = {~0, 0} //!< Ensure array covers all types.
bool const fr_dict_non_data_types[FR_TYPE_MAX + 1] = {
[FR_TYPE_TLV] = true,
[FR_TYPE_STRUCT] = true,
- [FR_TYPE_EXTENDED] = true,
[FR_TYPE_VSA] = true,
[FR_TYPE_VENDOR] = true
};
case FR_TYPE_VENDOR:
case FR_TYPE_VSA:
case FR_TYPE_STRUCT:
- case FR_TYPE_EXTENDED:
break;
case FR_TYPE_UINT8:
case FR_TYPE_TLV:
case FR_TYPE_VSA:
case FR_TYPE_VENDOR:
- case FR_TYPE_EXTENDED:
break;
/*
FR_TYPE_TLV, //!< Contains nested attributes.
FR_TYPE_STRUCT, //!< like TLV, but without T or L, and fixed-width children
- FR_TYPE_EXTENDED, //!< Extended attribute space attribute.
-
FR_TYPE_VSA, //!< Vendor-Specific, for RADIUS attribute 26.
FR_TYPE_VENDOR, //!< Attribute that represents a vendor in the attribute tree.
* functions that need to deal with all types representing values
*/
#define FR_TYPE_STRUCTURAL_EXCEPT_VSA \
- FR_TYPE_EXTENDED: \
- case FR_TYPE_GROUP: \
+ FR_TYPE_GROUP: \
case FR_TYPE_TLV: \
case FR_TYPE_STRUCT
{ L("tlv"), FR_TYPE_TLV },
{ L("struct"), FR_TYPE_STRUCT },
- { L("extended"), FR_TYPE_EXTENDED },
-
{ L("vsa"), FR_TYPE_VSA },
{ L("vendor"), FR_TYPE_VENDOR },
{ L("group"), FR_TYPE_GROUP },
case FR_TYPE_STRUCT: /* Not a box type */
case FR_TYPE_VSA: /* Not a box type */
case FR_TYPE_VENDOR: /* Not a box type */
- case FR_TYPE_EXTENDED: /* Not a box type */
case FR_TYPE_COMBO_IP_ADDR:
case FR_TYPE_COMBO_IP_PREFIX:
case FR_TYPE_VALUE_BOX:
{ .out = &attr_acct_delay_time, .name = "Acct-Delay-Time", .type = FR_TYPE_UINT32, .dict = &dict_radius},
{ .out = &attr_error_cause, .name = "Error-Cause", .type = FR_TYPE_UINT32, .dict = &dict_radius },
{ .out = &attr_event_timestamp, .name = "Event-Timestamp", .type = FR_TYPE_DATE, .dict = &dict_radius},
- { .out = &attr_extended_attribute_1, .name = "Extended-Attribute-1", .type = FR_TYPE_EXTENDED, .dict = &dict_radius},
+ { .out = &attr_extended_attribute_1, .name = "Extended-Attribute-1", .type = FR_TYPE_TLV, .dict = &dict_radius},
{ .out = &attr_message_authenticator, .name = "Message-Authenticator", .type = FR_TYPE_OCTETS, .dict = &dict_radius},
{ .out = &attr_nas_identifier, .name = "NAS-Identifier", .type = FR_TYPE_STRING, .dict = &dict_radius},
{ .out = &attr_original_packet_code, .name = "Original-Packet-Code", .type = FR_TYPE_UINT32, .dict = &dict_radius},
static bool attr_valid(UNUSED fr_dict_t *dict, UNUSED fr_dict_attr_t const *parent,
UNUSED char const *name, UNUSED int attr, fr_type_t type, fr_dict_attr_flags_t *flags)
{
- if (type == FR_TYPE_EXTENDED) {
- fr_strerror_printf("Attributes of type 'extended' cannot be used with DHCP");
- return false;
- }
-
/*
* "extra" signifies that subtype is being used by the
* dictionaries itself.
static bool attr_valid(UNUSED fr_dict_t *dict, UNUSED fr_dict_attr_t const *parent,
UNUSED char const *name, UNUSED int attr, fr_type_t type, fr_dict_attr_flags_t *flags)
{
- if (type == FR_TYPE_EXTENDED) {
- fr_strerror_printf("Attributes of type 'extended' cannot be used with DHCP");
- return false;
- }
-
/*
* "extra" signifies that subtype is being used by the
* dictionaries itself.
switch (da->type) {
case FR_TYPE_TLV:
- case FR_TYPE_EXTENDED:
case FR_TYPE_VENDOR:
case FR_TYPE_VSA:
fr_strerror_printf("%s: Called with structural type %s", __FUNCTION__,
break;
case FR_TYPE_INVALID:
- case FR_TYPE_EXTENDED:
case FR_TYPE_COMBO_IP_ADDR: /* Should have been converted to concrete equivalent */
case FR_TYPE_COMBO_IP_PREFIX: /* Should have been converted to concrete equivalent */
case FR_TYPE_VSA:
/*
* Structural types
*/
- case FR_TYPE_EXTENDED:
- if (unlikely(tainted)) goto bad_tainted;
- slen = internal_decode_pair(ctx, head, da, p, p + len, decoder_ctx);
- if (slen <= 0) goto error;
- break;
-
case FR_TYPE_TLV:
if (unlikely(tainted)) goto bad_tainted;
* Children of TLVs are encoded in the context
* of the TLV.
*/
- case FR_TYPE_EXTENDED: /* Just another type of TLV */
case FR_TYPE_TLV:
/*
* We've done the complete stack.
case FR_TYPE_COMBO_IP_PREFIX: /* Should have been converted to concrete equivalent */
case FR_TYPE_VSA:
case FR_TYPE_VENDOR:
- case FR_TYPE_EXTENDED:
case FR_TYPE_TLV:
case FR_TYPE_STRUCT:
case FR_TYPE_SIZE: