ispx_advertise(SAPD)
ispx_advertise --
advertise and unadvertise a network service provider
Syntax
cc . . . -lsaprqsts
#include <netware/sap_srvcs.h>
int ispx_advertise(server_name, server_type, server_socket, advertise)
char *server_name;
unsigned short server_type;
unsigned short server_socket;
int advertise;
Description
The ispx_advertise call
advertises or unadvertises
a network service provider.
A network server uses this function to advertise its:
-
name
-
object type (the type of service it provides)
-
socket number
A server needs to call this function periodically
(for example, once every minute)
in order to maintain SAPD's
knowledge about the services it provides.
If the server stops calling this function,
SAPD will time out and delete the
information about the service and the
server's entry within approximately three minutes.
When a server is about to be brought down,
it can explicitly unadvertise the services it provides by
calling this function with the advertise parameter set to zero.
However, this is not essential because the absence of periodic
broadcasts eventually results in SAPD deleting the server's
entry.
The arguments to this function are:
server_name-
specifies the name of the server to advertise or unadvertise.
server_type-
specifies a Novell object type.
server_socket-
specifies the socket number of the service provider
to advertise or unadvertise.
advertise-
if 1, advertises the specified service;
if 0, unadvertises the specified service.
Return values
On completion,
the ispx_advertise call
returns zero 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.
[T_UNBIND_FAILED]-
the TLI t_unbind call failed.
[T_CLOSE_FAILED]-
the TLI t_close call failed.
See also
ispx_get_address(SAPD),
ispx_nsrvr_rqst(SAPD),
ispx_service_query(SAPD)
Standards conformance
ispx_advertise 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