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

t_getstate Subroutine for Transport Layer Interface

Purpose

Gets the current state.

Library

Transport Layer Interface Library (libtli.a)

Syntax

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

Description

The t_getstate subroutine returns the current state of the provider associated with the transport end point specified by the fd parameter.

Parameter

fd Specifies the transport end point.

Return Codes

On successful completion, the t_getstate subroutine returns the current state. Otherwise, it returns a value of -1, and the t_errno variable is set to indicate the error.

If the provider is undergoing a state transition when the t_getstate subroutine is called, the function will fail. The current state is one of the following.

T_DATAXFER Data transfer.
T_IDLE Idle.
T_INCON Incoming connection pending.
T_INREL Incoming orderly release (waiting to send an orderly release indication).
T_OUTCON Outgoing connection pending.
T_OUTREL Outgoing orderly release (waiting for an orderly release indication).
T_UNBND Unbound.

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.
TSTATECHNG The transport provider is undergoing a state change.
TSYSERR A system error has occurred during execution of this function.

Implementation Specifics

This subroutine is a 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 ]