Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_sync(3N) — Amiga System V Release 4 Version 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dup(2)

exec(2)

fork(2)

open(2)

t_sync(3N)



t_sync(3N)              NETWORK FUNCTIONS              t_sync(3N)



NAME
     tsync - synchronize transport library

SYNOPSIS
     #include <tiuser.h>

     int tsync (int fd);

DESCRIPTION
     For the transport endpoint specified by fd, tsync synchron-
     izes  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 via
     open(2), dup(2), or as a result of a fork(2) and exec(2)] 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 tsync 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.  tsync returns the current state  of
     the  provider to the user, thereby enabling the user to ver-
     ify the state before taking further action.  This  coordina-
     tion is only valid among cooperating processes; it is possi-
     ble that a process or an incoming  event  could  change  the
     provider's state after a tsync is issued.

     If the provider is undergoing a state transition when tsync
     is  called, the function will fail.  On failure, terrno may
     be 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
                        state change.

     [TSYSERR]          A system error has occurred during execu-
                        tion of this function.

SEE ALSO
     dup(2), exec(2), fork(2), open(2).
     UNIX System V Network Programmer's Guide.



            Last change: Networking Support Utilities           1





t_sync(3N)              NETWORK FUNCTIONS              t_sync(3N)



DIAGNOSTICS
     tsync returns the state of the transport provider  on  suc-
     cessful  completion  and -1 on failure and terrno is set to
     indicate the error.  The state returned may be  one  of  the
     following:

     TUNBND            unbound

     TIDLE             idle

     TOUTCON           outgoing connection pending

     TINCON            incoming connection pending

     TDATAXFER         data transfer

     TOUTREL           outgoing orderly release (waiting for  an
                        orderly release indication)

     TINREL            incoming orderly release (waiting for  an
                        orderly release request)


































            Last change: Networking Support Utilities           2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026