ispx_nsrvr_rqst(3sapd)
ispx_nsrvr_rqst --
query local NetWare subnet for advertised network services
Synopsis
cc ... -lsaprqsts
#include <netware/sap_srvcs.h>
int ispx_nsrvr_rqst(int service_type, unsigned short server_type,
int retries, int delay, char
user_buffer, int max_sis_cnt);
Description
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:
-
an array of SAP_IDs for all servers of all types
-
an array of SAP_IDs for all servers of the type specified by
server_type
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(3sapd)
call when writing new applications.
Parameters
The arguments to this function are:
- service_type
-
specifies either NEAREST_SERVER_REQUEST or
GENERAL_SERVICE_REQUEST
- server_type
-
specifies an object type
- retries
-
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)
- delay
-
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)
- user_buffer
-
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)
- max_sis_cnt
-
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:
- [IPXDEV_OPEN_FAILED]
-
the TLI t_open of /dev/ipx failed
- [T_BIND_FAILED]
-
the TLI t_bind call failed
- [INVALID_SERVICE_TYPE]
-
the SAP request type was invalid
- [T_SNDUDATA_FAILED]
-
the TLI t_sndudata call failed and the SAP
request was not transmitted
- [POLL_FAILED]
-
the poll call failed; the ispx_nsrvr_rqst function
polls the connection end-point until all responses have been processed
- [T_RCVUDATA_FAILED]
-
the TLI t_rcvudata call failed
- [T_UNBIND_FAILED]
-
the TLI t_unbind call failed
- [T_CLOSE_FAILED]
-
the TLI t_close call failed
- [NAME_UNRESOLVED]
-
the name could not be resolved, that is, an address matching the specified
name could not be found
- [INVALID_SIS_CNT]
-
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
References
ispx_advertise(3sapd),
ispx_get_address(3sapd),
ispx_service_query(3sapd)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.