HP-UX SNAplus2 NOF Programmer's Guide

Writing NOF Applications
Description of the NOF API Entry Points
Chapter 2 95
The Callback Routine Specified on the nof_async
Entry Point
When using the asynchronous NOF API entry point, the application
must supply a pointer to a callback routine. SNAplus2 uses this callback
routine both for completion of a verb and also for returning NOF
indications. (The REGISTER_INDICATION_SINK verb is also issued as
an asynchronous verb that specifies a callback routine; the callback is
called each time the indication is received. For other NOF verbs, an
indication is received when the verb completes.) The application must
examine the
opcode
parameter in the VCB to determine which event is
contained in the callback routine.
This section describes how SNAplus2 uses the callback routine and the
functions that the callback routine must perform.
Callback Function
NOF_CALLBACK (*comp_proc);
typedef void (*NOF_CALLBACK) (
AP_UINT32 target_handle,
void * nofvcb,
AP_CORR corr
AP_UINT32 indic_length
);
typedef union ap_corr {
void * corr_p;
AP_UINT32 corr_l;
int corr_i;
} AP_CORR;
Supplied Parameters
SNAplus2 calls the callback routine with the following parameters:
target_handle
For NOF indications, SNAplus2 passes the target
handle that was supplied with the
REGISTER_INDICATION_SINK verb. For completion
of verbs, this parameter is undefined.
nofvcb
One of the following:
For NOF indications, a pointer to a VCB supplied
by SNAplus2.