]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
clean up markup
authorAlan T. DeKok <aland@freeradius.org>
Sat, 30 Jul 2022 12:51:36 +0000 (08:51 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 30 Jul 2022 12:51:36 +0000 (08:51 -0400)
doc/antora/modules/reference/pages/type/cast.adoc

index 795826d685feaf8e7b796bcae5f2de34ddefe63c..e03e29998da73590f3ccc93f155abbf6c9672d50 100644 (file)
@@ -61,7 +61,7 @@ to use.  The cast syntax is used when either the data type is
 ambiguous, or when data should be normalized prior to comparison, or
 when a specific data type is required.
 
-=== Casting Behavior
+== Casting Behavior
 
 In general, casting data types of different sizes will fail.  For
 example, casting an `octet` string of length `3` to `uint32` is
@@ -71,7 +71,7 @@ However, in many cases casting from one data type will "just work".
 
 When the cast fails, the result is a `NULL` or empty value.
 
-==== IP Addresses
+=== IP Addresses
 
 Casting `ipv4addr` to `ipv6addr` will return an IPv6 address which
 contains the IPv4 address, with the upper bits as `::ffff`.  This
@@ -86,7 +86,7 @@ Casting an IPv4 address to an IPv4 prefix is allowed, and will return
 a prefix of using a `/32`.  Casting the other way is also allowed, but
 only if the prefix is `/32`.
 
-==== Numbers
+=== Numbers
 
 Numbers can generally be cast from one data type to another, if the
 input value can be represented in the new data type.
@@ -95,7 +95,7 @@ For example, casting `uint8` to `uint16` will always succeed.
 However, casting a signed `int8` to `uint16` may fail, as negative
 values cannot be represented in the `uint16` data type.
 
-==== Octets
+=== Octets
 
 Casting any data type to `octets` means returning the "raw" value of
 the underlying data type.  For example, casting an IPv4 address of
@@ -107,7 +107,7 @@ the raw value as that data type, generally as if the data had been
 received from the network.  For example, casting the `octets` string
 `0x7f000001` to `ipvaddr` will return the IPv4 address `127.0.0.1`.
 
-==== Strings
+=== Strings
 
 Casting any data type to `string` means _printing_ the data type to a
 string, and assigning the resulting value to the `string`.  For a
@@ -122,13 +122,13 @@ string as that data type.
 See xref:types/string/double.adoc[double-quoted strings] for examples
 of how double-quoted strings are used.
 
-==== Other Data Types
+=== Other Data Types
 
 Other data types such as `ethernet`, etc. can generally be cast
 to/from `octet`, and printed to/from `string`.  Most other casts do
 not make sense, and will not work.
 
-=== Expressions
+== Expressions
 
 Unlang xref:unlang/expression.adoc[expressions] can use casts, too, as
 in the following example:
@@ -163,10 +163,11 @@ hoc" data structures for sending in a packet:
 
 will result in the `octet` string value `0x010300047f000001`.
 
-=== Compatibility
+== Compatibility
 
 For compatibility with version 3, the `<cast>` syntax is also
 supported.  We recommend, however, that people use the new syntax.
+The old syntax will eventually be removed, and will create an error.
 
 // Copyright (C) 2021 Network RADIUS SAS.  Licenced under CC-by-NC 4.0.
 // Development of this documentation was sponsored by Network RADIUS SAS.