HP-UX AAA Server A.08.02.10 Administrator's Guide HP-UX 11i v3 (T1428-90093, November 2013)
aatv_count is the number of AATVs that are loaded.
aatv_info_v2_t is the data structure containing the function pointer to the init(),
action(), timer(), and cleanup() functions. For more
information on the aatv_info_v2_t data structure, see “Header
Files, Data Structures, and APIs in the HP-UX AAA Server SDK”
(page 430).
4. Set the parameters of the aatv_info_v2_t data structure. Add them to aatv_list and
set the value of aatv_count.
NOTE: You can also add init (), timer (), and cleanup () functions, based on your
requirements. These functions are not used in this example, because the checkCSI AATV does
not use them.
Compiling and Loading a Plug-in
To compile and load a plug-in, complete the following steps:
NOTE: Before you start this procedure, ensure that the HP-UX AAA Server is not running.
1. Navigate to the /opt/aaa/examples/sdk/CSI directory.
2. Enter the following command:
# cc -I /opt/aaa/include -c +z checkCSI.c
3. Enter the following command to link the AATV with the libradlib file:
# ld -b -o checkCSI.so -L/opt/aaa/lib -lradlib checkCSI.o
4. Enter the following command to copy the compiled plug-in to the /opt/aaa/aatv/ directory:
# cp checkCSI. so /opt/aaa/aatv/
After copying the AATV to the /opt/aaa/aatv/ directory, you can configure the AATV
name in the authfile or in the FSM.
5. Start the radiusd daemon by entering the following command:
# /opt/aaa/bin/radiusd
6. To ensure that the AATV is loaded correctly, check the logfile for an entry similar to the
following:
read_dyn_cfg: Loaded shared object: <aatvname>, <No. of aatvs>
Testing and Debugging a Plug-in
You must test the software module before you start using it in a production environment. You can
use several different methods to debug any modules that you create. This section discusses testing
the software module using the GNU Project Debugger (gdb).
Using the GNU Project Debugger
HP recommends using gdb to debug software modules created using the HP-UX AAA Server SDK.
NOTE: To debug a software module with gdb, your program must be compiled with debug
information enabled (using the -g option).
Using gdb to Debug Your Software Module
To debug your software module using gdb, complete the following steps:
1. Determine the RADIUS server’s process ID by entering the following command:
# ps -ef | grep radiusd
2. End the RADIUS server process by entering the following command:
334 Customizing the HP-UX AAA Server Using the SDK