Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_rcvdis(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

netbuf(FP)


 t_rcvdis(S)               (TLI/XTI) 6 January 1993               t_rcvdis(S)


 Name

    t_rcvdis - retrieve information from disconnect

 Syntax


    TLI syntax


    cc . . .  -lnsls


    #include <sys/tiuser.h>

    t_rcvdis (fd,discon)
    int fd;
    struct t_discon *discon;


    XTI syntax


    cc . . .  -lxti


    #include <xti.h>

    t_rcvdis (fd,discon)
    int fd;
    struct t_discon *discon;


 Description

    This function is used to identify the cause of a disconnect, and to
    retrieve any user data sent with the disconnect.  fd identifies the local
    transport endpoint where the connection existed, and discon points to a
    tdiscon structure containing the following members:

       struct netbuf udata;
       int reason;
       int sequence;

    netbuf is described in netbuf(FP).  reason specifies the reason for the
    disconnect through a protocol-dependent reason code, udata identifies any
    user data that was sent with the disconnect, and sequence may identify an
    outstanding connect indication with which the disconnect is associated.
    sequence is only meaningful when trcvdis is issued by a passive trans-
    port user who has executed one or more tlisten functions and is pro-
    cessing the resulting connect indications.  If a disconnect indication
    occurs, sequence can be used to identify which of the outstanding connect
    indications is associated with the disconnect.

    If a user does not care if there is incoming data and does not need to
    know the value of reason or sequence, discon may be NULL and any user
    data associated with the disconnect is discarded.  However, if a user has
    retrieved more than one outstanding connect indication (via tlisten) and
    discon is NULL, the user is unable to identify with which connect indica-
    tion the disconnect is associated.

    On failure, terrno may be set to one of the following:

    [TBADF]             The specified file descriptor does not refer to a
                        transport endpoint.

    [TBUFOVFLW]         The number of bytes allocated for incoming data is
                        not sufficient to store the data.  The provider's
                        state, as seen by the user, changes to TIDLE, and
                        the disconnect indication information to be returned
                        in discon is discarded.

    [TNODIS]            No disconnect indication currently exists on the
                        specified transport endpoint.

    [TNOTSUPPORT]       The TCLTS service type is not supported by the
                        underlying transport provider.

    [TOUTSTATE]         (XTI only.)  The state was incorrect when this rou-
                        tine was called.

    [TSYSERR]           A system error occurred during execution of this
                        function.  One possibility is an I/O error indicated
                        by errno set to EIO.  Another possibility is a proto-
                        col error indicated by errno set to EPROTO.

 Diagnostics

    The trcvdis function returns 0 on success and -1 on failure, and terrno
    is set to indicate the error.

 See also

    netbuf(FP), tconnect(S), tlisten(S), topen(S), tsnddis(S)

 Standards conformance

    trcvdis is conformant with:
    AT&T SVID Issue 2;
    X/Open Portability Guide, Issue 3, 1989;
    and Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2).


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