HP-UX SNAplus2 R7 APPC Programmer's Guide
TP Server Verbs
UNREGISTER_TP_SERVER
typedef void (*AP_NOTIFY_CB) (
unsigned char reason,
unsigned char attach_id[8],
AP_CORR app_corr
);
typedef union ap_corr {
void * corr_p;
AP_UINT32 corr_l;
AP_INT32 corr_i;
} AP_CORR;
SNAplus2 calls the routine with the following parameters:
reason
Type of notification. Possible values are:
AP_ATTACH
An Attach has arrived for a TP registered by this TP server. In this case, the attach_id parameter is
passed into the notification callback because the arrival of an Attach is used to do one or more of
the following:
• Optionally query for more information about automatically starting a TP
• Reject the Attach if necessary
• Identify which TP to automatically start for RECEIVE_ALLOCATE processing
AP_TP_FILE_CHANGE
The sna_tps TP configuration file has been modified.
attach_id
The ID of the attach, as returned by the attach notification callback.
app_corr
The correlator value supplied by the application. This value allows the application to correlate the returned
information with its other processing. The meaning of the correlator passed into the notification callback
depends on the notification type as indicated by the value of the reason flag:
• If reason is set to
AP_ATTACH
, the correlator is the correlator that was specified by the application on the
REGISTER_TP verb. This allows the application to correlate the Attach with the correct registered TP.
• If reason is set to
AP_TP_FILE_CHANGE, the correlator is the value of the tps_id parameter on the
REGISTER_TP_SERVER verb.
The callback routine need not use all of these parameters. It may perform all the necessary processing on the
returned VCB, or it may simply set a variable to inform the main program that the verb has completed.
5.2 UNREGISTER_TP_SERVER
The UNREGISTER_TP_SERVER verb is used when an application no longer wishes to receive attach notifications.
5.2.1 VCB Structure: UNREGISTER_TP_SERVER
The definition of the VCB structure for the UNREGISTER_TP_SERVER verb is as follows:
252