t_getstate(3xti)t_getstate(3xti)Name
t_getstate - get the current state
Syntax
#include <xti.h>
int t_getstate(fd)
int fd;
Arguments
fd Identifies the local transport endpoint the current state is returned from.
Description
The function returns the current state of the transport provider associated with the transport endpoint specified by fd.
--------------------------------------
Parameters Before Call After Call
--------------------------------------
fd x /
--------------------------------------
Return Values
Upon successful completion, returns the current state. On failure, a value of -1 is returned, and t_errno is set to indicate the 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 is called, the function fails.
Diagnostics
On failure, t_errno is set to one of the following:
[TBADF] The specified file descriptor does not refer to a transport endpoint. This error may be returned when the fd has been
previously closed or an erroneous number has been passed to the call.
[TSTATECHNG] The transport provider is undergoing a transient state change.
[TNOTSUPPORT] This function is not supported by the current implementation of XTI.
[TSYSERR] A system error has occurred during execution of this function.
See Alsot_open(3xti)t_getstate(3xti)
Check Out this Related Man Page
t_getstate(3) Library Functions Manual t_getstate(3)NAME
t_getstate() - get the current state
SYNOPSIS DESCRIPTION
The function returns the current state of the provider as seen by the application associated with the transport endpoint specified by fd.
Fork Safety
is not fork-safe.
RETURN VALUE
State is returned upon successful completion. Otherwise, a value of -1 it returned and is set to indicate the 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 for an orderly release request).
If the provider is undergoing a state transition when is called, the function will fail.
ERRORS
On failure, is set to the following:
[TBADF] The specified identifier 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 function.
[TPROTO] (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for
which there is no suitable XTI (
SEE ALSO t_open(3), thread_safety(5).
STANDARDS CONFORMANCE t_getstate(3)
<h1>A short history of UNIX</h1>
<p>In the late 1960's Ken Thompsom joined the computing-science research group at Bell
Laboratories, which is the research arm of the giant American corporation ATT. He and many
colleagues had been collaborating with MIT and GE on the development of an... (0 Replies)
We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
I'm writing a command shell, and I want to be able to detect when the user presses an arrow key (otherwise it just prints [[A, [[B, etc.). I know it's relatively easy (although somewhat more time-consuming) to detect keystrokes in noncanonical mode, but I've noticed that the bash shell detects... (4 Replies)
I'm learning off Linux (Ubuntu) right now. I want to move up to Unix, but I don't want to rush like I did when it came to Windows --> to Linux. What is the best Unix OS that fits in pretty well with Ubuntu.
In other words is there kind of an equal Linux with Unix?
Also what do I need to... (10 Replies)
I noticed my hostname is <my-full-name>s-macbook.local. I'm not sure exactly what information leaves the local network, and whether the hostname is included, but if it is, this would mean people on the Internet can look at my hostname and see who I am. Before anyone says that's not possible,... (4 Replies)