synchronize transport library
cc . . . -lnsl
int t_sync (fd)
cc . . . -lxti
int t_sync (fd)
For the transport endpoint specified by fd,
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
or as a result of a
to an initialized transport endpoint, assuming that file
descriptor referenced a transport provider.
This function 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
t_sync returns the current state of the provider to the user, thereby
enabling the user to verify the state before taking further
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 fails.
returns the state of the transport provider on successful
completion and -1 on failure, and t_errno
is set to indicate the error.
The state returned may be one of the following:
incoming connection pending
incoming orderly release (waiting for an orderly release request).
outgoing connection pending
outgoing orderly release (waiting for an orderly release indication)
On failure, t_errno may be set to one of the following:
The specified file descriptor is a valid open file descriptor but
does not refer to a transport endpoint.
The transport provider is undergoing a state change.
A system error occurred during execution of this function.
One possibility is an I/O error and is indicated by
EIO being set in errno.
t_sync is conformant with:
AT&T SVID Issue 3
X/Open CAE Specification, Networking Services, Issue 4, 1994.
Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003