PURPOSE
tpchkauth - routine for checking if authentication
required to join an application
SYNOPSIS
#include <atmi.h>
int tpchkauth(void)
DESCRIPTION
tpchkauth() checks if authentication is required by the
application configuration. This is typically used by application
clients prior to calling tpinit(3c)
to determine if a password should be obtained from the user.
RETURN VALUES
tpchkauth() returns one of the following non-negative values
on success.
- TPNOAUTH
- indicates that no authentication is required.
- TPSYSAUTH
- indicates that system authentication only is required.
- TPAPPAUTH
- indicates that both system and application specific
authentication are required.
It returns -1 on error and sets tperrno to indicate
the error condition.
ERRORS
Under the following conditions, tpchkauth() fails and sets tperrno
to:
- [TPESYSTEM]
- A System/T error has occurred. The exact nature of the
error is written to a log file.
- [TPEOS]
- An operating system error has occurred.
INTEROPERABILITY
tpchkauth() and a non-NULL value for the TPINIT
typed buffer argument of tpinit() are available only on sites
running Release 4.2 or later.
PORTABILITY
The interfaces described in tpinit(3c) are supported on UNIX System and
MS-DOS operating systems. However, signal-based notification is
not supported on MS-DOS. If it is selected at tpinit() time, then
a userlog(3c) message
is generated and the method is automatically set to dip-in.
ENVIRONMENT VARIABLES
- WSENVFILE
- is used within tpinit() when invoked by a workstation
client. It indicates a file containing environment
variable settings that should be set in the caller's
environment. See compilation(5) for more details on
environment variable settings necessary for workstation
clients. Note that this file is processed only when
tpinit() is called and not before.
- WSNADDR
- is used within tpinit() when invoked by a workstation
client. It indicates the network address of the
workstation listener that is to be contacted for access
to the application. If the value for this parameter
begins with the characters ``0x'', then it is interpreted
as a string of hex-digits, otherwise it is interpreted as
ASCII characters. This variable is required for
workstation clients and ignored for native clients.
- WSDEVICE
- is used within tpinit() when invoked by a workstation
client. It indicates the device name to be used to access
the network. This variable is used by workstation clients
and ignored for native clients. Note that certain
supported transport level network interfaces do not
require a device name; for example, sockets and NetBIOS.
Workstation clients supported by such interfaces need not
specify WSDEVICE.
- WSTYPE
- is used within tpinit() when invoked by a workstation
client to negotiate encode/decode responsibilities with
the native site. This variable is optional for
workstation clients and ignored for native clients.
- WSRPLYMAX
- is used by tpinit() to set the maximum amount of core
memory that should be used for buffering application
replies before they are dumped to file. The default value
for this parameter varies with each instantiation. The
instantiation specific programmer's guide should be
consulted for further information.
WARNING
If signal-based notification is selected on the call to
tpinit() but is not available due to the operating system or user
id restrictions, then the user is automatically switched to
dip-in based notification and a warning userlog() message is
generated.
If signal-based notification is selected for a client, then
certain ATMI calls may fail, returning TPGOTSIG due to
receipt of an unsolicited message if TPSIGRSTRT is not
specified. See ubbconfig(5)
for more information on notification method selection.
SEE ALSO
tpinit(3c)