'\" 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 "15 Jun 2007" "SunOS 5.11" "Data Link Provider Interface Library Functions" .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(7M). 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(5) for description of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBpoll\fR(2), \fBlibdlpi\fR(3LIB), \fBattributes\fR(5), \fBdlpi\fR(7P), \fBpfmod\fR(7M)