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

Return
Returns one of the following values:
0 If the message is logged.
1 If the message is queued.
-1 If the message is not logged or queued.
Asynchronous Event and I/O APIs
The HP-UX AAA Server maintains a global list of file descriptors and calls system functions, to
monitor file descriptors for inbound messages. Programmers writing a socket based AATV, or any
file descriptor-based AATV, can use the APIs discussed in this section, to register or unregister the
socket (or file descriptor) with the HP-UX AAA Server and schedule an event. This set of APIs can
also be used in a scenario where user profiles are stored in a repository that the HP-UX AAA Server
software does not recognize. You can write your action to communicate with the data store or an
intermediary application through a socket.
int sdk_pollfd_register()
int sdk_pollfd_register (int fd, callback_f callback)
Usage
Registers a file descriptor with the HP-UX AAA Server and supplies a callback function to the HP-UX
AAA Server. The socket descriptor and associated callback function are added to the global list
of file descriptors monitored by the server for inbound messages. The callback function is called
when data is received on the file descriptor.
Input
fd The file descriptor that must be registered.
callback The callback function that is called when data is received by the file descriptor. The
callback function takes the file descriptor as the argument and returns an event code.
Return
Returns one of the following values:
SDK_SUCCESS if the operation succeeds.
SDK_INVALID_ARG if the arguments are invalid.
SDK_FAILURE if the operation fails.
int sdk_pollfd_unregister()
int sdk_pollfd_unregister (int fd)
Usage
Unregisters a file descriptor with the HP-UX AAA Server. The HP-UX AAA Server does not monitor
the file descriptor for inbound messages once the file is unregistered.
Input
fd The file descriptor that needs to be unregistered.
Return
Returns one of the following values:
SDK_SUCCESS if the operation succeeds.
SDK_INVALID_ARG if the arguments are invalid.
SDK_FAILURE if the operation fails.
int sdk_schedule_event()
int sdk_schedule_event (sdk_authreq_t *authreq, char *aatv_name, int
event_code)
438 Header Files, Data Structures, and APIs in the HP-UX AAA Server SDK