Skip to content

Commit

Permalink
add array for structural data types
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jan 19, 2017
1 parent 656322c commit d6c2dd9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/include/dict.h
Expand Up @@ -145,6 +145,7 @@ typedef struct dict_vendor {
#define FR_DICT_ATTR_SIZE (sizeof(fr_dict_attr_t) + FR_DICT_ATTR_MAX_NAME_LEN)

extern const bool fr_dict_attr_allowed_chars[UINT8_MAX];
extern const bool fr_dict_non_data_types[PW_TYPE_MAX + 1];

/*
* Dictionary debug
Expand Down
15 changes: 15 additions & 0 deletions src/lib/dict.c
Expand Up @@ -201,6 +201,21 @@ const bool fr_dict_attr_allowed_chars[UINT8_MAX] = {
['z'] = true
};

/** Structural data types
*
*/
const bool fr_dict_non_data_types[PW_TYPE_MAX + 1] = {
[PW_TYPE_TLV] = true,
[PW_TYPE_STRUCT] = true,
[PW_TYPE_EXTENDED] = true,
[PW_TYPE_LONG_EXTENDED] = true,
[PW_TYPE_VSA] = true,
[PW_TYPE_EVS] = true,
[PW_TYPE_VENDOR] = true,
[PW_TYPE_MAX] = true,
};


/*
* Create the hash of the name.
*
Expand Down

0 comments on commit d6c2dd9

Please sign in to comment.