ispx_nsrvr_rqst -- query a local NetWare subnet for advertised network services


cc . . . -lsaprqsts

#include <netware/sap_srvcs.h>

int ispx_nsrvr_rqst(service_type, server_type, retries, delay, user_buffer, max_sis_cnt) int service_type; unsigned short server_type; int retries; int delay; char *user_buffer; int max_sis_cnt;


The ispx_nsrvr_rqst call performs a local query of a NetWare subnet for advertised network services. It is typically used by a client application for the general or selective querying of SAPD.

When called with a service_type of GENERAL_SERVICE_REQUEST, the function returns one of the following:

When called with a service_type of NEAREST_SERVICE_REQUEST, the function returns a one-element array containing the SAP_ID holding the nearest server of the type specified by server_type.

The caller should ensure that user_buffer is large enough to store all possible returned service entries. Consequently, the size of user_buffer should be a function of max_sis_cnt. If max_sis_cnt is exceeded, only max_sis_cnt service entries will be returned.

This function is now obsolescent and is included for purposes of maintaining backwards compatibility with previous releases. Developers are now encouraged to use the ispx_service_query call when writing new applications.

The arguments to this function are:


specifies a Novell object type.

specifies the number of retries. It must be less than or equal to MAX_RETRIES. It is recommended that MAX_RETRIES be used as the number of retries.

specifies the poll delay value. If retries is set to 0, the delay value will be set to MAX_DELAY. It is recommended that MAX_DELAY be used as the poll delay value.

specifies an address where the query results are to be returned. The user must ensure that the buffer is large enough to accept the largest response packet (IPX_MAX_DATA_SIZE).

specifies the maximum number of Server Information Structures to be returned. This number must be greater than or equal to 7.

Return values

On completion, the ispx_nsrvr_rqst call returns the length of the received data if successful or a value less than zero if unsuccessful. On failure, return values are interpreted as follows:

the TLI t_open of /dev/ipx failed.

the TLI t_bind call failed.

the SAP request type was invalid.

the TLI t_sndudata call failed and the SAP request was not transmitted.

the poll call failed. The ispx_nsrvr_rqst function polls the connection end-point until all responses have been processed.

the TLI t_rcvudata call failed.

the TLI t_unbind call failed.

the TLI t_close call failed.

the name could not be resolved, that is, an address matching the specified name could not be found.

an invalid number of Server Information Structures were specified. The number must be greater than or equal to 7. Note that the user must ensure that the buffer specified is large enough to accommodate the specified number of structures.

See also

ispx_advertise(SAPD), ispx_get_address(SAPD), ispx_service_query(SAPD)

Standards conformance

ispx_nsrvr_rqst is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003