Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ t_snddis(3N) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3)

t_connect(3N)

t_getinfo(3N)

t_listen(3N)

t_open(3N)

t_rcvdis(3N)

t_rcvrel(3N)

t_snd(3N)

t_sndrel(3N)






       t_snddis(3N)                                            t_snddis(3N)


       NAME
             t_snddis - send user-initiated disconnect request

       SYNOPSIS
             cc [options] file -lnsl
             #include <xti.h>
             int t_snddis(int fd, struct t_call *call):

          Parameters
             fd    the file descriptor for the transport endpoint where the
                   connection exits.

             call  points to the t_call structure associated with
                   information about the connection.

       DESCRIPTION
             This function is a TLI/XTI connection release routine used to
             initiate a release on an already established connection with a
             responding transport endpoint, specified by fd.  It may also
             be issued to reject a connect request.

             The values pointed to by call have different semantics that
             vary with the context of the call.

             This function is a service of connection-mode transport
             providers and is supported only if the provider returned
             service type T_COTS or T_COTS_ORD on t_open or t_getinfo.

          Structure Definitions
             The call argument points to a t_call structure that contains
             the following members:

                         struct netbuf addr;             /* address*/
                         struct netbuf opt;              /* options*/
                         struct netbuf udata;            /* user data*/
                         int sequence;    /* sequence number*/

             netbuf is described in intro(3).

             When rejecting a connect request, call must  be  non-NULL  and
             contain  a  valid  value  of sequence to identify uniquely the
             rejected connect indication to the  transport  provider.   The
             addr and opt fields of call are ignored.





                           Copyright 1994 Novell, Inc.               Page 1













      t_snddis(3N)                                            t_snddis(3N)


            In all other cases, call need only be used when data is  being
            sent with the disconnect request.  The addr, opt, and sequence
            fields of the t_call structure are ignored.  If the user  does
            not  want  to  send data to the remote user, the value of call
            may be NULL.

            udata specifies the user data to be sent to the  remote  user.
            The  amount  of user data must not exceed the limits supported
            by the transport provider as returned in the discon  field  of
            the info argument of t_open or t_getinfo.  If the len field of
            udata is zero, no data will be sent to the remote user.

         Return Values
            t_snddis returns 0 on success and -1 on failure and t_errno is
            set to indicate the error.

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

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

            TOUTSTATE The function was issued in the wrong sequence.  The
                      transport provider's outgoing queue may be flushed,
                      so data may be lost.

            TBADDATA  The amount of user data specified was not within the
                      bounds supported by the transport provider as
                      returned in the discon field of the info argument of
                      t_open or t_getinfo.  The transport provider's
                      outgoing queue will be flushed, so data may be lost.

            TBADSEQ   An invalid sequence number was specified, or a NULL
                      call structure was specified when rejecting a
                      connect request.  The transport provider's outgoing
                      queue will be flushed, so data may be lost.

            TLOOK     An asynchronous event has occurred on the transport
                      endpoint specified by fd and requires immediate
                      attention.

            TNOTSUPPORT
                      This function is not supported by the underlying
                      transport provider.




                          Copyright 1994 Novell, Inc.               Page 2













       t_snddis(3N)                                            t_snddis(3N)


             TSYSERR   A system error has occurred during execution of this
                       function.

             TPROTO    A communication problem has been detected with the
                       transport provider and there is no other value of
                       t_errno to describe the error condition.

          State Transitions
             t_snddis may be issued from any valid state except T_UNINIT,
             T_UNBND, or T_IDLE.  Valid states on exit are T_IDLE
             (successful) and T_INCON (successful but there are connect
             indications outstanding).

          Files
             /usr/lib/libxti.so
                               X/Open Transport Interface Library (shared
                               object)
             /usr/lib/libnsl.so
                               Network Services Library (shared object)

       USAGE
             After issuing t_snddis, the user may not send any more data
             over the connection.  However, a user may continue to receive
             data if a disconnect request has not been received (see
             t_rcvdis).

          Warnings
             When executed, t_snddis causes an abortive disconnect, which
             may result in a loss of data sent by t_snd but not yet
             received.  The return of an error does not preclude loss of
             data.

       REFERENCES
             intro(3), t_connect(3N), t_getinfo(3N), t_listen(3N),
             t_open(3N), t_rcvdis(3N), t_rcvrel(3N), t_snd(3N),
             t_sndrel(3N)












                           Copyright 1994 Novell, Inc.               Page 3








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