Summary of all Built-in Functions
Attribute-Value Pair Manipulation
| Function | Description |
|---|---|
Print attributes to the debug output |
|
Mark attributes as immutable (cannot be changed) |
|
Print attribute name and value to string |
Data Conversion
| Function | Description |
|---|---|
Encode a string using Base64 |
|
Decode a Base64 string |
|
Convert string to binary |
|
Convert to hex |
|
Quote URL special characters |
|
Unquote URL special characters |
File Handling
| Function | Description |
|---|---|
Returns the contents of a file |
|
Returns an escaped or safe version of the input string |
|
Checks to see if a file exists on the filesystem |
|
Returns the first line of the file |
|
Create a directory on the filesystem |
|
Removes a file from the filesystem |
|
Removes a directory from the filesystem |
|
Returns the size of a file |
|
Return the last line of a file or the last number(n) of lines of a file |
|
Create a file if it does not already exist |
Hashing Functions
| Function | Description |
|---|---|
%hash.blake2b_512 |
BLAKE2b-512 |
%hash.blake2s_256 |
BLAKE2s-256 |
%hash.md4 |
MD4 |
%hash.md5 |
MD5 |
%hash.sha1 |
SHA1 |
%hash.sha224 |
SHA224 |
%hash.sha256 |
SHA256 |
%hash.sha384 |
SHA384 |
%hash.sha512 |
SHA512 |
%hash.sha2_224 |
SHA2-224 |
%hash.sha2_256 |
SHA2-256 |
%hash.sha2_384 |
SHA2-384 |
%hash.sha2_512 |
SHA2-512 |
%hash.sha3_224 |
SHA3-224 |
%hash.sha3_256 |
SHA3-256 |
%hash.sha3_384 |
SHA3-384 |
%hash.sha3_512 |
SHA3-512 |
HMAC Functions
| Function | Description |
|---|---|
Generate HMAC-MD5 of string |
|
Generate HMAC-SHA1 of string |
Interpreter State and Debugging
| Function | Description |
|---|---|
Dynamically change the debug level |
|
Current file being executed |
|
Line number in the current file |
|
Current module being executed |
|
Section processing the request |
|
Return current rcode ( |
|
Name of current virtual server |
|
Force rcode for a module |
|
Variable defined in a client definition |
Logging
| Function | Description |
|---|---|
Log message at DEBUG level |
|
Add new debug log destination to current request |
|
Log message at ERROR level |
|
Log message at INFO level |
|
Log message at WARN level |
Miscellaneous Functions
| Function | Description |
|---|---|
Examine server configuration items |
|
Evalute a string as an xlat expansion |
|
Get the length of data in octets |
|
Call a virtual module |
|
Generate random integers |
|
Perform regular expression search |
|
Generation of UUIDs |
Network Address Handling
| Function | Description |
|---|---|
Get the broadcast address from an IPv4 prefix |
|
Get the netmask from an IPv4 prefix |
Profiling Functions
| Function | Description |
|---|---|
Switch callgrind instrumentation on |
|
Switch callgrind instrumentation off |
|
Write a callgrind profile dump, then zero the costs |
|
Zero the callgrind costs without writing a dump |
|
Start the gperftools CPU profiler, writing samples to a file |
|
Write buffered gperftools samples, then stop the profiler |
|
Write buffered gperftools samples and keep the profiler running |
Protocol Encoding and Decoding
| Function | Description |
|---|---|
Decodes as the named protocol |
|
Encodes as the named protocol |
String Manipulation
| Function | Description |
|---|---|
Concatenate strings with delimiters |
|
Split a string based on delimiters |
|
Returns the size of the data |
|
Left pad a string |
|
Right pad a string |
|
Return a random string based on input format |
|
Convert the input string to lowercase |
|
Convert the input string to uppercase |
Time Management
| Function | Description |
|---|---|
Single character expansions ( |
|
Generic (too complex) time function |
|
Is the system running in DST? |
|
Number of seconds until next hour, day, etc |
|
Return the current time |
|
Return UTC offset |
|
Return the time when the request was received |