xref: /illumos-gate/usr/src/man/man3nsl/t_errno.3nsl (revision 5e832498d1743a9c84b5f53b983c9f469290b34b)

Sun Microsystems, Inc. gratefully acknowledges The Open Group for
permission to reproduce portions of its copyrighted documentation.
Original documentation from The Open Group can be obtained online at
http://www.opengroup.org/bookstore/.

The Institute of Electrical and Electronics Engineers and The Open
Group, have given us permission to reprint portions of their
documentation.

In the following statement, the phrase ``this text'' refers to portions
of the system documentation.

Portions of this text are reprinted and reproduced in electronic form
in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
Standard for Information Technology -- Portable Operating System
Interface (POSIX), The Open Group Base Specifications Issue 6,
Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
Engineers, Inc and The Open Group. In the event of any discrepancy
between these versions and the original IEEE and The Open Group
Standard, the original IEEE and The Open Group Standard is the referee
document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html.

This notice shall appear on any product containing this material.

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]


Portions Copyright 1989 AT&T
Copyright 1994, The X/Open Company Ltd. All Rights Reserved.
Portions Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved.

T_ERRNO 3NSL "April 9, 2016"
NAME
t_errno - XTI error return value
SYNOPSIS

#include <xti.h>
DESCRIPTION

This error return value is part of the XTI interfaces that evolved from the TLI interfaces. XTI represents the future evolution of these interfaces. However, TLI interfaces are supported for compatibility. When using a TLI interface that has the same name as an XTI interfaces, a different headerfile, <tiuser.h>, must be used. Refer to the TLI COMPATIBILITY section for a description of differences between the two interfaces.

t_errno is used by XTI functions to return error values.

XTI functions provide an error number in t_errno which has type int and is defined in <xti.h>. The value of t_errno will be defined only after a call to a XTI function for which it is explicitly stated to be set and until it is changed by the next XTI function call. The value of t_errno should only be examined when it is indicated to be valid by a function's return value. Programs should obtain the definition of t_errno by the inclusion of <xti.h>. The practice of defining t_errno in program as extern int t_errno is obsolescent. No XTI function sets t_errno to 0 to indicate an error.

It is unspecified whether t_errno is a macro or an identifier with external linkage. It represents a modifiable lvalue of type int. If a macro definition is suppressed in order to access an actual object or a program defines an identifier with name t_errno, the behavior is undefined.

The symbolic values stored in t_errno by an XTI function are defined in the ERRORS sections in all relevant XTI function definition pages.

TLI COMPATIBILITY

t_errno is also used by TLI functions to return error values.

The XTI and TLI interface definitions have common names but use different header files. This, and other semantic differences between the two interfaces are described in the subsections below.

"Interface Header"

The XTI interfaces use the header file, <xti.h>. TLI interfaces should not use this header. They should use the header:

#include <tiuser.h>

"Error Description Values"

The t_errno values that can be set by the XTI interface but cannot be set by the TLI interface are:

TNOSTRUCTYPE

TBADNAME

TBADQLEN

TADDRBUSY

TINDOUT

TPROVMISMATCH

TRESADDR

TQFULL

TPROTO

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe
SEE ALSO

attributes(5)