'\" te
.\" This manual page is derived from the DAT/uDAPL 1.2 specification.
.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH DAT_EP_GET_STATUS 3DAT "Jul 16, 2004"
.SH NAME
dat_ep_get_status \- provide a quick snapshot of the Endpoint
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-ldat\fR [ \fIlibrary\fR\&.\|.\|. ]
#include <\fBdat/udat.h\fR>

DAT_RETURN
    dat_ep_get_status (
    IN    DAT_EP_HANDLE    ep_handle,
    OUT   DAT_EP_STATE     *ep_state,
    OUT   DAT_BOOLEAN      *recv_idle,
    OUT   DAT_BOOLEAN      *request_idle
    )
.fi

.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIep_handle\fR\fR
.ad
.RS 16n
Handle for an instance of the Endpoint.
.RE

.sp
.ne 2
.na
\fB\fIep_state\fR\fR
.ad
.RS 16n
Current state of the Endpoint.
.RE

.sp
.ne 2
.na
\fB\fIrecv_idle\fR\fR
.ad
.RS 16n
Status of the incoming DTOs on the Endpoint.
.RE

.sp
.ne 2
.na
\fB\fIrequest_idle\fR\fR
.ad
.RS 16n
Status of the outgoing DTOs and RMR Bind operations on the Endpoint.
.RE

.SH DESCRIPTION
.sp
.LP
the \fBdat_ep_get_status()\fR function provides the Consumer a quick snapshot
of the Endpoint. The snapshot consists of the Endpoint state and whether there
are outstanding or in-progress, incoming or outgoing DTOs. Incoming DTOs
consist of Receives. Outgoing DTOs consist of the Requests, Send, RDMA Read,
RDMA Write, and RMR Bind.
.sp
.LP
The \fIep_state\fR parameter returns the value of the current state of the
Endpoint \fIep_handle\fR. State value is one of the following:
\fBDAT_EP_STATE_UNCONNECTED\fR, \fBDAT_EP_STATE_RESERVED\fR,
\fBDAT_EP_STATE_PASSIVE_CONNECTION_PENDING\fR,
\fBDAT_EP_STATE_ACTIVE_CONNECTION_PENDING\fR,
\fBDAT_EP_STATE_TENTATIVE_CONNECTION_PENDING\fR, \fBDAT_EP_STATE_CONNECTED\fR,
\fBDAT_EP_STATE_DISCONNECT_PENDING\fR, or \fBDAT_EP_STATE_DISCONNECTED\fR.
.sp
.LP
A \fIrecv_idle\fR value of \fBDAT_TRUE\fR specifies that there are no
outstanding or in-progress Receive DTOs at the Endpoint, and \fBDAT_FALSE\fR
otherwise.
.sp
.LP
A \fIrequest_idle\fR value of \fBDAT_TRUE\fR specifies that there are no
outstanding or in-progress Send, RDMA Read, and RDMA Write DTOs, and RMR Binds
at the Endpoint, and \fBDAT_FALSE\fR otherwise.
.sp
.LP
This call provides a snapshot of the Endpoint status only. No heroic
synchronization with DTO queuing or processing is implied.
.SH RETURN VALUES
.sp
.ne 2
.na
\fB\fBDAT_SUCCESS\fR\fR
.ad
.RS 22n
The operation was successful.
.RE

.sp
.ne 2
.na
\fB\fBDAT_INVALID_HANDLE\fR\fR
.ad
.RS 22n
The \fIep_handle\fR parameter is invalid.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard: uDAPL, 1.1, 1.2
_
MT-Level	Safe
.TE

.SH SEE ALSO
.sp
.LP
\fBlibdat\fR(3LIB), \fBattributes\fR(5)