OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

tpunadvertise - Unadvertise a service name

Format

ANSI C, C++

#include <xatmi.h>
int   tpunadvertise (char *svcname)

K&R C

#include <xatmi.h>
int   tpunadvertise (svcname)
char    *svcname;

Description

The function tpunadvertise() allows a server to unadvertise a service that it offers. By default, a server's services are advertised when it is booted and they are unadvertised when it is shutdown.

The function tpunadvertise() removes svcname as an advertised service for the server. The argument svcname cannot be NULL or the NULL string (""). Also, svcname should be 15 characters or fewer. Longer names are accepted and truncated to 15 characters. Care should be taken such that truncated names do not match other service names.

<<Argument>>

<<svcname

Specify the name of the service.>>

Return value

tpunadvertise() returns -1 on error and sets tperrno to indicate the error condition.

Errors

Under the following conditions, tpunadvertise() fails and sets tperrno to one of the following values:

Return value Return value (numeric) Explanation
TPEINVAL 4 The argument svcname is NULL or the NULL string ("").
TPENOENT 6 The argument svcname is not currently advertised by the server.
TPEPROTO 9 tpunadvertise() was called in an improper context.
TPESYSTEM 12 A communication resource manager system error has occurred. The exact nature of the error is determined in a product-specific manner.
TPEOS 7 An operating system error has occurred. The exact nature of the error is determined in a product-specific manner.

See also

tpadvertise().

<<Notes on use with OpenTP1>>

  1. <<Suppose that load balancing is used on one node (multiserver configuration). When the function tpunadvertise() is called from one of the processes, the service becomes unavailable to all processes which undergo load balancing. When the tpadvertise() is later called to advertise the service, service requests from the processes can be accepted.>>
  2. <<Suppose that load balancing (internode load balancing facility and extended internode load-balancing facility) is used on multiple nodes. When the function tpunadvertise() is called from a process on a node, the service becomes unavailable on that node. However, the servers at other nodes can accept service requests. When the function tpadvertise() is later called to advertise the service, service requests are acceptable.>>
  3. <<The behavior caused by XATMI errors encountered during OSI TP communication may be different from the behavior caused by errors encountered conventional TCP/IP communication.>>