'\" te .\" 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 DLPI_FD 3DLPI "Jun 15, 2007" .SH NAME dlpi_fd \- get DLPI file descriptor .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-ldlpi\fR [ \fIlibrary\fR ... ] #include \fBint\fR \fIdlpi_fd\fR(\fBdlpi_handle_t\fR \fIdh\fR); .fi .SH DESCRIPTION .sp .LP The \fBdlpi_fd()\fR function returns the integer file descriptor that can be used to directly operate on the open \fBDLPI\fR stream associated with the \fBDLPI\fR handle \fIdh\fR. This file descriptor can be used to perform non-\fBDLPI\fR operations that do not alter the state of the \fBDLPI\fR stream, such as waiting for an event using \fBpoll\fR(2), or pushing and configuring additional \fBSTREAMS\fR modules, such as \fBpfmod\fR(4M). If \fBDLPI\fR operations are directly performed on the file descriptor, or a \fBSTREAMS\fR module is pushed that alters the message-passing interface such that \fBDLPI\fR operations can no longer be issued, future operations on \fIdh\fR might not behave as documented. .sp .LP The returned file descriptor is managed by \fBlibdlpi\fR(3LIB) and the descriptor must not be closed. .SH RETURN VALUES .sp .LP The function returns the integer file descriptor associated with the \fBDLPI\fR handle \fIdh\fR. If \fIdh\fR is invalid, \fB-1\fR is returned. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for description of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level Safe .TE .SH SEE ALSO .sp .LP .BR poll (2), .BR libdlpi (3LIB), .BR pfmod (4M), .BR dlpi (4P), .BR attributes (7)