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

Table Of Contents
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
The following sections describe the working of these sample plug-ins, as well as
procedures to do the following tasks:
“Using AATVs to Create a Plug-in” (page 451)
“Compiling and Loading a Plug-in” (page 452)
“Testing and Debugging a Plug-in” (page 453)
450 Customizing the HP-UX AAA Server Using the SDK