HP-UX AAA Server A.08.01 administrator's guide (T1428-90072, May 2010)

Table Of Contents
Example 27-2 Examples Illustrating the Use of the if Command
Example 1
The following if statement:
if ( Session-Limit[1] < 30 )
{
modify Session-Limit[1] = 30
}
else
{
if ( Session-Limit[1] > 240 )
{
modify Session-Limit[1] = 240
}
}
With the following input:
Session-Limit[0] = 10
Session-Limit[1] = 300
Results in:
Session-Limit[0] = 10
Session-Limit[1] = 240
Example 2
The following if statement:
if ( (NAS-IP-Address = "192.168.1.2") &&
((NAS-Identifier = .jack.) || (Port-Limit > 20)))
{
exit "NAK"
}
With the following input:
NAS-IP-Address = 192.168.1.2
NAS-Identifier = fred
Port-Limit = 23
Results in:
A NAK event is returned to the FSM. Depending on the FSM, the request may be
rejected.
Example 3
The following if statement:
if( Idle-Timeout * 10 = Session-Timeout + Xvalue ) {
exit "ACK"
}
With the following input:
Defining a Policy in a Decision File 421