Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rlm_expr(5) [debian man page]

rlm_expr(5)							 FreeRADIUS Module						       rlm_expr(5)

NAME
rlm_expr - FreeRADIUS Module DESCRIPTION
The rlm_expr module allows the server to perform limited mathematical calculations. This module is not called directly in any section, it is invoked through the dynamic expansion of strings. For example, some NAS boxes send a NAS-Port attribute which is a 32-bit number composed of port, card, and interface, all in different bytes. To see these attributes split into pieces, you can have an entry in the 'users' file like: DEFAULT Vendor-Interface = `%{expr: %{NAS-Port} / (256 * 256)}`, Vendor-Card = `%{expr: (%{NAS-Port} / 256) %% 256}`, Vendor-Port = `%{expr: %{NAS-Port} %% 256}` where the attributes Vendor-Interface, Vendor-Card, and Vendor-Port are attributes created by either you or a vendor-supplied dictionary. The methematical operators supported by the expression module are: + addition - subtraction / division %% modulo remainder * multiplication & boolean AND | boolean OR () grouping of sub-expressions NOTE: The modulo remainder operator is '%%', and not '%'. This is due to the '%' character being used as a special character for dynamic translation. NOTE: These operators do NOT have precedence. The parsing of the input string, and the calculation of the answer, is done strictly left to right. If you wish to order the expressions, you MUST group them into sub-expression, as shown in the previous example. All of the calculations are performed as unsigned 32-bit integers. CONFIGURATION
modules { ... expr { } ... } ... instantiate { ... expr ... } SECTIONS
instantiate FILES
/etc/raddb/radiusd.conf SEE ALSO
radiusd(8), radiusd.conf(5) AUTHOR
Chris Parker, cparker@segv.org 5 February 2004 rlm_expr(5)

Check Out this Related Man Page

rlm_detail(5)							 FreeRADIUS Module						     rlm_detail(5)

NAME
rlm_detail - FreeRADIUS Module DESCRIPTION
The rlm_detail module writes radius packets to 'detail' files. It is primarily used for storing accounting information, but can be used in other sections to write packet details as well. The file format is similar to that of the old Livingston servers, and many 'detail' file parsers should work with FreeRADIUS. The main configuration items to be aware of are: detailfile The file name in which to store the radius packet records. NOTE: this variable is run through dynamic string expansion, and can include FreeRADIUS variables to create a dynamic filename. %{radacctdir}/%{Client-IP-Address}/detail-%Y%m This will create one file per month, for each client. This accomplishes 'file rotation' automatically from within the server. detailperm The file permissions of the detailfile. If omitted, the default is 0600. dirperm The directory permissions of the directory where the detail files are created. The default is 0755. locking This option is set to 'yes' or 'no'. By default it is 'no'. Set this to yes to enable file locking, which is used with the 'radrelay' program. CONFIGURATION
modules { ... detail { detailfile = %A/%{Client-IP-Address}/detail-%Y%m detailperm = 0600 dirperm = 0755 locking = no } ... } ... accounting { ... detail ... } SECTIONS
authorization, accounting, pre_proxy, post_proxy, post_authentication FILES
/etc/raddb/radiusd.conf SEE ALSO
radiusd(8), radiusd.conf(5) AUTHORS
Chris Parker, cparker@segv.org 5 February 2004 rlm_detail(5)
Man Page