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

Creating AKA Plug-ins
You can create a plug-in using one of the sample plug-ins as a base. The procedure and
the example described in this section use the checkCSI.c file to create a plug-in.
To create a plug-in using the sample_aka_algo.c file, which is available at /opt/
aaa/examples/sdk/aka_algo, complete the following steps:
1. Rename the sample_aka_algo.c file and open it for editing.
2. Include the following mandatory header files:
#include "sdk.h"
#include "plugin.h"
#include <syslog.h>
You can also add other header files that you require.
3. Change the (f1impl, f1ximpl, f2impl, f3impl, f4impl, f5impl and
f5ximpl) function names in the following prototypes, if required:
static int f1impl( const unsigned char * ki,
const unsigned char * rand,
const unsigned char * sqn,
const unsigned char * amf,
unsigned char * maca );
static int f1ximpl( const unsigned char * ki,
const unsigned char * rand,
const unsigned char * sqn,
const unsigned char * amf,
unsigned char * macs );
static int f2impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * res );
static int f3impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * ik );
static int f4impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * ck );
static int f5impl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * ak );
static int f5ximpl( const unsigned char * ki,
const unsigned char * rand,
unsigned char * ak );
448 Customizing the HP-UX AAA Server Using the SDK