Content-type: text/html Man page of t_snddis

t_snddis

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

t_snddis - Sends user-initiated disconnect request  

LIBRARY

XTI Library (libxti.a)  

SYNOPSIS

#include <xti.h>

int t_snddis(

  int
fd,
  struct t_call *call) ;
 

STANDARDS

Interfaces documented on this reference page conform to industry standards as follows:

t_snddis:      XPG4-UNIX

Refer to the standards(5) reference page for more information about industry standards and associated tags.  

PARAMETERS

The following table summarizes the relevance of input and output parameters before and after t_snddis() is called:

ParameterBefore CallAfter Call

fdyn
call->addr.maxlennn
call->addr.lennn
call->addr.bufnn
call->opt.maxlennn
call->opt.lennn
call->opt.bufnn
call->udata.maxlennn
call->udata.lenyn
call->udata.bufo(o)n
call->sequenceon
Notes to Table:

y    This is a meaningful parameter.
n    This is not a meaningful parameter.
o    This an optional parameter.
(o)  The content of the object pointed to by y is optional.
fd
Specifies a file descriptor returned by the t_open() function that identifies the transport endpoint at which the disconnect is wanted.
call
Points to a type t_call structure used to specify information associated with the disconnect at the transport endpoint specified by file descriptor fd. When the call parameter is set to the null pointer value, no data is sent to the remote transport provider user. The t_call structure has the following members:
struct netbuf    addr
This field is ignored.
struct netbuf    opt
This field is ignored.
struct netbuf    udata
Specifies a buffer for user data that may be optionally sent to the remote transport user. The type netbuf structure referenced by this member is defined in the xti.h include file. This structure, which is used to explicitly define buffer parameters, has the following members:
unsigned int   maxlen
Specifies the maximum byte length of the data buffer.
unsigned int   len
Specifies the actual byte length of data written to the buffer.
char   *buf
Points to the buffer location.
int   sequence
Specifies the identity of the connection for which this disconnect request is intended and has meaning only when the transport provider is in the T_INCON state and is rejecting an incoming rejection request.
 
The udata parameters pointed to by the call parameter need only be used when data is sent with a disconnect request.
 
When data is sent with the disconnect request, the size of the data written to the buffer pointed to by call->udata.buf must not exceed the limits specified by info->discon, which is returned by the t_open() or t_getinfo() functions. Failure to comply with the specified size constraints may result in return of a [T_SYSERR] protocol error.
 
The sequence parameter is meaningful only if the transport user is rejecting an incoming connection request and needs to identify which incoming connection request to reject.

 

VALID STATES

The t_snddis() function can be called in the following transport provider states: T_DATAXFER, T_OUTCON, T_OUTREL, T_INREL, and T_INCON (when the number of outstanding connections is greater than zero).  

DESCRIPTION

The t_snddis() XTI connection-oriented function is used to initiate an abortive disconnect at an established transport endpoint. The transport endpoint is specified by a file descriptor returned by the t_open() function. The t_snddis() function uses type t_call and netbuf structures, which are defined in the xti.h include file.  

NOTES

Note that t_snddis() is an abortive disconnect. This means that if t_snddis() is issued on a connection endpoint, it may cause data previously sent with t_snd(), or data not yet received, to be lost, even if an error is returned.  

RETURN VALUE

Upon successful completion, a value of 0 (zero) is returned. Otherwise, a value of -1 is returned and t_errno is set to indicate the error.  

ERRORS

If the t_snddis() function fails, t_errno may be set to one of the following values:

[TBADF]
File descriptor fd does not refer to a valid transport endpoint.
[TBADDATA]
The amount of user data specified was not within the bounds allowed by the transport provider. Some outbound data queued for this endpoint may be lost.
[TBADSEQ]
An invalid sequence number was specified, or a null value was used for the call parameter when the connect request was rejected. Some outbound data queued for this endpoint may be lost.
[TNOTSUPPORT]
This function is not supported by the underlying transport provider.
[TOUTSTATE]
This function was issued in the wrong sequence at the transport endpoint referenced by the fd parameter.
[TSYSERR]
A system error occurred during execution of this function.
[TLOOK]
An asynchronous event that requires attention has occurred.
[TPROTO]
This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI(t_errno).
 

RELATED INFORMATION

Functions: t_connect(3), t_getinfo(3), t_listen(3), t_open(3) delim off


 

Index

NAME
LIBRARY
SYNOPSIS
STANDARDS
PARAMETERS
VALID STATES
DESCRIPTION
NOTES
RETURN VALUE
ERRORS
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:42:37 GMT, October 02, 2010