[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 2

t_look Subroutine for Transport Layer Interface

Purpose

Looks at the current event on a transport end point.

Library

Transport Layer Interface Library (libtli.a)

Syntax

#include <tiuser.h>
int t_look(fd)
int fd;

Description

The t_look subroutine returns the current event on the transport end point specified by the fd parameter. This subroutine enables a transport provider to notify a transport user of an asynchronous event when the user is issuing functions in synchronous mode. Certain events require immediate notification of the user and are indicated by a specific error, TLOOK, on the current or next subroutine executed.

This subroutine also enables a transport user to poll a transport end point periodically for asynchronous events.

Parameter

fd Specifies the transport end point.

Return Values

On successful completion, the t_look subroutine returns a value that indicates which of the allowable events has occurred, or returns a value of 0 if no event exists. One of the following events is returned:

T_CONNECT Indicates connect confirmation received.
T_DATA Indicates normal data received.
T_DISCONNECT Indicates disconnect received.
T_ERROR Indicates fatal error.
T_EXDATA Indicates expedited data received.
T_LISTEN Indicates connection indication received.
T_ORDREL Indicates orderly release.
T_UDERR Indicates datagram error.

If the t_look subroutine is unsuccessful, a value of -1 is returned, and the t_errno variable is set to indicate the error.

Error Codes

If unsuccessful, the t_errno variable is set to one of the following:

TBADF The specified file descriptor does not refer to a transport end point.
TSYSERR A system error has occurred during execution of this function.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The t_open subroutine.

List of Streams Programming References and STREAMS Overview in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]