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

NAME

6       t_sndvudata - send a data unit from one or more noncontiguous buffers
7

SYNOPSIS

9       #include <xti.h>
10
11
12
13
14       int t_sndvudata(int fd, struct t_unitdata *unitdata, struct t_iovec  *iov,
15            unsigned int iovcount);
16
17

DESCRIPTION

19       This  function  is  used  in connectionless mode to send a data unit to
20       another transport user.  The argument  fd identifies the  local  trans‐
21       port  endpoint  through which data will be sent,  iovcount contains the
22       number of non-contiguous  udata buffers and is limited to an  implemen‐
23       tation-defined  value  given  by   T_IOV_MAX  which is at least 16, and
24       unitdata points to a  t_unitdata  structure  containing  the  following
25       members:
26
27         struct netbuf addr;
28         struct netbuf opt;
29         struct netbuf udata;
30
31
32
33       If  the  limit  on  iovcount is exceeded, the function fails with TBAD‐
34       DATA.
35
36
37       In  unitdata, addr specifies the protocol address  of  the  destination
38       user,  and   opt identifies options that the user wants associated with
39       this request. The  udata field is not used.  The user may choose not to
40       specify  what protocol options are associated with the transfer by set‐
41       ting the  len field of  opt to zero.  In this case,  the  provider  may
42       use default options.
43
44
45       The data to be sent is identified by  iov[0] through iov [iovcount-1].
46
47
48       Note  that the limit on the total number of bytes available in all buf‐
49       fers passed:
50
51         iov(0).iov_len + . . + iov(iovcount-1).iov_len
52
53
54
55       may be constrained by implementation limits.  If  no  other  constraint
56       applies,  it  will be limited by INT_MAX. In practice, the availability
57       of memory to an application is likely to impose a lower  limit  on  the
58       amount  of data that can be sent or received using scatter/gather func‐
59       tions.
60
61
62       By default,  t_sndvudata() operates in synchronous mode and may wait if
63       flow  control  restrictions prevent the data from being accepted by the
64       local transport provider at the time the call  is  made.   However,  if
65       O_NONBLOCK is set by means of  t_open(3NSL) or  fcntl(2), t_sndvudata()
66       executes in asynchronous mode and will fail under such conditions.  The
67       process  can  arrange to be notified of the clearance of a flow control
68       restriction by means of either  t_look(3NSL) or the EM interface.
69
70
71       If the amount of data  specified  in   iov0  through  iov  [iovcount-1]
72       exceeds the TSDU size as returned in the  tsdu field of the  info argu‐
73       ment of t_open(3NSL) or  t_getinfo(3NSL), or is  zero  and  sending  of
74       zero  octets  is  not  supported by the underlying transport service, a
75       TBADDATA error is generated.  If  t_sndvudata() is  called  before  the
76       destination   user   has   activated   its   transport   endpoint  (see
77       t_bind(3NSL)), the data unit may be discarded.
78
79
80       If it is not possible for the transport provider to immediately  detect
81       the  conditions  that  cause  the  errors  TBADDADDR and TBADOPT, these
82       errors will alternatively be returned by  t_rcvuderr(3NSL). An applica‐
83       tion  must  therefore  be  prepared  to receive these errors in both of
84       these ways.
85

RETURN VALUES

87       Upon successful completion, a value of  0  is  returned.  Otherwise,  a
88       value of  -1 is returned and  t_errno is set to indicate an error.
89

VALID STATES

91       T_IDLE.
92

ERRORS

94       On failure,  t_errno is set to one of the following:
95
96       TBADADDR       The  specified protocol address was in an incorrect for‐
97                      mat or contained illegal information.
98
99
100       TBADDATA       Illegal amount of data.
101
102                          o      A single send was attempted specifying a TSDU
103                                 greater than that specified in the info argu‐
104                                 ment, or a send of a zero byte  TSDU  is  not
105                                 supported by the provider.
106
107                          o      iovcount is greater than  T_IOV_MAX.
108
109
110       TBADF          The specified file descriptor does not refer to a trans‐
111                      port endpoint.
112
113
114       TBADOPT        The specified options were in an  incorrect   format  or
115                      contained illegal information.
116
117
118       TFLOW          O_NONBLOCK  i  was  set,  but the flow control mechanism
119                      prevented the transport provider from accepting any data
120                      at this time.
121
122
123       TLOOK          An  asynchronous  event  has  occurred on this transport
124                      endpoint.
125
126
127       TNOTSUPPORT    This function is not supported by the underlying  trans‐
128                      port provider.
129
130
131       TOUTSTATE      The  communications  endpoint referenced by fd is not in
132                      one of the states in which a call to  this  function  is
133                      valid.
134
135
136       TPROTO         This  error  indicates  that a communication problem has
137                      been detected between XTI and the transport provider for
138                      which there is no other suitable XTI error (t_errno).
139
140
141       TSYSERR        A  system  error  has  occurred during execution of this
142                      function.
143
144

TLI COMPATIBILITY

146       In the TLI interface definition, no counterpart  of  this  routine  was
147       defined.
148

ATTRIBUTES

150       See attributes(5)  for descriptions of the following attributes:
151
152
153
154
155       ┌─────────────────────────────┬─────────────────────────────┐
156       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
157       ├─────────────────────────────┼─────────────────────────────┤
158       │MT Level                     │Safe                         │
159       └─────────────────────────────┴─────────────────────────────┘
160

SEE ALSO

162       fcntl(2),   t_alloc(3NSL),   t_open(3NSL),  t_rcvudata(3NSL),  t_rcvvu‐
163       data(3NSL) t_rcvuderr(3NSL), t_sndudata(3NSL), attributes(5)
164
165
166
167SunOS 5.11                        23 Aug 2001                t_sndvudata(3NSL)
Impressum