ispx_nsrvr_rqst(SAPD)
ispx_nsrvr_rqst --
query a local NetWare subnet for advertised network services
Syntax
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;
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
call when writing new applications.
The arguments to this function are:
service_type-
specifies either NEAREST_SERVER_REQUEST or
GENERAL_SERVICE_REQUEST.
server_type-
specifies a Novell 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.
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