1 .\" # DS - begin display
13 .TH rlm_expr 5 "5 February 2004" "" "FreeRADIUS Module"
15 rlm_expr \- FreeRADIUS Module
17 The \fIrlm_expr\fP module allows the server to perform
18 limited mathematical calculations. This module is not called
19 directly in any section, it is invoked through the dynamic expansion
22 For example, some NAS boxes send a NAS-Port attribute
23 which is a 32-bit number composed of port, card, and interface, all in
24 different bytes. To see these attributes split into pieces, you can
25 have an entry in the 'users' file like:
30 Vendor-Interface = `%{expr: %{NAS-Port} / (256 * 256)}`,
32 Vendor-Card = `%{expr: (%{NAS-Port} / 256) %% 256}`,
34 Vendor-Port = `%{expr: %{NAS-Port} %% 256}`
38 where the attributes Vendor-Interface, Vendor-Card, and Vendor-Port
39 are attributes created by either you or a vendor-supplied
42 The methematical operators supported by the expression module are:
66 grouping of sub-expressions
68 NOTE: The modulo remainder operator is '%%', and not '%'. This
69 is due to the '%' character being used as a special character for
72 NOTE: These operators do NOT have precedence. The parsing
73 of the input string, and the calculation of the answer, is done
74 strictly left to right. If you wish to order the expressions, you
75 MUST group them into sub-expression, as shown in the previous
78 All of the calculations are performed as unsigned 32-bit integers.
106 .I /etc/raddb/radiusd.conf
112 Chris Parker, cparker@segv.org