From: Alan T. DeKok Date: Fri, 17 Feb 2023 02:43:06 +0000 (-0500) Subject: more updates for dictionaries. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e934deecfa0cb042153d8e311b458dc12d0306fe;p=thirdparty%2Ffreeradius-server.git more updates for dictionaries. For now, BEGIN-FOO and END-FOO are not (yet) documented. --- diff --git a/doc/antora/modules/reference/pages/dictionary/flags.adoc b/doc/antora/modules/reference/pages/dictionary/flags.adoc new file mode 100644 index 00000000000..499d20b27ad --- /dev/null +++ b/doc/antora/modules/reference/pages/dictionary/flags.adoc @@ -0,0 +1,25 @@ += The FLAG keyword + +.Syntax +---- +FLAG +---- + +.Description +The `FLAG` keyword defines a "default" set of flags which are used for +processing the rest of the current dictionary file. + +The main purpose of the `FLAG` keyword is to avoid having an extra +field for every `ATTRIBUTE` definition. + +:: The flag value. ++ +For now, only `internal` is supported. + +.Examples +---- +FLAG internal +---- + +// Copyright (C) 2023 Network RADIUS SAS. Licenced under CC-by-NC 4.0. +// Development of this documentation was sponsored by Network RADIUS SAS. diff --git a/doc/antora/modules/reference/pages/dictionary/index.adoc b/doc/antora/modules/reference/pages/dictionary/index.adoc index 8d1d0eebd6f..e3efc82329c 100644 --- a/doc/antora/modules/reference/pages/dictionary/index.adoc +++ b/doc/antora/modules/reference/pages/dictionary/index.adoc @@ -90,6 +90,16 @@ If there is still a need to use the old names, the xref:dictionary/alias.adoc[ALIAS] keyword can help. See `raddb/dictionary` for additional documentation. +=== Names matter, not definitions + +Names occur in many places, such as in +xref:dictionary/attribute.adoc[ATTRIBUTE] definitions, +xref:dictionary/define.adoc[DEFINE], +xref:dictionary/member.adoc[MEMBER], +xref:dictionary/struct.adoc[STRUCT], etc. We generally refer to all +of these entities as being 'attributes', no matter how the name was +defined. + == Files and Location The dictionaries are placed into a `share` directory, which is usually @@ -127,12 +137,12 @@ xref:dictionary/attribute.adoc[ATTRIBUTE] and xref:dictionary/value.adoc[VALUE]. | xref:dictionary/alias.adoc[ALIAS] | Define a name which references an `ATTRIBUTE` | xref:dictionary/attribute.adoc[ATTRIBUTE] | Define a name, number, and data type mapping | xref:dictionary/define.adoc[DEFINE] | Define a name and data type mapping -| xref:dictionary/enum.adoc[ENUM] | Define a named enumeration of values for use with multiple `ATTRIBUTE`s +| xref:dictionary/enum.adoc[ENUM] | Define a named enumeration of values for use with multiple ``ATTRIBUTE``s | xref:dictionary/flags.adoc[FLAGS] | Set flags for subsequent definitions | xref:dictionary/include.adoc[$INCLUDE] | Include another dictionary file | xref:dictionary/member.adoc[MEMBER] | Define a member of a `STRUCT` | xref:dictionary/protocol.adoc[PROTOCOL] | Define a protocol like `RADIUS` or `DHCPv4` -| xref:dictionary/struct.adoc[STRUCT] | Define a structure which can contain `MEMBER`s +| xref:dictionary/struct.adoc[STRUCT] | Define a structure which can contain ``MEMBER``s | xref:dictionary/value.adoc[VALUE] | Define a name for a particular value of an `ATTRIBUTE` | xref:dictionary/vendor.adoc[VENDOR] | Define a name and number for a vendor |===== diff --git a/doc/antora/modules/reference/pages/dictionary/member.adoc b/doc/antora/modules/reference/pages/dictionary/member.adoc index bd202cde419..6e97bda1f92 100644 --- a/doc/antora/modules/reference/pages/dictionary/member.adoc +++ b/doc/antora/modules/reference/pages/dictionary/member.adoc @@ -33,6 +33,8 @@ 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 ``MEMBER``s where the data type is `uint8`, `uint16`, or `uint32`. Common flags and meanings [options="header"] @@ -41,6 +43,7 @@ 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. | `clone=...` | For `tlv` types, clone (or copy) child definitions from another `tlv` type +| `key` | This member is a "key" type. The struct can have different xref:dictionary/struct.adoc[STRUCT] children depending on the value of the key. |===== .Examples diff --git a/doc/antora/modules/reference/pages/dictionary/protocol.adoc b/doc/antora/modules/reference/pages/dictionary/protocol.adoc new file mode 100644 index 00000000000..6b860ce1616 --- /dev/null +++ b/doc/antora/modules/reference/pages/dictionary/protocol.adoc @@ -0,0 +1,34 @@ += The PROTOCOL keyword + +.Syntax +---- +PROTOCOL [