ispx_get_address(SAPD)
ispx_get_address --
determine the IPX address of a given named server
Syntax
cc . . . -lsaprqsts
#include <netware/sap_srvcs.h>
int ispx_get_address(server_name, server_type, adrs_ptr, adrs_cnt)
char *server_name;
uint8 server_type;
ipxAddr_t *adrs_ptr;
int adrs_cnt;
Description
Given a server name, the ispx_get_address call
determines and returns a list of IPX addresses
corresponding to the named server. The number of addresses
returned is limited by adrs_cnt.
Because this function returns no more than
the specified number of addresses,
a client application must
allocate a large enough buffer to accept the addresses.
Specifically, the size of the address buffer
should be at least as large as the product of
adrs_cnt and the size of ipxAddr_t.
The arguments to this function are:
server_name-
specifies the server name.
server_type-
specifies a Novell object type.
adrs_ptr-
specifies a buffer where the service addresses are
to be returned on successful completion.
adrs_cnt-
specifies the maximum number of addresses to be returned.
Return values
On completion,
the ispx_get_address call
returns the number of addresses 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 hence, the
SAP request was not transmitted.
[POLL_FAILED]-
the poll call failed.
The ispx_service_query 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.
[MALLOC_FAILED]-
the
buffers required by the library cannot be allocated.
[REALLOC_FAILED]-
the call
to dynamically allocate a
larger data buffer for the library failed.
(This can happen when a buffer previously allocated
by the library is insufficient to hold all of the
allocated data).
See also
ispx_advertise(SAPD),
ispx_nsrvr_rqst(SAPD),
ispx_service_query(SAPD)
Standards conformance
ispx_get_address 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