Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX SNAplus2 NOF Programmers Guide: HP-UX 11i > Chapter 4 NOF API Verbs (QUERY Verbs)

QUERY_AVAILABLE_TP

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

QUERY_AVAILABLE_TP returns information about active invokable TPs (APPC applications that have issued the RECEIVE_ALLOCATE verb, or CPI-C applications that have issued the Accept_Conversation or Accept_Incoming call). This verb can be used to obtain information about a specific TP or about multiple TPs, depending on the options used. This verb returns information about all such TPs that are running, whether or not they currently have an APPC verb or CPI-C call outstanding to accept a new incoming conversation.

This verb must be issued to a running node.

VCB Structure

typedef struct query_available_tp
{
AP_UINT16 opcode; /* Verb operation code */
unsigned char reserv2; /* reserved */
unsigned char format; /* reserved */
AP_UINT16 primary_rc; /* Primary return code */
AP_UINT32 secondary_rc; /* Secondary return code */
unsigned char *buf_ptr; /* pointer to buffer */
AP_UINT32 buf_size; /* buffer size */
AP_UINT32 total_buf_size; /* total buffer size required */
AP_UINT16 num_entries; /* number of entries */
AP_UINT16 total_num_entries; /* total number of entries */
unsigned char list_options; /* listing options */
unsigned char reserv3; /* reserved */
unsigned char tp_name[64]; /* TP name */
unsigned char system_name[64]; /* computer name where TP is */
/* running */
} QUERY_AVAILABLE_TP;
typedef struct available_tp_data
{
AP_UINT16 overlay_size; /* size of returned entry */
unsigned char tp_name[64]; /* TP name */
unsigned char system_name[64]; /* computer name where TP is */
/* running */
} AVAILABLE_TP_DATA;

Supplied Parameters

The application supplies the following parameters:

opcode

AP_QUERY_AVAILABLE_TP

overlay_size

For compatability with future releases of SNAplus2, your application must use this field to determine the exact length of the overlay structure returned, and should not rely on the use of the sizeof()function.

buf_ptr

A pointer to a data buffer that SNAplus2 will use to return the requested information.

buf_size

Size of the supplied data buffer.

num_entries

Maximum number of TPs for which data should be returned. To request data for a specific TP rather than a range, specify the value 1. To return as many entries as possible, specify zero; in this case, SNAplus2 will return the maximum number of entries that can be accommodated in the supplied data buffer.

list_options

The position in the list of TPs from which SNAplus2 should begin to return data. Possible values are:

AP_FIRST_IN_LIST

Start at the first entry in the list.

AP_LIST_INCLUSIVE

Start at the entry specified by the combination of TP name and system name.

AP_LIST_FROM_NEXT

Start at the entry immediately following the entry specified by the combination of TP name and system name.

For more information about how the list is ordered and how the application can obtain specific entries from it, see “List Options For QUERY_* Verbs”.

tp_name

TP name. This is a 64-byte string, padded on the right with spaces if the name is shorter than 64 characters. This value is ignored if list_options is set to AP_FIRST_IN_LIST.

system_name

The computer name for which TP information is required. The system name is an ASCII string of 1-64 characters, which must match a SNAplus2 computer name. This value is ignored if list_options is set to AP_FIRST_IN_LIST.

For the standalone version of SNAplus2, there is no need to specify the computer name (it can be left as all binary zeros). For the client-server version, specify the computer name to list only TPs on the specified computer, or leave it as all binary zeros to list TPs on all computers.

Returned Parameters: Successful Execution

If the verb executes successfully, SNAplus2 returns the following parameters:

primary_rc

AP_OK

buf_size

Length of the information returned in the supplied buffer.

total_buf_size

Returned value indicating the size of buffer that would have been required to return all the list information requested. A value greater than buf_size indicates that not all the available entries were returned.

num_entries

Number of entries returned in the data buffer.

total_num_entries

Total number of entries available. A value greater than num_entries indicates that not all the available entries were returned.

Each entry in the data buffer consists of the following parameters:

available_tp_data.overlay_size

The size of the returned available_tp_data structure, and therefore the offset to the start of the next entry in the data buffer.

available_tp_data.tp_name

TP name. This is a 64-byte string, padded on the right with spaces if the name is shorter than 64 characters.

available_tp_data.system_name

Name of the computer where the TP is running.

Returned Parameters: Parameter Check

If the verb does not execute because of a parameter error, SNAplus2 returns the following parameters:

primary_rc

AP_PARAMETER_CHECK

secondary_rc

Possible values are:

AP_INVALID_LIST_OPTION

The list_options parameter was not set to a valid value.

AP_UNKNOWN_TP

The list_options parameter was set to AP_LIST_INCLUSIVE, to list all entries starting from the supplied name, but the tp_name parameter was not valid.

Appendix A “Common Return Codes” lists further secondary return codes associated with AP_PARAMETER_CHECK, which are common to all NOF verbs.

Returned Parameters: Other Conditions

Appendix A “Common Return Codes” lists further combinations of primary and secondary return codes that are common to all NOF verbs.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.