HP-UX AAA Server A.08.02.10 Administrator's Guide HP-UX 11i v3 (T1428-90093, November 2013)

NOTE: In the above example, few entries have wild card “*” code configured which would
match any error codes. This can be replaced with the explicit values that database returns. In case
RET is configured to ACK and DBR entry matches the same, then all the mapping entries of the
current mapping would be skipped and the next SQL mapping, if configured, would be executed
whereas for other return events it would return from the SQL action.
Global Definitions
Global definitions are placed anywhere in the sqlaccess.config file, but outside the DBID
and SQLAction data structures. They allow you to set up the path to custom mapping and
conversion functions.
The syntax is as follows:
[SQLMapConvLibs [path_to_lib:path_to_lib::path_to_lib]]
Where:
path_to_lib Define the list of libraries containing mapping and conversion functions with
full path name.
Advanced SQL Mapping Configuration
This section covers the following advanced SQL Access topics:
“Developing Custom Functions” (page 270): to extend the functionality of the AAA Server
utilizing the flexible design of the SQL Access feature;
“Null SQL Statements” (page 271): for SQL statements without mapping or SQL statements;
“Time Synchronization” (page 271): to synchronize across multiple AAA Servers;
“Finite State Table Configuration in the FSM” (page 272): to enable SQL action execution for
complex database interactions or function execution;
“Stored Procedures” (page 272): to use stored procedures in the database.
Developing Custom Functions
You can define your own mapping and conversion functions, which must reside in libraries that
are located at the paths configured in the SQLMapConvLibs setting of the global definition in the
sqlaccess.config file.Ensure that the names of the custom functions do not conflict with the
names of any other pre-defined or customized functions.
HP suggests that you use a unique prefix for your custom functions.
Mapping functions use the following prototype:
int32 mappingfunction (void *radrequest, void *data, uint *len)
Where:
radrequest Pointer to the RADIUS request currently processed.
data For source mapping: Address where to store the result.
For target mapping: Address from where to copy data.
len For source mapping: Address of the maximum permissible length for the data
buffer. The function returns the actual length of data copied to target buffer.
For target mapping: Address of actual length of data in the data buffer.
Return Values Custom or pre-defined event code. See “Event Names (page 293) for more
information on pre-defined event codes.
Conversion functions use the following prototype:
270 SQL Access