OUR SITES NetworkRADIUS FreeRADIUS

The MEMBER keyword

Syntax
MEMBER <name> <type> [<flags>]
Description

The MEMBER keyword defines a name and data type mapping for members of a parent STRUCT definition. The definitions preceding a MEMBER must be either another MEMBER, or be a STRUCT.

<name>

The name of the attribute. The name can contain alphanumeric characters, -, and _. The name should be short and descriptive.

The name of this MEMBER is defined only within the context of its parent STRUCT.

<type>

A data type, or the special type bit.

A few data types can be marked up as being fixed size, by adding an "array-style" suffix, such as with bit[3]. See below for details.

Only MEMBER definitions can contain bit fields. While bit fields do not have to start and end on byte boundaries, changing from a non-bit type to a bit type (and vice-versa) can only be done on a byte boundary.
<flags>

The flag field is optional, and is usually protocol-specific. See the FLAGS page for definitions of common flags.

Please see the protocol dictionaries for examples of these flags. Only the flags which are used in a protocol dictionary are valid, and those flags are only valid for that protocol dictionary.

The key flag can only be used for MEMBERs where the data type is uint8, uint16, or uint32.

Common flags and meanings

Name Description

array

For fixed-size types, declare that the contents of the packet can have an array of this value.

enum=…​

For "leaf" types, copy VALUEs from an `ENUM.

clone=…​

For tlv or 'struct' types, clone (or copy) child definitions from another attribute of the same type

key

This member is a "key" type. The struct can have different STRUCT children depending on the value of the key.

Examples
STRUCT Foo
MEMBER Bar  bit[3]
MEMBER Baz  bit[5]
MEMBER Name string

Fixed Size Data types

The following data types can be marked up as having fixed size, by using an array suffix, e.g. octets[14].

Fixed Size types and meanings

Keyword Description

bit[n]

Declare that this attribute uses n bits, treated as an unsigned integer

octets[n]

Declare that this attribute uses n bytes of octets data

string[n]

Declare that this attribute uses n bytes of string data