]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
typos and fixes
authorAlan T. DeKok <aland@freeradius.org>
Sun, 8 Sep 2024 14:32:29 +0000 (10:32 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 9 Sep 2024 16:33:51 +0000 (12:33 -0400)
doc/antora/modules/reference/pages/dictionary/begin-tlv.adoc
doc/antora/modules/reference/pages/dictionary/struct.adoc

index c690dec76965e46d80be0bd403248f5060e61499..87937bbd012704fb15eac06800689f29f08aa0fa 100644 (file)
@@ -66,9 +66,9 @@ The above example is equivalent to the example below.
 .Example
 ----
 ATTRIBUTE Foo 2 tlv
-ATTRIBUTE Foo.Bar 2.1 string
-ATTRIBUTE Foo.Baz 2.2 tlv
-ATTRIBUTE Foo.Baz.Such 2.2.4 ipaddr
+ATTRIBUTE Bar .1 string
+ATTRIBUTE Baz .2 tlv
+ATTRIBUTE Such .2.4 ipaddr
 ----
 
 For short entries, it can be simpler to use the full name an OID.
index 8558ad502799e8e46901dc6f1ec254907520f994..cee5de471eb404543bc2a4fb8663d12edb550b98 100644 (file)
@@ -53,15 +53,26 @@ Common flags and meanings
 |=====
 
 
-.Examples
+The following example shows how one structure can include another one.  In this example, the `Information` structure has two fields: `Type` and `Other`.  It has two possible sub-structures which can appear after the `Other` field.  Which sub-structure to be decoded is defined by the `key` field: `Type`.
+
+.Example of a Key field
 ----
 ATTRIBUTE Information 1 struct
 MEMBER Type uint8 key
+MEMBER Other uint32
 
 STRUCT Foo Type 1
 MEMBER Bar uint16
 MEMBER Baz uint16
+
+STRUCT Blag Type 2
+MEMBER Whoops uint32
+MEMBER Stuff uint8
 ----
 
+== Caveats
+
+Variable-sized fields such as `tlv`, `struct`, `string`, or `octets` can only be placed at the end of the `struct`.
+
 // Copyright (C) 2023 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
 // This documentation was developed by Network RADIUS SAS.