up | Inhaltsverzeichniss | Kommentar

Manual page for T_SYNC(3N)

t_sync - synchronize transport library

SYNOPSIS

#include <tiuser.h>

int t_sync(fd)
int fd;

DESCRIPTION

For the transport endpoint specified by fd, t_sync() synchronizes the data structures managed by the transport library with information from the underlying transport provider. In doing so, it can convert a raw file descriptor (obtained using open.2v dup.2v or as a result of a fork.2v and execve.2v to an initialized transport endpoint, assuming that file descriptor referenced a transport provider. t_sync() also allows two cooperating processes to synchronize their interaction with a transport provider.

For example, if a process forks a new process and issues an exec, the new process must issue a t_sync() to build the private library data structure associated with a transport endpoint and to synchronize the data structure with the relevant provider information.

It is important to remember that the transport provider treats all users of a transport endpoint as a single user. If multiple processes are using the same endpoint, they should coordinate their activities so as not to violate the state of the provider. t_sync() returns the current state of the provider to the user, thereby enabling the user to verify the state before taking further action. This coordination is only valid among cooperating processes; it is possible that a process or an incoming event could change the provider's state after a t_sync() is issued.

If the provider is undergoing a state transition when t_sync() is called, the function will fail.

RETURN VALUES

t_sync() returns -1 on failure. Upon success, the state of the transport provider is returned; it may be one of the following:

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)
T_UNBND
unbound

ERRORS

TBADF
The specified file descriptor is a valid open file descriptor but does not refer to a transport endpoint.
TSTATECHNG
The transport provider is undergoing a state change.
TSYSERR
The function failed due to a system error and set errno to indicate the error.

SEE ALSO

dup.2v execve.2v fork.2v open.2v

[a manual with the abbreviation NETP]


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97