[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2


t_getstate Subroutine for X/Open Transport Interface

Purpose

Get the current state.

Library

X/Open Transport Interface Library (libxti.a)

Syntax

#include <xti.h>

int t_getstate (fd)
int fd;

Description

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

Parameter


fd Specifies the transport endpoint.

Valid States

ALL - apart from T_UNINIT.

Return Values


0 Successful completion.
-1 t_errno is set to indicate an error. The current state is one of the following:

T_UNBND
Unbound

T_IDLE
Idle

T_OUTCON
Outgoing connection pending

T_INCON
Incoming connection pending

T_DATAXFER
Data transfer

T_OUTREL
Outgoing orderly release (waiting for an orderly release indication)

T_INREL
Incoming orderly release (waiting to send an orderly release request)

If the provider is undergoing a state transition when the t_getstate subroutine is called, the subroutine will fail.

Error Codes

On failure, t_errno is set to one of the following:

TBADF The specified file descriptor does not refer to a transport endpoint.
TSTATECHNG The transport provider is undergoing a transient state change.
TSYSERR A system error has occurred during execution of this subroutine.
TPROTO This error indicates that a communication problem has been detected between the X/Open Transport Interface and the transport provider for which there is no other suitable X/Open Transport Interface (t_errno).

Related Information

The t_open subroutine.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]