|
|
HP-UX Reference Volume 4 of 5 > tt_rcvdis(3) |
|
NAMEt_rcvdis() — retrieve information from disconnect SYNOPSIS#include <xti.h> /* for X/OPEN Transport Interface - XTI */ /* or */ #include <tiuser.h> /* for Transport Layer Interface - TLI */ int t_rcvdis (fd, discon); int fd; struct t_discon *discon; DESCRIPTIONThe t_rcvdis() function is used to identify the cause of a disconnect, and to retrieve any user data sent with the disconnect. fd identifies the local transport endpoint where the connection existed. discon points to a t_discon structure containing the following members: struct netbuf udata; int reason; int sequence; The type netbuf structure is defined in the <xti.h> or <tiuser.h> header file. This structure, which is used to define buffer parameters, has the following members:
reason specifies the reason for the disconnect through a protocol-dependent reason code. For HP XTI over the OSI transport provider, these codes are described in the OTS/9000 manual section under "Transport Errors". For TLI, see the documentation for the transport provider being used. udata identifies any user data that was sent with the disconnect. sequence may identify an outstanding connect indication with which the disconnect is associated. sequence is only meaningful when t_rcvdis() is issued by a passive transport user who has executed one or more t_listen() functions and is processing the resulting connect indications. If a disconnect indication occurs, sequence can be used to identify which of the outstanding connect indications is associated with the disconnect. If a user does not care that there is incoming data and does not need to know the value of reason or sequence, discon may be a null pointer and any user data associated with the disconnect will be discarded. However, if a user has retrieved more than one outstanding connect indication (via t_listen()) and discon is a null pointer, the user will be unable to identify with which connect indication the disconnect is associated. RETURN VALUEUpon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and t_errno is set to indicate the error. ERRORSOn failure, t_errno is set to one of the following:
|
|