Retrieves information from disconnect.
Transport Layer Interface Library (libtli.a)
#include <tiuser.h>
t_rcvdis(fd, discon)
int fd;
struct t_discon * discon;
The t_rcvdis subroutine is used to identify the cause of a disconnect, and to retrieve any user data sent with the disconnect.
fd | Identifies the local transport end point where the connection existed. |
discon | Points to a t_discon structure that contains the reason for
the disconnect and contains any user data that was sent with the
disconnect.
The t_discon structure contains the following members: struct netbuf udata; int reason; int sequence; These fields are defined as follows:
If a user does not care if there is incoming data and does not need to know the value of the reason or sequence fields, the discon parameter may be null and any user data associated with the disconnect will be discarded. However, if a user has retrieved more than one outstanding connect indication (using the t_listen subroutine) and the discon parameter is null, the user will be unable to identify with which connect indication the disconnect is associated. |
On successful completion, the t_rcvdis subroutine returns a value of 0. Otherwise, it returns a value of -1 and sets the t_errno variable to indicate the error.
If unsuccessful, the
t_errno variable may be set to one of the following:
This subroutine is part of Base Operating System (BOS) Runtime.
The t_alloc subroutine, t_connect subroutine, t_listen subroutine, t_open subroutine, t_snddis subroutine.
List of Streams Programming References and STREAMS Overview in AIX 5L Version 5.1 Communications Programming Concepts.