Produces an error message.
Transport Layer Interface Library (libtli.a)
void t_error(errmsg) char *errmsg; extern int t_errno; extern char *t_errno; extern int t_nerr;
The t_error subroutine produces a message on the standard error output that describes the last error encountered during a call to a transport function.
The t_error subroutine prints the user-supplied error message, followed by a colon and the standard transport-function error message for the current value contained in the t_errno variable.
|errmsg||Specifies a user-supplied error message that gives context to the error.|
|t_errno||Specifies which standard transport-function error message to print. If the value of the t_errno variable is TSYSERR, the t_error subroutine also prints the standard error message for the current value contained in the errno global variable.|
|t_nerr||Specifies the maximum index value for the t_errlist array. The t_errlist array is the array of message strings allowing user-message formatting. The t_errno variable can be used as an index into this array to retrieve the error message string (without a terminating new-line character).|
A t_connect subroutine is unsuccessful on transport end point fd2 because a bad address was given, and the following call follows the failure:
t_error("t_connect failed on fd2")
The diagnostic message would print as:
t_connect failed on fd2: Incorrect transport address format
In this example, t_connect failed on fd2 tells the user which function was unsuccessful on which transport end point, and Incorrect transport address format identifies the specific error that occurred.
This subroutine is part of Base Operating System (BOS) Runtime.
List of Streams Programming References, STREAMS Overview in AIX Version 4.3 Communications Programming Concepts.