]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove & from the start of a line
authornolade <nola.aunger@inkbridge.io>
Thu, 13 Mar 2025 14:50:34 +0000 (10:50 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 15 Mar 2025 13:12:27 +0000 (15:12 +0200)
erl -p -i -e 's/^&//' $(git grep -lE '^&|[^&]&[a-zA-Z]' doc/antora/modules | egrep -v 'raddb|developers|interpreter.adoc|assets')

30 files changed:
doc/antora/modules/howto/pages/installation/upgrade.adoc
doc/antora/modules/howto/pages/modules/mschap/index.adoc
doc/antora/modules/reference/pages/type/cast.adoc
doc/antora/modules/reference/pages/unlang/attr.adoc
doc/antora/modules/reference/pages/unlang/edit.adoc
doc/antora/modules/reference/pages/unlang/expression.adoc
doc/antora/modules/reference/pages/unlang/foreach.adoc
doc/antora/modules/reference/pages/unlang/index.adoc
doc/antora/modules/reference/pages/unlang/load-balance.adoc
doc/antora/modules/reference/pages/unlang/redundant-load-balance.adoc
doc/antora/modules/reference/pages/unlang/redundant.adoc
doc/antora/modules/reference/pages/unlang/update.adoc
doc/antora/modules/reference/pages/xlat/alternation.adoc
doc/antora/modules/reference/pages/xlat/builtin.adoc
doc/antora/modules/reference/pages/xlat/concat.adoc
doc/antora/modules/reference/pages/xlat/conversion.adoc
doc/antora/modules/reference/pages/xlat/deprecated.adoc
doc/antora/modules/reference/pages/xlat/dict.adoc
doc/antora/modules/reference/pages/xlat/explode.adoc
doc/antora/modules/reference/pages/xlat/file.adoc
doc/antora/modules/reference/pages/xlat/function.adoc
doc/antora/modules/reference/pages/xlat/hash.adoc
doc/antora/modules/reference/pages/xlat/index.adoc
doc/antora/modules/reference/pages/xlat/lpad.adoc
doc/antora/modules/reference/pages/xlat/pairs.adoc
doc/antora/modules/reference/pages/xlat/protocol.adoc
doc/antora/modules/reference/pages/xlat/randstr.adoc
doc/antora/modules/reference/pages/xlat/rpad.adoc
doc/antora/modules/reference/pages/xlat/tolower.adoc
doc/antora/modules/reference/pages/xlat/toupper.adoc

index 14ce98536137204920b412870c78a302b08af678..8876fa64d885c579673b23a7fcd4abc94d1ad375 100644 (file)
@@ -606,13 +606,13 @@ operator does not work the same way as before.
 Instead of doing:
 
 ```
-&Reply-Message += "foo"
+Reply-Message += "foo"
 ```
 
 you should edit the `reply` list, using the `+=` operator:
 
 ```
-&reply += {
+reply += {
     &Reply-Message = "foo"
 }
 ```
@@ -633,7 +633,7 @@ update reply {
 In v4, you can remove the `update`, and rewrite the SQL call to:
 
 ```
-&reply.Framed-IP-Address := %sql("SELECT ...")
+reply.Framed-IP-Address := %sql("SELECT ...")
 ```
 
 Using double quotes everywhere means that every bit of data gets
@@ -824,7 +824,7 @@ The xref:reference:xlat/index.adoc[xlat] expansions just support math
 natively.  For example:
 
 ```
-&Reply-Message := "1 + 2 = %{1 + 2}"
+Reply-Message := "1 + 2 = %{1 + 2}"
 ```
 
 will return the string `1 + 2 = 3`.  The contents of the expansion can
@@ -856,7 +856,7 @@ The caching of group membership into attributes in the `control` list is
 still available, so
 
 ```
-&control.LDAP-Group[*] == "foo"
+control.LDAP-Group[*] == "foo"
 ```
 can also be used to test membership after having called the `ldap` module,
 if `cacheable_name` or `cacheable_dn` are enabled.
@@ -1144,7 +1144,7 @@ In v4, it is clearer, simpler, and faster to just use `unlang` syntax correctly.
 
 [source,unlang]
 ----
-&reply.Reply-Message := &User-Name
+reply.Reply-Message := &User-Name
 
 ...
 
index dbfb07390bfd850192ba36579e9f620e2578154e..cab033bed05c75f29e5de0e2d53ea6c90a1a8dd9 100644 (file)
@@ -121,7 +121,7 @@ bit in the `SMB-Account-Ctrl` value - for example::
 # U == user
 # e == expired
 
-&control.SMB-Account-Ctrl-Text := '[Ue]'
+control.SMB-Account-Ctrl-Text := '[Ue]'
 ```
 
 This will cause the client to receive `error 648 - password expired`.
index d8709586bd249245e362fc2a30dc0717b2807ece..a64876bd5dada4b7434efb455d5b6057172df144 100644 (file)
@@ -135,9 +135,9 @@ reply.
 .Example Copying Attributes
 [source,unlang]
 ----
-&control.Reply-Message := { "one", "two" }
+control.Reply-Message := { "one", "two" }
 
-&reply.Reply-Message := &control.Reply-Message[*]
+reply.Reply-Message := &control.Reply-Message[*]
 ----
 
 The following example will take an input string `"192.168.0.1"`, split
@@ -147,7 +147,7 @@ attribute, which each carry one octet of the IP address.
 
 .Example Creating multiple Attributes
 ----
-&Tmp-Integer-0 := %explode("192.168.0.1", '.')
+Tmp-Integer-0 := %explode("192.168.0.1", '.')
 ----
 
 If you need to cast an entire list to a value, then the value being
@@ -164,7 +164,7 @@ expansions] list.
 
 .Example Creating multiple Attributes
 ----
-&reply.Reply-Message := (string) (%explode("192.168.0.1", '.'))
+reply.Reply-Message := (string) (%explode("192.168.0.1", '.'))
 ----
 
 === Other Data Types
index d22eaff4c4aa81ac3fb27788579e3d6d1a39f44e..66a0526691e0e3f2be22d2760b8c5ff2a7e72393 100644 (file)
@@ -3,7 +3,7 @@
 .Syntax
 [source,unlang]
 ----
-&Attribute-Name
+Attribute-Name
 ----
 
 The `Attribute-Name` operator returns a reference to the named
@@ -19,8 +19,8 @@ the value of the named attribute.
 .Examples
 [source,unlang]
 ----
-&User-Name
-&NAS-IP-Address
+User-Name
+NAS-IP-Address
 ----
 
 == Lists
@@ -33,8 +33,8 @@ looks in the input packet list for the named attribute.
 
 [source,unlang]
 ----
-&request.User-Name
-&reply.NAS-IP-Address
+request.User-Name
+reply.NAS-IP-Address
 ----
 
 == Array References
@@ -42,7 +42,7 @@ looks in the input packet list for the named attribute.
 .Syntax
 [source,unlang]
 ----
-&Attribute-Name[<index>]
+Attribute-Name[<index>]
 ----
 
 When an attribute appears multiple times in a list, this syntax allows
@@ -59,8 +59,8 @@ protocols which have more than 1000 attributes.
 .Integer Array index
 [source,unlang]
 ----
-&EAP-Message[1]
-&reply.NAS-IP-Address[2]
+EAP-Message[1]
+reply.NAS-IP-Address[2]
 ----
 
 The `<index>` can also be a special value `n`, which means "the last attribute in the list.
@@ -68,7 +68,7 @@ The `<index>` can also be a special value `n`, which means "the last attribute i
 .Last attribute in a list
 [source,unlang]
 ----
-&EAP-Message[n]
+EAP-Message[n]
 ----
 
 The `<index>` can also be a reference to a numerical attribute.
@@ -82,9 +82,9 @@ The main utility of attribute indexes is in a xref:unlang/foreach.adoc[foreach]
 ----
 uint32 foo
 
-&foo = 2
+foo = 2
 
-&EAP-Message[&foo]
+EAP-Message[&foo]
 ----
 
 The `<index>` can also be an expression which is calculated at run time.  The expression _must_ not cause the server to call an external database, script, etc.  The main purpose of these expressions is to calculated an index without first placing it into another attribute.
@@ -96,9 +96,9 @@ The expression _must_ be in an expansion block: `%{...}`.
 .Expression as an Array index
 [source,unlang]
 ----
-&index = 0
+index = 0
 
-&EAP-Message[%{&index + 1}]
+EAP-Message[%{&index + 1}]
 ----
 
 === Array References in lists
@@ -110,7 +110,7 @@ attribute can be omitted, as follow:
 .Examples
 [source,unlang]
 ----
-&request.[0]
+request.[0]
 ----
 
 i.e. "the first child of the `request` list.
@@ -124,7 +124,7 @@ Note that the old syntax of `request[...]` is disallowed.
 .Syntax
 [source,unlang]
 ----
-&Attribute-Name.Attribute-Name
+Attribute-Name.Attribute-Name
 ----
 
 In some cases, attributes are nested or grouped.  The child reference
@@ -136,9 +136,9 @@ the name of another child attribute, separated by the `.` character.
 
 [source,unlang]
 ----
-&TLV-One.Child-one
-&TLV-One.Child-one.Child-Three
-&reply.TLV[3].Child-Two
+TLV-One.Child-one
+TLV-One.Child-one.Child-Three
+reply.TLV[3].Child-Two
 ----
 
 == Putting it All Together
@@ -148,8 +148,8 @@ All of the above syntaxes can be used interchangeably, at any nesting level.  Th
 .Examples
 [source,unlang]
 ----
-&TLV-One.Child-one[3].Child-Three
-&reply.TLV[3].Child-Two
+TLV-One.Child-one[3].Child-Three
+reply.TLV[3].Child-Two
 ----
 
 == Compatibility with Older Versions of FreeRADIUS
index 14defc9f8a50db78314138b1503442dec4557e03..04ae581f6d6b37c757d5f6adef7cedc7c5dd11ea 100644 (file)
@@ -8,15 +8,15 @@ attributes.
 .Syntax
 [source,unlang]
 ----
-&attribute := <expression>
-&attribute = <expression>
-&attribute += <expression>
-&attribute -= <expression>
+attribute := <expression>
+attribute = <expression>
+attribute += <expression>
+attribute -= <expression>
 ...
 
-&list1 := &list2
-&list1 += { &attribute = value, ... }
-&list1 += " attribute = value, ... "
+list1 := &list2
+list1 += { &attribute = value, ... }
+list1 += " attribute = value, ... "
 ...
 ----
 
@@ -97,7 +97,7 @@ retrieving data from a database.
 .Syntax
 [source,unlang]
 ----
-&<list> <op> <rhs>
+<list> <op> <rhs>
 ----
 
 List editing can be done for the usual xref:reference:unlang/list.adoc[lists] such as `request`,
@@ -166,7 +166,7 @@ assigning the empty list to the destination.
 ====
 [source,unlang]
 ----
-&reply := {}
+reply := {}
 ----
 ====
 
@@ -197,7 +197,7 @@ given.
 ====
 [source,unlang]
 ----
-&reply += {
+reply += {
        &Filter-Id = "foo"
 }
 ----
@@ -212,7 +212,7 @@ appended to the list.
 ====
 [source,unlang]
 ----
-&reply += &request.User-Name
+reply += &request.User-Name
 ----
 ====
 
@@ -227,7 +227,7 @@ overriding the contents of a list.
 ====
 [source,unlang]
 ----
-&reply := {
+reply := {
        &Filter-Id = "foo"
 }
 ----
@@ -244,7 +244,7 @@ Attributes can be removed from a list using the `-=` (remove) operator.
 ====
 [source,unlang]
 ----
-&reply -= &Filter-Id
+reply -= &Filter-Id
 ----
 ====
 
@@ -252,7 +252,7 @@ Attributes can be removed from a list using the `-=` (remove) operator.
 ====
 [source,unlang]
 ----
-&reply -= &Filter-Id[*]
+reply -= &Filter-Id[*]
 ----
 ====
 
@@ -260,7 +260,7 @@ Attributes can be removed from a list using the `-=` (remove) operator.
 ====
 [source,unlang]
 ----
-&reply -= {
+reply -= {
     &Filter-Id == "bar"
 }
 ----
@@ -295,7 +295,7 @@ copies all of the `request` list contents to the `reply` list.
 ====
 [source,unlang]
 ----
-&reply := &request
+reply := &request
 ----
 ====
 
@@ -303,7 +303,7 @@ copies all of the `request` list contents to the `reply` list.
 ====
 [source,unlang]
 ----
-&reply += &request
+reply += &request
 ----
 ====
 
@@ -321,7 +321,7 @@ is, `reply += "request.foo ..."` is not allowed.
 ====
 [source,unlang]
 ----
-&reply += "Filter-Id = 'foo'"
+reply += "Filter-Id = 'foo'"
 ----
 ====
 
@@ -332,7 +332,7 @@ The above example has the same result as the earlier example of adding
 ====
 [source,unlang]
 ----
-&reply += "sql("SELECT pairs FROM pair_table WHERE username = '%{User-Name}'")
+reply += "sql("SELECT pairs FROM pair_table WHERE username = '%{User-Name}'")
 ----
 ====
 
@@ -345,7 +345,7 @@ strings, such as `Filter-Id = "foo"`.
 .Syntax
 [source,unlang]
 ----
-&<attribute> <op> <rhs>
+<attribute> <op> <rhs>
 ----
 
 Attribute editing can be done for any
index 62e15039c170699b68982a70bdf38a563b3acb09..a4f1a952d3397034611d4552d6485fd5007dcb57 100644 (file)
@@ -17,7 +17,7 @@ Expressions can be used inside of xref:xlat/index.adoc[dynamic expansions], or i
 .Expression in an assignment
 [source,unlang]
 ----
-&NAS-Port = 1 + 2
+NAS-Port = 1 + 2
 ----
 
 == Operators in an Expression
@@ -62,7 +62,7 @@ supported.  For example:
 
 [source,unlang]
 ----
-&NAS-Port = 5 + (&User-Name == "bob")
+NAS-Port = 5 + (&User-Name == "bob")
 ----
 
 This expression will return `6` if the users name is `bob`, and `5` otherwise.
@@ -76,7 +76,7 @@ You can just put math in-place, as with the following example:
 
 [source,unlang]
 ----
-&Filter-Id = "Adding %{NAS-Port} + 4 = %{&NAS-Port + 4}"
+Filter-Id = "Adding %{NAS-Port} + 4 = %{&NAS-Port + 4}"
 ----
 
 The old ``%{expr:...}` syntax will return an error in v4.  That functiuonality is no longer supported.
@@ -93,7 +93,7 @@ data types.  (And incidentally, `-` is the inverse of `+`!)
 
 [source,unlang]
 ----
-&Reply-Message := "foo" + "bar"
+Reply-Message := "foo" + "bar"
 ----
 
 Will result in `Reply-Message == "foobar"`.
@@ -102,7 +102,7 @@ The suffix can then be "subtracted" off, with:
 
 [source,unlang]
 ----
-&Reply-Message -= "bar"
+Reply-Message -= "bar"
 ----
 
 Will result in `Reply-Message == "foo"` !.
@@ -130,7 +130,7 @@ syntax.  The old syntax of `<type>` is not accepted.
 
 [source,unlang]
 ----
-&NAS-Port-Id = (uint32) "%sql("SELECT...") + 4
+NAS-Port-Id = (uint32) "%sql("SELECT...") + 4
 ----
 
 == Errors
@@ -144,7 +144,7 @@ A `null` result can be removed via the `||` operator.  For example:
 
 [source,unlang]
 ----
-&NAS-Port-Id = (5 - "foo") || 6
+NAS-Port-Id = (5 - "foo") || 6
 ----
 
 Will return `6`, as the left side expression of the `||` operator evaluates to `null`.
index 4d11b2682276a4c5191b8826ea6573e0face08a9..16b99a82515bfa4f9eeb1ea70f80067cc5a6728e 100644 (file)
@@ -67,7 +67,7 @@ the execution of the loop.
 .Example of modifying values
 [source,unlang]
 ----
-&Tmp-Integer-0 := { 1, 3, 5, 11 }
+Tmp-Integer-0 := { 1, 3, 5, 11 }
 
 foreach self (&Tmp-Integer-0) {
        &self += 19
@@ -78,7 +78,7 @@ Once the loop has finished , the `Tmp-Integer-0` attribute will have the followi
 
 [source,unlang]
 ----
-&Tmp-Integer-0 := { 20, 22, 24, 30 }
+Tmp-Integer-0 := { 20, 22, 24, 30 }
 ----
 
 .Pseudocode for variable modification
@@ -102,7 +102,7 @@ For attributes, the `<key-type>` must be `string`.  For dynamic expansions, it m
 [source,unlang]
 ----
 string total
-&Tmp-Integer-0 := { 1, 3, 5, 11 }
+Tmp-Integer-0 := { 1, 3, 5, 11 }
 
 foreach string ref, uint32 self (Tmp-Integer-0) {
        total += ref
index c2a4c45ca2a386195f0f4f7bcbdc183e3f8f8978..1393217dbb3d58adc2799f306534be21fb9fc4e4 100644 (file)
@@ -84,8 +84,8 @@ policies to add attributes to requests, replies, or to other places.
 .Example
 [source,unlang]
 ----
-&reply.Session-Timeout := 3600
-&reply.Framed-IP-Address := 192.0.2.4
+reply.Session-Timeout := 3600
+reply.Framed-IP-Address := 192.0.2.4
 ----
 
 == Dynamic Expansions
@@ -101,7 +101,7 @@ attributes, databases, and scripts.
 .Example
 [source,unlang]
 ----
-&reply.Framed-IP-Address := %sql("SELECT static_ip from table WHERE user = '%{User-Name}'")
+reply.Framed-IP-Address := %sql("SELECT static_ip from table WHERE user = '%{User-Name}'")
 ----
 
 == Data Types
@@ -115,7 +115,7 @@ error.
 .Example
 [source,unlang]
 ----
-&reply += {
+reply += {
        &Framed-IP-Address = 192.0.2.4
        &Session-Timeout = 5
        &Reply-Message = "hello"
index 75b5db66e9ae2d9b9f2ba1af96d3f1ce9e70748d..971e227b79887cd3b40d8cdc3fbd7a3e9fb68226 100644 (file)
@@ -72,7 +72,7 @@ in a xref:xlat/index.adoc[dynamic expansion]:
 .Example of Load-Balance SQL module
 [source,unlang]
 ----
-&Reply-Message := %sql_all("SELECT message FROM table WHERE name='%{User-Name}'")
+Reply-Message := %sql_all("SELECT message FROM table WHERE name='%{User-Name}'")
 }
 ----
 
index 27a7a05f14c8145b17c6086eb09d0696db537a95..3487b8d1d0b33cfe9a5ad03e8ff81ce606cbbe70 100644 (file)
@@ -79,7 +79,7 @@ in a xref:xlat/index.adoc[dynamic expansion]:
 .Example of Redundant-Load-Balance SQL module
 [source,unlang]
 ----
-&Reply-Message := %sql_all("SELECT message FROM table WHERE name='%{User-Name}'")
+Reply-Message := %sql_all("SELECT message FROM table WHERE name='%{User-Name}'")
 }
 ----
 
index 4be5911117d4028ee1460f4b4b69d4f063ca121e..c38a48f5927af7a9ca8d53b29101941872c57090 100644 (file)
@@ -102,7 +102,7 @@ first run `%sql1(...)`, then if that fails, run `%sql2(...)`, etc.
 .Example of Redundant SQL module
 [source,unlang]
 ----
-&Reply-Message := %sql_all("SELECT message FROM table WHERE name='%{User-Name}'")
+Reply-Message := %sql_all("SELECT message FROM table WHERE name='%{User-Name}'")
 ----
 
 The one caveat here is that the arguments passed to the underlying
index d53dc3e68be2e3f050ed7f26463b3bf7e0f629c2..c500daf3cf9f6e3999df3dddbea8987715174af9 100644 (file)
@@ -49,7 +49,7 @@ This example should be converted to the following syntax:
 
 [source,unlang]
 ----
-&request += {
+request += {
        &User-Name = "foo"
        &Filter-Id = "bar"
        &NAS-IP-Address = 127.0.0.1
@@ -83,8 +83,8 @@ assign the attributes in place, with a list qualifier.
 
 [source,unlang]
 ----
-&request.User-Name := "foo"
-&request.Filter-Id := "bar"
+request.User-Name := "foo"
+request.Filter-Id := "bar"
 ----
 
 Note that the following conversion is _not_ correct, as it will
@@ -94,7 +94,7 @@ assigned to it.
 
 [source,unlang]
 ----
-&request := {
+request := {
        &User-Name = "foo"
        &Filter-Id = "bar"
 }
@@ -117,8 +117,8 @@ assign the attributes in place, with a list qualifier.
 
 [source,unlang]
 ----
-&request.User-Name = "foo"
-&request.Filter-Id = "bar"
+request.User-Name = "foo"
+request.Filter-Id = "bar"
 ----
 
 === Removing Attributes from a list: !*
@@ -136,7 +136,7 @@ The conversion is to use the `-=` operator:
 
 [source,unlang]
 ----
-&request -= &User-Name
+request -= &User-Name
 ----
 
 == More Complex Conversions
index aeac47e58ad9318786cca694712258b7339eec26..e584793db3a51d87f01c48f1a1d6e7da9de9b882 100644 (file)
@@ -8,13 +8,13 @@ in an expression.
 .Old Style - no longer supported
 [source,unlang]
 ----
-&Reply-Message := "Hello %{%{User-Name}:-none}"
+Reply-Message := "Hello %{%{User-Name}:-none}"
 ----
 
 .New Alternation
 [source,unlang]
 ----
-&Reply-Message := "Hello %{&User-Name || 'none'}"
+Reply-Message := "Hello %{&User-Name || 'none'}"
 ----
 
 This approach also means that nested alternation is no longer necessary:
@@ -22,13 +22,13 @@ This approach also means that nested alternation is no longer necessary:
 .Old Style - no longer supported
 [source,unlang]
 ----
-&Reply-Message := "Hello %{%{NAS-Identifer}:-%{%{User-Name}:-none}}"
+Reply-Message := "Hello %{%{NAS-Identifer}:-%{%{User-Name}:-none}}"
 ----
 
 .New Alternation
 [source,unlang]
 ----
-&Reply-Message := "Hello %{&NAS-Identifier || &User-Name || 'none'}"
+Reply-Message := "Hello %{&NAS-Identifier || &User-Name || 'none'}"
 ----
 
 [NOTE]
index 3567aa03e037fd82ea532fd004d963820f927b15..57cefa864462291a9d0e1765b8d1cd39738bacb6 100644 (file)
@@ -21,10 +21,10 @@ the attributes data as encoded "on the wire".
 ====
 [source,unlang]
 ----
-&Tmp-String-0 := "Caipirinha"
-&Framed-IP-Address := 192.0.2.1
+Tmp-String-0 := "Caipirinha"
+Framed-IP-Address := 192.0.2.1
 
-&reply += {
+reply += {
        &Reply-Message = "The length of %{control.Tmp-String-0} is %length(&control.Tmp-String-0)"
        &Reply-Message = "The length of %{control.Framed-IP-Address} is %length(&control.Framed-IP-Address)"
 }
@@ -47,7 +47,7 @@ Generate random number from `0` to `<number>-1`.
 ====
 [source,unlang]
 ----
-&reply.Reply-Message := "The random number is %rand(512}"
+reply.Reply-Message := "The random number is %rand(512}"
 ----
 
 .Output
@@ -136,7 +136,7 @@ if (&User-Name == "bob") {
     &request.Tmp-String-0 := "not bob!"
 }
 
-&reply.Reply-Message := "%eval(&request.Tmp-String-0}"
+reply.Reply-Message := "%eval(&request.Tmp-String-0}"
 ----
 
 .Output when `User-Name == bob`
@@ -163,7 +163,7 @@ With the current time at 16:18, `%nexttime(1h)` will expand to `2520`.
 
 [source,unlang]
 ----
-&reply.Reply-Message := "You should wait for %nexttime(1h)s"
+reply.Reply-Message := "You should wait for %nexttime(1h)s"
 ----
 
 .Output
@@ -182,8 +182,8 @@ Substitute text just as easily as it can match it, even using regex patterns.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "Caipirinha is a light and refreshing drink!"
-&reply.Reply-Message := "%sub(%{control.Tmp-String-0}, / /, ',')"
+control.Tmp-String-0 := "Caipirinha is a light and refreshing drink!"
+reply.Reply-Message := "%sub(%{control.Tmp-String-0}, / /, ',')"
 ----
 
 .Output
@@ -212,7 +212,7 @@ If no argument is passed, it returns the current time.  Otherwise if the argumen
 
 [source,unlang]
 ----
-&Acct-Start-Time := %time(now)
+Acct-Start-Time := %time(now)
 ----
 
 The current time can also be compared to a known date:
index 40a87bc1b373fc442b9040a4f7d417885a408b2f..520016e2d62c81f4dce6072a3a354400ab734e0d 100644 (file)
@@ -13,13 +13,13 @@ expanded string.  If you need to concatenate strings together in a policy, just
 
 [source,unlang]
 ----
-&control += {
+control += {
        &Tmp-String-0 = "aaa"
        &Tmp-String-0 = "bb"
        &Tmp-String-0 = "c"
 }
 
-&reply += {
+reply += {
     &Reply-Message = "%concat(%{control.Tmp-String-0[*]}, ', ')"
     &Reply-Message = "%concat(%{control.Tmp-String-0[*]}, ',')"
 }
@@ -37,9 +37,9 @@ aaa,bb,c
 ----
 string foo
 
-&foo += { "a", "c", "c", "d" } # abcd
+foo += { "a", "c", "c", "d" } # abcd
 
-&foo += &control.Tmp-String-0[*]
+foo += &control.Tmp-String-0[*]
 ----
 
 // Copyright (C) 2023 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
index c83746039f70659baf180afc6eeeb2edc580d77f..701a3e1918d3b75cbd37d872e5a680d881853c2b 100644 (file)
@@ -12,8 +12,8 @@ Encode a string using Base64.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "Caipirinha"
-&reply.Reply-Message := "The base64 of %{control.Tmp-String-0} is %base64.encode(%{control.Tmp-String-0})"
+control.Tmp-String-0 := "Caipirinha"
+reply.Reply-Message := "The base64 of %{control.Tmp-String-0} is %base64.encode(%{control.Tmp-String-0})"
 ----
 
 .Output
@@ -32,8 +32,8 @@ Decode a string previously encoded using Base64.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "Q2FpcGlyaW5oYQ=="
-&reply.Reply-Message := "The base64.decode of %{control.Tmp-String-0} is %base64.decode(%{control.Tmp-String-0})"
+control.Tmp-String-0 := "Q2FpcGlyaW5oYQ=="
+reply.Reply-Message := "The base64.decode of %{control.Tmp-String-0} is %base64.decode(%{control.Tmp-String-0})"
 ----
 
 .Output
@@ -52,8 +52,8 @@ Convert string to binary.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "10"
-&reply.Reply-Message := "The %{control.Tmp-String-0} in binary is %bin(%{control.Tmp-String-0})"
+control.Tmp-String-0 := "10"
+reply.Reply-Message := "The %{control.Tmp-String-0} in binary is %bin(%{control.Tmp-String-0})"
 ----
 
 .Output
@@ -72,8 +72,8 @@ Convert to hex.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "12345"
-&reply.Reply-Message := "The value of %{control.Tmp-String-0} in hex is %hex(%{control.Tmp-String-0})"
+control.Tmp-String-0 := "12345"
+reply.Reply-Message := "The value of %{control.Tmp-String-0} in hex is %hex(%{control.Tmp-String-0})"
 ----
 
 .Output
@@ -92,8 +92,8 @@ Quote URL special characters.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "http://example.org/"
-&reply += {
+control.Tmp-String-0 := "http://example.org/"
+reply += {
        &Reply-Message = "The urlquote of %{control.Tmp-String-0} is %urlquote(%{control.Tmp-String-0})"
 }
 ----
@@ -114,8 +114,8 @@ Unquote URL special characters.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "http%%3A%%2F%%2Fexample.org%%2F" # Attention for the double %.
-&reply += {
+control.Tmp-String-0 := "http%%3A%%2F%%2Fexample.org%%2F" # Attention for the double %.
+reply += {
        &Reply-Message = "The urlunquote of %{control.Tmp-String-0} is %urlunquote(%{control.Tmp-String-0})"
 }
 ----
index 4e66891ee99d1e63121dc6c3aa34dbe08c393727..b09f469759f7e06a5a29f977fffda87c98641cf4 100644 (file)
@@ -10,7 +10,7 @@ This expansion has been removed.  Instead, just use `%{ ... }`.
 
 [source,unlang]
 ----
-&reply.Reply-Message := "The 1 + 2 = %{1 + 2}"
+reply.Reply-Message := "The 1 + 2 = %{1 + 2}"
 ----
 
 == %integer(...)
@@ -19,7 +19,7 @@ This expansion has been removed.  Instead, just use `%{(integer) ...}` with math
 
 [source,unlang]
 ----
-&reply.Reply-Message := "Value of Service-Type is %{(integer) &Service-Type}"
+reply.Reply-Message := "Value of Service-Type is %{(integer) &Service-Type}"
 ----
 
 === +%pack(%{Attribute-Name}%{Attribute-Name}...)+
@@ -37,7 +37,7 @@ See also the `unpack` module, which is the inverse to `pack`.
 
 [source,unlang]
 ----
-&reply.Class := "%pack(%{reply.Framed-IP-Address}%{NAS-IP-Address}}"
+reply.Class := "%pack(%{reply.Framed-IP-Address}%{NAS-IP-Address}}"
 ----
 
 It is easier to just use casting and string append:
@@ -46,7 +46,7 @@ It is easier to just use casting and string append:
 
 [source,unlang]
 ----
-&reply.Class := (octets) &Framed-IP-Address + (octets) &NAS-IP-Address.
+reply.Class := (octets) &Framed-IP-Address + (octets) &NAS-IP-Address.
 ----
 
 == %string(...)
@@ -55,7 +55,7 @@ This expansion has been removed.  Instead, just use `%{(string) ...}` with an ex
 
 [source,unlang]
 ----
-&reply.Reply-Message := "The printable version of Class is %{(string) &Class}"
+reply.Reply-Message := "The printable version of Class is %{(string) &Class}"
 ----
 
 == %strlen( ... )
index 43d487bd227dddcd118f483180f5ac2989406fed..fde19d7052c74bda2ef243186ef67894d59f1b54 100644 (file)
@@ -18,13 +18,13 @@ expanded string.  If you need to concatenate strings together in a policy, just
 
 [source,unlang]
 ----
-&control += {
+control += {
        &Tmp-String-0 = "aaa"
        &Tmp-String-0 = "bb"
        &Tmp-String-0 = "c"
 }
 
-&reply += {
+reply += {
     &Reply-Message = "%concat(%{control.Tmp-String-0[*]}, ', ')"
     &Reply-Message = "%concat(%{control.Tmp-String-0[*]}, ',')"
 }
@@ -42,9 +42,9 @@ aaa,bb,c
 ----
 string foo
 
-&foo += { "a", "c", "c", "d" } # abcd
+foo += { "a", "c", "c", "d" } # abcd
 
-&foo += &control.Tmp-String-0[*]
+foo += &control.Tmp-String-0[*]
 ----
 
 == %explode(<&ref>, <delim>)
@@ -59,11 +59,11 @@ This expansion is the opposite of `%concat( ... )`.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "bob.toba@domain.com"
+control.Tmp-String-0 := "bob.toba@domain.com"
 
-&control.Tmp-String-1 := "%explode(&control.Tmp-String-0, '@')"
+control.Tmp-String-1 := "%explode(&control.Tmp-String-0, '@')"
 
-&reply.Reply-Message := "Welcome %{control.Tmp-String-1[0]}"
+reply.Reply-Message := "Welcome %{control.Tmp-String-1[0]}"
 ----
 
 .Output
@@ -82,9 +82,9 @@ Left-pad a string.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "123"
+control.Tmp-String-0 := "123"
 
-&reply.Reply-Message := "Maximum should be %lpad(%{control.Tmp-String-0}, 11, '0')"
+reply.Reply-Message := "Maximum should be %lpad(%{control.Tmp-String-0}, 11, '0')"
 ----
 
 .Output
@@ -103,9 +103,9 @@ Right-pad a string.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "123"
+control.Tmp-String-0 := "123"
 
-&reply.Reply-Message := "Maximum should be %rpad(%{control.Tmp-String-0}, 11, '0')"
+reply.Reply-Message := "Maximum should be %rpad(%{control.Tmp-String-0}, 11, '0')"
 ----
 
 .Output
@@ -124,8 +124,8 @@ Serialize attributes as comma-delimited string.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := { "This is a string", "This is another one" }
-&reply.Reply-Message := "Serialize output: %pairs(&control.[*])"
+control.Tmp-String-0 := { "This is a string", "This is another one" }
+reply.Reply-Message := "Serialize output: %pairs(&control.[*])"
 ----
 
 .Output
@@ -144,7 +144,7 @@ Get random string built from character classes.
 
 [source,unlang]
 ----
-&reply.Reply-Message := "The random string output is %randstr(aaaaaaaa}"
+reply.Reply-Message := "The random string output is %randstr(aaaaaaaa}"
 ----
 
 .Output
@@ -164,8 +164,8 @@ it. This definition is only available in version 2.1.10 and later.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "CAIPIRINHA"
-&reply.Reply-Message := "tolower of %{control.Tmp-String-0} is %tolower(%{control.Tmp-String-0})"
+control.Tmp-String-0 := "CAIPIRINHA"
+reply.Reply-Message := "tolower of %{control.Tmp-String-0} is %tolower(%{control.Tmp-String-0})"
 ----
 
 .Output
@@ -185,8 +185,8 @@ it. This definition is only available in version 2.1.10 and later.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "caipirinha"
-&reply.Reply-Message := "toupper of %{control.Tmp-String-0} is " + %toupper(%{control.Tmp-String-0})
+control.Tmp-String-0 := "caipirinha"
+reply.Reply-Message := "toupper of %{control.Tmp-String-0} is " + %toupper(%{control.Tmp-String-0})
 ----
 
 .Output
index b80ffd550f4870c7e3c22d74302f504fb007a2e4..8e48c55c35a1bb995851d9b16b38488532c6db7a 100644 (file)
@@ -10,11 +10,11 @@ This expansion is the inverse of xref:xlat/concat.adoc[concat].
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "bob.toba@domain.com"
+control.Tmp-String-0 := "bob.toba@domain.com"
 
-&control.Tmp-String-1 := "%explode(&control.Tmp-String-0, '@')"
+control.Tmp-String-1 := "%explode(&control.Tmp-String-0, '@')"
 
-&reply.Reply-Message := "Welcome %{control.Tmp-String-1[0]}"
+reply.Reply-Message := "Welcome %{control.Tmp-String-1[0]}"
 ----
 
 .Output
index b28ee1516273eb0ab5008992c0f34446526eddc6..0bf791fb8edc5507e950aab94346a0357eecb6eb 100644 (file)
@@ -20,7 +20,7 @@ The returned filename is guaranteed to be safe to use.  Any portion of the filen
 ====
 [source,unlang]
 ----
-&filename = "${logdir}/" + %file.escape(%{User-Name})
+filename = "${logdir}/" + %file.escape(%{User-Name})
 
 %exec("/bin/rm", %{filename})
 ----
@@ -55,7 +55,7 @@ This function returns the first line of the file.  If the file does not exist, o
 ----
 string line
 
-&line := %file.head("/var/log/radius.log")
+line := %file.head("/var/log/radius.log")
 ----
 ====
 
@@ -105,9 +105,9 @@ The function takes an optional second argument, which is the number of lines whi
 ----
 string line
 
-&line := %file.tail("/var/log/radius.log")
+line := %file.tail("/var/log/radius.log")
 
-&line := %file.tail("/var/log/radius.log", 2)
+line := %file.tail("/var/log/radius.log", 2)
 ----
 ====
 
index 74e9dd068d0cc73770231775bc256bc071e166d0..e46236a632a465ffe34b71306a645f85ba79d49f 100644 (file)
@@ -35,7 +35,7 @@ if (&User-Name == %md5(&NAS-Identifier)) {
 .Examples
 [source,unlang]
 ----
-&reply.Reply-Message := %sql(SELECT name FROM mytable WHERE username = %{User-Name})
+reply.Reply-Message := %sql(SELECT name FROM mytable WHERE username = %{User-Name})
 ----
 
 // Copyright (C) 2023 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
index dcc935e12bca03a822ebd895af60703bc8a0d96d..59b442d8ecf81de8a3ab50ec75ebb63b657db03a 100644 (file)
@@ -16,11 +16,11 @@ Generate `HMAC-MD5` of string.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "mykey"
-&control.Tmp-String-1 := "Caipirinha"
-&reply.control.Tmp-Octets-0 := "%hmacmd5(%{control.Tmp-String-0} %{control.Tmp-String-1})"
+control.Tmp-String-0 := "mykey"
+control.Tmp-String-1 := "Caipirinha"
+reply.control.Tmp-Octets-0 := "%hmacmd5(%{control.Tmp-String-0} %{control.Tmp-String-1})"
 
-&reply += {
+reply += {
     &Reply-Message = "The HMAC-MD5 of %{control.Tmp-String-1} in octets is %{control.Tmp-Octets-0}"
     &Reply-Message = "The HMAC-MD5 of %{control.Tmp-String-1} in hex is %hex(control.Tmp-Octets-0)"
 }
@@ -43,11 +43,11 @@ Generate `HMAC-SHA1` of string.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "mykey"
-&control.Tmp-String-1 := "Caipirinha"
-&control.Tmp-Octets-0 := "%hmacsha1(%{control.Tmp-String-0}, %{control.Tmp-String-1})"
+control.Tmp-String-0 := "mykey"
+control.Tmp-String-1 := "Caipirinha"
+control.Tmp-Octets-0 := "%hmacsha1(%{control.Tmp-String-0}, %{control.Tmp-String-1})"
 
-&reply += {
+reply += {
     &Reply-Message = "The HMAC-SHA1 of %{control.Tmp-String-1} in octets is %{control.Tmp-Octets-0}"
     &Reply-Message = "The HMAC-SHA1 of %{control.Tmp-String-1} in hex is %hex(control.Tmp-Octets-0}"
 }
@@ -71,8 +71,8 @@ result is binary data.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "Caipirinha"
-&reply += {
+control.Tmp-String-0 := "Caipirinha"
+reply += {
     &Reply-Message = "md5 of %{control.Tmp-String-0} is octal=%md5(%{control.Tmp-String-0})"
     &Reply-Message = "md5 of %{control.Tmp-String-0} is hex=%hex(%md5(%{control.Tmp-String-0}))"
 }
@@ -119,8 +119,8 @@ families of digest functions.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "Caipirinha"
-&reply += {
+control.Tmp-String-0 := "Caipirinha"
+reply += {
     &Reply-Message = "The md5 of %{control.Tmp-String-0} in octal is %md5(%{control.Tmp-String-0}}"
     &Reply-Message = "The md5 of %{control.Tmp-String-0} in hex is %hex(%md5(%{control.Tmp-String-0}}}"
 }
index 6b209ebf326fa299133113a3c1ca2042abd9d326..90bb1b9ad06423c4d033df30e167f6121a2ee7bd 100644 (file)
@@ -48,7 +48,7 @@ information.
 
 [source,unlang]
 ----
-&Reply-Message := "%{User-Name} with a literal %%"
+Reply-Message := "%{User-Name} with a literal %%"
 ----
 
 // Copyright (C) 2021 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
index e793fa6aa3da34ce509b6dae5624fab34f88dfbf..e4d194603ba1303d244875089349d726314525cd 100644 (file)
@@ -8,9 +8,9 @@ Left-pad a string.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "123"
+control.Tmp-String-0 := "123"
 
-&reply.Reply-Message := "Maximum should be %lpad(%{control.Tmp-String-0}, 11, '0')"
+reply.Reply-Message := "Maximum should be %lpad(%{control.Tmp-String-0}, 11, '0')"
 ----
 
 .Output
index 72c7df637836161f5defddde3e5e9e6f57dca77c..87bebe5e095f74c595ee76b0bf59b6d6110288aa 100644 (file)
@@ -10,8 +10,8 @@ Note that there is no "convert string to pairs" function.  Instead, you can simp
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := { "This is a string", "This is another one" }
-&reply.Reply-Message := "Serialize output: %pairs(&control.[*])"
+control.Tmp-String-0 := { "This is a string", "This is another one" }
+reply.Reply-Message := "Serialize output: %pairs(&control.[*])"
 ----
 
 .Output
index 1ff671b2494839ab14d13c7ab9d80525525c8bd2..dfbf48b6e6767c6e29179f3fb46a8d66d522c327 100644 (file)
@@ -50,8 +50,8 @@ It returns the number of attributes which were decoded.
 .Output
 
 ```
-&Relay-Agent-Information.Circuit-Id = 0xabcdef, &Relay-Agent-Information.Remote-Id = 0x010203040506
-&User-Name = "ABCD"
+Relay-Agent-Information.Circuit-Id = 0xabcdef, &Relay-Agent-Information.Remote-Id = 0x010203040506
+User-Name = "ABCD"
 ```
 
 == %PROTO.encode(_list_)
@@ -71,7 +71,7 @@ It returns the raw encoded data
 ----
 %dhcpv4.encode("&Relay-Agent-Information.Circuit-Id = 0xabcdef, &Relay-Agent-Information.Remote-Id = 0x010203040506")
 %radius.encode("&User-Name = 'ABCD'")
-&Tmp-Octets-1 := %dhcpv4.encode(&request.Relay-Agent-Information.[*])
+Tmp-Octets-1 := %dhcpv4.encode(&request.Relay-Agent-Information.[*])
 ----
 
 .Output
index b65f2e5aa57e480656670aaa5c4121ad6d39a659..f3c784b1f1dee9876b570cd7a59729cc4480e630 100644 (file)
@@ -32,7 +32,7 @@ There is no `h` for "hex".  Instead, use `b` to create binary data, followed by
 
 [source,unlang]
 ----
-&reply.Reply-Message := "The random string output is %randstr(8a)"
+reply.Reply-Message := "The random string output is %randstr(8a)"
 ----
 
 .Output
index 2c11bb9261c62de362fe63b82f9d832d89a9b8d6..8e20957100e18c58acb9c39433abf694124b0f05 100644 (file)
@@ -8,9 +8,9 @@ Right-pad a string.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "123"
+control.Tmp-String-0 := "123"
 
-&reply.Reply-Message := "Maximum should be %rpad(%{control.Tmp-String-0}, 11, '0')"
+reply.Reply-Message := "Maximum should be %rpad(%{control.Tmp-String-0}, 11, '0')"
 ----
 
 .Output
index 1fac6f0d7fd7d8b1ec429c9cd9f8892788c66bdf..0991fc066f93574d5c4a1d3748a5fdb00d9aff48 100644 (file)
@@ -11,8 +11,8 @@ The lowercase operation is done using the current locale.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "CAIPIRINHA"
-&reply.Reply-Message := "tolower of %{control.Tmp-String-0} is %tolower(%{control.Tmp-String-0})"
+control.Tmp-String-0 := "CAIPIRINHA"
+reply.Reply-Message := "tolower of %{control.Tmp-String-0} is %tolower(%{control.Tmp-String-0})"
 ----
 
 .Output
index 50167a0e4e6491dca8c3d65169567d65dbf6e302..7a88d073f4881b21e6eb07924e2fdd405986feb5 100644 (file)
@@ -11,8 +11,8 @@ The uppercasecase operation is done using the current locale.
 
 [source,unlang]
 ----
-&control.Tmp-String-0 := "caipirinha"
-&reply.Reply-Message := "toupper of %{control.Tmp-String-0} is " + %toupper(%{control.Tmp-String-0})
+control.Tmp-String-0 := "caipirinha"
+reply.Reply-Message := "toupper of %{control.Tmp-String-0} is " + %toupper(%{control.Tmp-String-0})
 ----
 
 .Output