ispx_advertise(3sapd)
ispx_advertise --
advertise and unadvertise a network service provider
Synopsis
cc ... -lsaprqsts
#include <netware/sap_srvcs.h>
int ispx_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.
Parameters
The arguments to this function are:
- server_name
-
specifies the name of the server to advertise or unadvertise
- server_type
-
specifies an 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
References
ispx_get_address(3sapd),
ispx_nsrvr_rqst(3sapd),
ispx_service_query(3sapd)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.