HP-UX AAA Server A.08.02 Administrator's Guide

Example 12 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:
Idle-Timeout = 10
Session-Timeout = 90
Xvalue = 10
Results in:
An ACK event is returned to the FSM.
Attribute Specifications
You can use the following keywords to specify an attribute:
Attribute Names.
Vendor Names.
Attribute Instance Specifications.
308 Customizing the HP-UX AAA Server Using Policies