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

static int myaction(sdk_authreq_t *authreq, int value, const char
*string);
Following are the input parameters:
authreq A pointer to the authreq
value The Xvalue from the FSM table for this action if configured. If not, 0 is passed in by
the Server.
string This parameter can have one of the following values:
The Xstring from FSM table if the AATV is configured in the FSM.
The Xstring from authfile if the AATV is configured to process an
authentication request.
If the Xstring parameter is not configured, NULL is passed.
The action function returns an event code. This event code determines the next action to be taken
in the FSM. Following are the two commonly used event codes:
AAA_EV_ACK Defined as 0. It indicates that the operation is successful.
AAA_EV_NAK Defined as 1. It indicates that the operation failed.
IMPORTANT: All common event codes and corresponding event names are defined in the sdk.h
header file. You can also define new event codes, for example, in scenarios where the AATV
action produces multiple results that need to be handled by an AATV separately. However, do not
use the sdk.h file to define new event codes. Instead, use the FSM file radius.fsm to define
new event codes. Use the following syntax to create new event codes:
% event event_name event_code
The new event codes and event names must not overlap with the ones defined in the sdk.h file.
To avoid event code or event name synchronization issues, use event codes that are larger than
500.
The timer or callback Function
The timer or callback function is called once a second to enable AATVs to perform the scheduled
work at regular intervals. However, if the server is blocked, the function may not be called for each
elapsed second. This function is typically used for periodic cleanup of any session information
saved by the AATV.
The timer function does not have any parameter; the function returns an event code. Following is
the prototype of the timer or callback function:
int mytimer();
The cleanup Function
The cleanup function is called when the HP-UX AAA Server terminates. This function is used to
perform tasks such as flushing out the last records to a file before closing that file and closing
sockets.
The cleanup function does not have any parameter and does not return a value. Following is the
prototype of the cleanup function:
void mycleanup();
Creating Plug-ins
You can create plug-ins using the following sample plug-ins:
/opt/aaa/examples/sdk/csi/checkCSI.c
/opt/aaa/examples/sdk/ace/samplesc.c
Creating Plug-ins 331