]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
docs: updated miscelleneous functions
authorAlan T. DeKok <aland@freeradius.org>
Fri, 9 May 2025 19:40:58 +0000 (15:40 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 9 May 2025 19:41:42 +0000 (15:41 -0400)
doc/antora/modules/reference/nav.adoc
doc/antora/modules/reference/pages/xlat/misc/index.adoc
doc/antora/modules/reference/pages/xlat/misc/pairs.adoc [new file with mode: 0644]

index 91271e77b9e79e9e2445ba644c6525f3fb33e1f3..228ecc51fbda0fd64168b315528c136ed1028125 100644 (file)
 **** xref:xlat/misc/config.adoc[Server Configuration]
 **** xref:xlat/misc/length.adoc[length]
 **** xref:xlat/misc/misc.adoc[Miscellaneous]
+**** xref:xlat/misc/pairs.print.adoc[pairs.print]
 **** xref:xlat/misc/rand.adoc[rand]
 
 *** xref:xlat/character.adoc[Single Letter Expansions]
index 3502fc3fc97cdf1d3ca63d9adbcc6305960806a5..c0cc5b849ed8fdb89b7eac6a1f46f1fd1dd3a66c 100644 (file)
@@ -11,6 +11,7 @@ which operate on inputs, and produce an output.
 | xref:xlat/misc/config.adoc[Server Configuration]  | Examine configuration items
 | xref:xlat/misc/length.adoc[length]               | Get the length of data
 | xref:xlat/misc/misc.adoc[Miscellaneous]          | Functions to execute regular expression search on string, using pattern.
+| xref:xlat/misc/pairs.adoc[pairs.print]           | print attributes with name and value.
 | xref:xlat/misc/rand.adoc[rand]                   | random integers
 |===
 
diff --git a/doc/antora/modules/reference/pages/xlat/misc/pairs.adoc b/doc/antora/modules/reference/pages/xlat/misc/pairs.adoc
new file mode 100644 (file)
index 0000000..296c0c2
--- /dev/null
@@ -0,0 +1,27 @@
+= %pairs.print(<list>.[*])
+
+Print attributes with name and value.
+
+.Return: _string_
+
+Note that there is no "parse string into pairs" function.  Instead,
+you can simply assign the string to a structural attribute (`group`,
+`tlv`, etc.) and the string will be parsed as assigning a value to a
+given attribute.
+
+.Example
+
+[source,unlang]
+----
+control.Tmp-String-0 := { "This is a string", "This is another one" }
+reply.Reply-Message := "Serialize output: %pairs.print('control.[*]')"
+----
+
+.Output
+
+```
+Serialize output: Tmp-String-0 = "\"This is a string\", Tmp-String-0 = \"This is another one\""
+```
+
+// Copyright (C) 2025 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
+// This documentation was developed by Network RADIUS SAS.