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

Table Of Contents
NOTE: Changing the function names is not mandatory. However, the parameters
must not be modified.
4. Register the AKA algorithm plug-ins.
1. If your plug-in includes more than one plug-in entry, modify the array size
accordingly. To modify the array size, change the value within
plugin_array[1] to the number of plug-ins to be written for this module.
2. Modify the plugin_load function in the following code:
aka_algo_plugin_info_t * aka_algo_info;
static const char func[] = "plugin_load";
a. Set the name of the plug-in in the following code to the required name:
aka_algo_info->name = "sample_aka_algo";
b. Set the description of the plug-in in the following code:
aka_algo_info->info = "Sample EAP-AKA algorithm plugin";
c. If the (f1impl, f1ximpl, f2impl, f3impl, f4impl, f5impl
and f5ximpl) function names are modified, make the corresponding
changes in the following code:
aka_algo_info->f1 = f1impl;
aka_algo_info->f1x = f1ximpl;
aka_algo_info->f2 = f2impl;
aka_algo_info->f3 = f3impl;
aka_algo_info->f4 = f4impl;
aka_algo_info->f5 = f5impl;
aka_algo_info->f5x = f5ximpl;
d. Enter the value of the plugin_array as described in the code. For
example, for the second plug-in, modify the code as follows:
plugin_array[1].type = AKA_ALGO;
plugin_array[1].info = (void *)aka_algo_info;
e. If there is more than one plug-in, complete the described steps for each of
them. Also, modify the value accordingly in the following code:
*plugin_count = 1;
5. To implement the sample f1() algorithm, modify the following code in the f1impl
function:
unsigned int idx;
for ( idx = 0; idx < 8; ++idx )
{
macs[idx] = 0;
}
return SDK_SUCCESS;
458 Customizing the HP-UX AAA Server Using the SDK