1t_snddis(3NSL)       Networking Services Library Functions      t_snddis(3NSL)
2
3
4

NAME

6       t_snddis - send user-initiated disconnection request
7

SYNOPSIS

9       #include <xti.h>
10
11
12
13       int t_snddis(int fd, const struct t_call *call);
14
15

DESCRIPTION

17       This  routine  is part of the XTI interfaces which evolved from the TLI
18       interfaces. XTI represents the future evolution  of  these  interfaces.
19       However,  TLI  interfaces are supported for compatibility. When using a
20       TLI routine that has the same name as an  XTI  routine,  the   tiuser.h
21       header file must be used.  Refer to the  TLI COMPATIBILITY  section for
22       a description of differences between the two interfaces.
23
24
25       This function is used to initiate an abortive  release  on  an  already
26       established connection, or to reject a connection request. The argument
27       fd identifies the local transport endpoint of the connection, and  call
28       specifies  information  associated with the abortive release. The argu‐
29       ment call points to a t_call structure  which  contains  the  following
30       members:
31
32         struct netbuf addr;
33         struct netbuf opt;
34         struct netbuf udata;
35         int sequence;
36
37
38
39       The  values  in call have different semantics, depending on the context
40       of the call to t_snddis(). When rejecting a  connection  request,  call
41       must  be  non-null  and  contain  a valid value of sequence to uniquely
42       identify the rejected connection indication to the transport  provider.
43       The sequence field is only meaningful if the transport connection is in
44       the T_INCON state. The addr and opt fields of call are ignored. In  all
45       other  cases,  call  need only be used when data is being sent with the
46       disconnection request. The addr, opt and sequence fields of the  t_call
47       structure  are  ignored.  If the user does not wish to send data to the
48       remote user, the value of call may be a null pointer.
49
50
51       The udata structure specifies the user data to be sent  to  the  remote
52       user.  The  amount of user data must not exceed the limits supported by
53       the transport provider, as returned in the discon field,  of  the  info
54       argument  of t_open(3NSL) or t_getinfo(3NSL). If the len field of udata
55       is zero, no data will be sent to the remote user.
56

RETURN VALUES

58       Upon successful completion, a value of  0 is  returned.   Otherwise,  a
59       value of  -1 is returned and t_errno is set to indicate an error.
60

VALID STATES

62       T_DATAXFER, T_OUTCON, T_OUTREL, T_INREL, T_INCON(ocnt > 0).
63

ERRORS

65       On failure, t_errno is set to one of the following:
66
67       TBADF          The specified file descriptor does not refer to a trans‐
68                      port endpoint.
69
70
71       TBADDATA       The amount of user data specified  was  not  within  the
72                      bounds allowed by the transport provider.
73
74
75       TBADSEQ        An invalid sequence number was specified, or a null call
76                      pointer  was  specified,  when  rejecting  a  connection
77                      request.
78
79
80       TLOOK          An  asynchronous  event,  which  requires attention, has
81                      occurred.
82
83
84       TNOTSUPPORT    This function is not supported by the underlying  trans‐
85                      port provider.
86
87
88       TOUTSTATE      The  communications endpoint referenced by  fd is not in
89                      one of the states in which a call to  this  function  is
90                      valid.
91
92
93       TPROTO         This  error  indicates  that a communication problem has
94                      been detected between XTI and the transport provider for
95                      which there is no other suitable XTI error (t_errno).
96
97
98       TSYSERR        A  system  error  has  occurred during execution of this
99                      function.
100
101

TLI COMPATIBILITY

103       The XTI and TLI interface definitions have common names but use differ‐
104       ent  header files. This, and other semantic differences between the two
105       interfaces are described in the subsections below.
106
107   Interface Header
108       The XTI interfaces use the header file, xti.h.  TLI  interfaces  should
109       not use this header.  They should use the header:
110         #include <tiuser.h>
111
112   Error Description Values
113       The t_errno value TPROTO can be set by the XTI interface but not by the
114       TLI interface.
115
116   Option Buffers
117       The format of the options in an opt buffer is dictated by the transport
118       provider.  Unlike the XTI interface, the TLI interface does not fix the
119       buffer format.
120

ATTRIBUTES

122       See attributes(5)  for descriptions of the following attributes:
123
124
125
126
127       ┌─────────────────────────────┬─────────────────────────────┐
128       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
129       ├─────────────────────────────┼─────────────────────────────┤
130       │MT Level                     │Safe                         │
131       └─────────────────────────────┴─────────────────────────────┘
132

SEE ALSO

134       t_connect(3NSL),   t_getinfo(3NSL),    t_listen(3NSL),    t_open(3NSL),
135       t_snd(3NSL), attributes(5)
136

WARNINGS

138       t_snddis()  is an abortive disconnection. Therefore a t_snddis() issued
139       on a connection endpoint  may cause data previously sent  by  means  of
140       t_snd(3NSL),  or data not yet received, to be lost, even if an error is
141       returned.
142
143
144
145SunOS 5.11                        7 May 1998                    t_snddis(3NSL)
Impressum