unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

T_SNDDIS(3N)                                                      T_SNDDIS(3N)



NAME
       t_snddis - send user-initiated disconnect request

SYNOPSIS
       #include <&lt;tiuser.h>&gt;

       int t_snddis(fd, call)
       int fd;
       struct t_call *call;

DESCRIPTION
       t_snddis() is used to initiate an abortive release on an already estab-
       lished connection or to reject a connect request.   fd  identifies  the
       local transport endpoint of the connection, and call specifies informa-
       tion associated with the abortive release.  call points to  a  t_call()
       structure which is defined in <&lt;nettlie/tiuser.h>&gt; as:

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

       The  maxlen, len, and buf members of the netbuf structure are described
       in t_accept(3N).  The values in call have different semantics,  depend-
       ing on the context of the call to t_snddis().  When rejecting a connect
       request, call must be non-NULL and contain a valid value of sequence to
       uniquely  identify  the  rejected  connect  indication to the transport
       provider.  The addr and opt fields of call are ignored.  In  all  other
       cases,  call need only be used when data is being sent with the discon-
       nect request.  The addr, opt,  and  sequence  fields  of  the  t_call()
       structure  are  ignored.  If the user does not wish 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  by
       t_open(3N)  or  t_getinfo(3N).   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.

       -1     on failure and sets t_errno to indicate the error.

ERRORS
       TBADDATA            The amount of user data specified  was  not  within
                           the  bounds allowed by the transport provider.  The
                           transport  provider's  outgoing   queue   will   be
                           flushed, so data may be lost.

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

       TBADSEQ             An invalid  sequence  number  was  specified.   The
                           transport   provider's   outgoing   queue  will  be
                           flushed, so data may be lost.

                           A NULL call structure was specified when  rejecting
                           a connect request.  The transport provider's outgo-
                           ing queue will be flushed, so data may be lost.

       TLOOK               An asynchronous event has occurred on  this  trans-
                           port endpoint and requires immediate attention.

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

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

       TSYSERR             The function failed due to a system error  and  set
                           errno to indicate the error.

SEE ALSO
       intro(3), t_connect(3N), t_getinfo(3N), t_listen(3N), t_open(3N)

                                21 January 1990                   T_SNDDIS(3N)