Print this page
10067 Miscellaneous man page typos
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Volker A. Brandt <vab@bb-c.de>


  42 .\"
  43 .\" Portions Copyright 1989 AT&T
  44 .\" Copyright 1994, The X/Open Company Ltd.  All Rights Reserved.
  45 .\" Portions Copyright (c) 1998, Sun Microsystems, Inc.  All Rights Reserved.
  46 .\"
  47 .TH T_SNDUDATA 3NSL "May 7, 1998"
  48 .SH NAME
  49 t_sndudata \- send a data unit
  50 .SH SYNOPSIS
  51 .LP
  52 .nf
  53 #include <xti.h>
  54 
  55 
  56 
  57 
  58 \fBint\fR \fBt_sndudata\fR(\fBint\fR \fIfd\fR, \fBconst struct t_unitdata *\fR\fIunitdata\fR);
  59 .fi
  60 
  61 .SH DESCRIPTION
  62 .sp
  63 .LP
  64 This routine is part of the \fBXTI\fR interfaces which evolved from the
  65 \fBTLI\fR interfaces. \fBXTI\fR represents the future evolution of these
  66 interfaces. However, \fBTLI\fR interfaces are supported for compatibility. When
  67 using a \fBTLI\fR routine that has the same name as an \fBXTI\fR routine, the
  68 \fBtiuser.h\fR header file must be used.  Refer to the  \fBTLI\fR
  69 \fBCOMPATIBILITY\fR section for a description of differences between the two
  70 interfaces.
  71 .sp
  72 .LP
  73 This function is used in connectionless-mode to send a data unit to another
  74 transport user. The argument \fIfd\fR identifies the local transport endpoint
  75 through which data will be sent, and \fIunitdata\fR points to a
  76 \fBt_unitdata\fR structure containing the following members:
  77 .sp
  78 .in +2
  79 .nf
  80 struct netbuf addr;
  81 struct netbuf opt;
  82 struct netbuf udata;


 100 .LP
 101 By default, \fBt_sndudata()\fR operates in synchronous mode and may wait if
 102 flow control restrictions prevent the data from being accepted by the local
 103 transport provider at the time the call is made.  However, if  \fBO_NONBLOCK\fR
 104 \fBis\fR \fBset\fR \fBby\fR \fBmeans\fR \fBof\fR \fBt_open\fR(3NSL) or
 105 \fBfcntl\fR(2), \fBt_sndudata()\fR will execute in asynchronous mode and will
 106 fail under such conditions. The process can arrange to be notified of the
 107 clearance of a flow control restriction by means of either \fBt_look\fR(3NSL)
 108 or the EM interface.
 109 .sp
 110 .LP
 111 If the amount of data specified in \fIudata\fR exceeds the TSDU size as
 112 returned in the \fItsdu\fR field of the \fIinfo\fR argument of
 113 \fBt_open\fR(3NSL) or \fBt_getinfo\fR(3NSL), a \fBTBADDATA\fR error will be
 114 generated. If \fBt_sndudata()\fR is called before the destination user has
 115 activated its transport endpoint (see \fBt_bind\fR(3NSL)), the data unit may be
 116 discarded.
 117 .sp
 118 .LP
 119 If it is not possible for the transport provider to immediately detect the
 120 conditions that cause the errors \fBTBADDADDR\fR and \fBTBADOPT\fR, these
 121 errors will alternatively be returned by \fIt_rcvuderr.\fR Therefore, an
 122 application must be prepared to receive these errors in both of these ways.
 123 .sp
 124 .LP
 125 If the call is interrupted, \fBt_sndudata()\fR will return \fBEINTR\fR and the
 126 datagram will not be sent.
 127 .SH RETURN VALUES
 128 .sp
 129 .LP
 130 Upon successful completion, a value of  \fB0\fR is returned.  Otherwise, a
 131 value of  -1 is returned and \fBt_errno\fR is set to indicate an error.
 132 .SH VALID STATES
 133 .sp
 134 .LP
 135 \fBT_IDLE\fR.
 136 .SH ERRORS
 137 .sp
 138 .LP
 139 On failure, \fBt_errno\fR is set to one of the following:
 140 .sp
 141 .ne 2
 142 .na
 143 \fB\fBTBADADDR\fR\fR
 144 .ad
 145 .RS 15n
 146 The specified protocol address was in an incorrect format or contained illegal
 147 information.
 148 .RE
 149 
 150 .sp
 151 .ne 2
 152 .na
 153 \fB\fBTBADDATA\fR\fR
 154 .ad
 155 .RS 15n
 156 Illegal amount of data. A single send was attempted specifying a TSDU greater
 157 than that specified in the \fIinfo\fR argument, or a send of a zero byte TSDU


 219 .ne 2
 220 .na
 221 \fB\fBTPROTO\fR\fR
 222 .ad
 223 .RS 15n
 224 This error indicates that a communication problem has been detected between XTI
 225 and the transport provider for which there is no other suitable XTI error
 226 \fB(t_errno)\fR.
 227 .RE
 228 
 229 .sp
 230 .ne 2
 231 .na
 232 \fB\fBTSYSERR\fR\fR
 233 .ad
 234 .RS 15n
 235 A system error has occurred during execution of this function.
 236 .RE
 237 
 238 .SH TLI COMPATIBILITY
 239 .sp
 240 .LP
 241 The \fBXTI\fR and \fBTLI\fR interface definitions have common names but use
 242 different header files. This, and other semantic differences between the two
 243 interfaces are described in the subsections below.
 244 .SS "Interface Header"
 245 .sp
 246 .LP
 247 The \fBXTI\fR interfaces use the header file, \fBxti.h.\fR \fBTLI\fR interfaces
 248 should \fInot\fR use this header.  They should use the header:
 249 .br
 250 .in +2
 251 #include <tiuser.h>
 252 .in -2
 253 .SS "Error Description Values"
 254 .sp
 255 .LP
 256 The \fBt_errno\fR values that can be set by the \fBXTI\fR interface and cannot
 257 be set by the \fBTLI\fR interface are:
 258 .br
 259 .in +2
 260 \fBTPROTO\fR
 261 .in -2
 262 .br
 263 .in +2
 264 \fBTBADADDR\fR
 265 .in -2
 266 .br
 267 .in +2
 268 \fBTBADOPT\fR
 269 .in -2
 270 .br
 271 .in +2
 272 \fBTLOOK\fR
 273 .in -2
 274 .br
 275 .in +2
 276 \fBTOUTSTATE\fR
 277 .in -2
 278 .SS "Notes"
 279 .sp
 280 .LP
 281 Whenever this function fails with \fBt_error\fR set to \fBTFLOW,\fR
 282 \fBO_NONBLOCK\fR must have been set.
 283 .SS "Option Buffers"
 284 .sp
 285 .LP
 286 The format of the options in an \fBopt\fR buffer is dictated by the transport
 287 provider. Unlike the \fBXTI\fR interface, the \fBTLI\fR interface does not fix
 288 the buffer format.
 289 .SH ATTRIBUTES
 290 .sp
 291 .LP
 292 See \fBattributes\fR(5)  for descriptions of the following attributes:
 293 .sp
 294 
 295 .sp
 296 .TS
 297 box;
 298 c | c
 299 l | l .
 300 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 301 _
 302 MT Level        Safe
 303 .TE
 304 
 305 .SH SEE ALSO
 306 .sp
 307 .LP
 308 \fBfcntl\fR(2), \fBt_alloc\fR(3NSL), \fBt_bind\fR(3NSL), \fBt_error\fR(3NSL),
 309 \fBt_getinfo\fR(3NSL), \fBt_look\fR(3NSL), \fBt_open\fR(3NSL),
 310 \fBt_rcvudata\fR(3NSL), \fBt_rcvuderr\fR(3NSL), \fBattributes\fR(5)


  42 .\"
  43 .\" Portions Copyright 1989 AT&T
  44 .\" Copyright 1994, The X/Open Company Ltd.  All Rights Reserved.
  45 .\" Portions Copyright (c) 1998, Sun Microsystems, Inc.  All Rights Reserved.
  46 .\"
  47 .TH T_SNDUDATA 3NSL "May 7, 1998"
  48 .SH NAME
  49 t_sndudata \- send a data unit
  50 .SH SYNOPSIS
  51 .LP
  52 .nf
  53 #include <xti.h>
  54 
  55 
  56 
  57 
  58 \fBint\fR \fBt_sndudata\fR(\fBint\fR \fIfd\fR, \fBconst struct t_unitdata *\fR\fIunitdata\fR);
  59 .fi
  60 
  61 .SH DESCRIPTION

  62 .LP
  63 This routine is part of the \fBXTI\fR interfaces which evolved from the
  64 \fBTLI\fR interfaces. \fBXTI\fR represents the future evolution of these
  65 interfaces. However, \fBTLI\fR interfaces are supported for compatibility. When
  66 using a \fBTLI\fR routine that has the same name as an \fBXTI\fR routine, the
  67 \fBtiuser.h\fR header file must be used.  Refer to the  \fBTLI\fR
  68 \fBCOMPATIBILITY\fR section for a description of differences between the two
  69 interfaces.
  70 .sp
  71 .LP
  72 This function is used in connectionless-mode to send a data unit to another
  73 transport user. The argument \fIfd\fR identifies the local transport endpoint
  74 through which data will be sent, and \fIunitdata\fR points to a
  75 \fBt_unitdata\fR structure containing the following members:
  76 .sp
  77 .in +2
  78 .nf
  79 struct netbuf addr;
  80 struct netbuf opt;
  81 struct netbuf udata;


  99 .LP
 100 By default, \fBt_sndudata()\fR operates in synchronous mode and may wait if
 101 flow control restrictions prevent the data from being accepted by the local
 102 transport provider at the time the call is made.  However, if  \fBO_NONBLOCK\fR
 103 \fBis\fR \fBset\fR \fBby\fR \fBmeans\fR \fBof\fR \fBt_open\fR(3NSL) or
 104 \fBfcntl\fR(2), \fBt_sndudata()\fR will execute in asynchronous mode and will
 105 fail under such conditions. The process can arrange to be notified of the
 106 clearance of a flow control restriction by means of either \fBt_look\fR(3NSL)
 107 or the EM interface.
 108 .sp
 109 .LP
 110 If the amount of data specified in \fIudata\fR exceeds the TSDU size as
 111 returned in the \fItsdu\fR field of the \fIinfo\fR argument of
 112 \fBt_open\fR(3NSL) or \fBt_getinfo\fR(3NSL), a \fBTBADDATA\fR error will be
 113 generated. If \fBt_sndudata()\fR is called before the destination user has
 114 activated its transport endpoint (see \fBt_bind\fR(3NSL)), the data unit may be
 115 discarded.
 116 .sp
 117 .LP
 118 If it is not possible for the transport provider to immediately detect the
 119 conditions that cause the errors \fBTBADADDR\fR and \fBTBADOPT\fR, these
 120 errors will alternatively be returned by \fIt_rcvuderr.\fR Therefore, an
 121 application must be prepared to receive these errors in both of these ways.
 122 .sp
 123 .LP
 124 If the call is interrupted, \fBt_sndudata()\fR will return \fBEINTR\fR and the
 125 datagram will not be sent.
 126 .SH RETURN VALUES

 127 .LP
 128 Upon successful completion, a value of  \fB0\fR is returned.  Otherwise, a
 129 value of  -1 is returned and \fBt_errno\fR is set to indicate an error.
 130 .SH VALID STATES

 131 .LP
 132 \fBT_IDLE\fR.
 133 .SH ERRORS

 134 .LP
 135 On failure, \fBt_errno\fR is set to one of the following:
 136 .sp
 137 .ne 2
 138 .na
 139 \fB\fBTBADADDR\fR\fR
 140 .ad
 141 .RS 15n
 142 The specified protocol address was in an incorrect format or contained illegal
 143 information.
 144 .RE
 145 
 146 .sp
 147 .ne 2
 148 .na
 149 \fB\fBTBADDATA\fR\fR
 150 .ad
 151 .RS 15n
 152 Illegal amount of data. A single send was attempted specifying a TSDU greater
 153 than that specified in the \fIinfo\fR argument, or a send of a zero byte TSDU


 215 .ne 2
 216 .na
 217 \fB\fBTPROTO\fR\fR
 218 .ad
 219 .RS 15n
 220 This error indicates that a communication problem has been detected between XTI
 221 and the transport provider for which there is no other suitable XTI error
 222 \fB(t_errno)\fR.
 223 .RE
 224 
 225 .sp
 226 .ne 2
 227 .na
 228 \fB\fBTSYSERR\fR\fR
 229 .ad
 230 .RS 15n
 231 A system error has occurred during execution of this function.
 232 .RE
 233 
 234 .SH TLI COMPATIBILITY

 235 .LP
 236 The \fBXTI\fR and \fBTLI\fR interface definitions have common names but use
 237 different header files. This, and other semantic differences between the two
 238 interfaces are described in the subsections below.
 239 .SS "Interface Header"

 240 .LP
 241 The \fBXTI\fR interfaces use the header file, \fBxti.h.\fR \fBTLI\fR interfaces
 242 should \fInot\fR use this header.  They should use the header:
 243 .br
 244 .in +2
 245 #include <tiuser.h>
 246 .in -2
 247 .SS "Error Description Values"

 248 .LP
 249 The \fBt_errno\fR values that can be set by the \fBXTI\fR interface and cannot
 250 be set by the \fBTLI\fR interface are:
 251 .br
 252 .in +2
 253 \fBTPROTO\fR
 254 .in -2
 255 .br
 256 .in +2
 257 \fBTBADADDR\fR
 258 .in -2
 259 .br
 260 .in +2
 261 \fBTBADOPT\fR
 262 .in -2
 263 .br
 264 .in +2
 265 \fBTLOOK\fR
 266 .in -2
 267 .br
 268 .in +2
 269 \fBTOUTSTATE\fR
 270 .in -2
 271 .SS "Notes"

 272 .LP
 273 Whenever this function fails with \fBt_error\fR set to \fBTFLOW,\fR
 274 \fBO_NONBLOCK\fR must have been set.
 275 .SS "Option Buffers"

 276 .LP
 277 The format of the options in an \fBopt\fR buffer is dictated by the transport
 278 provider. Unlike the \fBXTI\fR interface, the \fBTLI\fR interface does not fix
 279 the buffer format.
 280 .SH ATTRIBUTES

 281 .LP
 282 See \fBattributes\fR(5)  for descriptions of the following attributes:
 283 .sp
 284 
 285 .sp
 286 .TS
 287 box;
 288 c | c
 289 l | l .
 290 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 291 _
 292 MT Level        Safe
 293 .TE
 294 
 295 .SH SEE ALSO

 296 .LP
 297 \fBfcntl\fR(2), \fBt_alloc\fR(3NSL), \fBt_bind\fR(3NSL), \fBt_error\fR(3NSL),
 298 \fBt_getinfo\fR(3NSL), \fBt_look\fR(3NSL), \fBt_open\fR(3NSL),
 299 \fBt_rcvudata\fR(3NSL), \fBt_rcvuderr\fR(3NSL), \fBattributes\fR(5)