2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH DLPI_BIND 3DLPI "Aug 22, 2007"
8 dlpi_bind \- bind DLPI handle
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-ldlpi\fR [ \fIlibrary\fR ... ]
15 \fBint\fR \fBdlpi_bind\fR(\fBdlpi_handle_t\fR \fIdh\fR, \fBuint_t\fR \fIsap\fR, \fBuint_t *\fR\fIboundsap\fR);
21 The \fBdlpi_bind()\fR function attempts to bind the \fBDLPI\fR handle \fIdh\fR
22 to the \fBSAP\fR \fIsap\fR. The handle must be in the \fBDL_UNBOUND\fR
23 \fBDLPI\fR state and will transition to the \fBDL_IDLE\fR \fBDLPI\fR state upon
24 success. Some \fBDLPI\fR \fBMAC\fR types can bind to a different \fBSAP\fR than
25 the \fBSAP\fR requested, in which case \fIboundsap\fR returns the actual bound
26 \fBSAP\fR. If \fIboundsap\fR is set to \fBNULL\fR, \fBdlpi_bind()\fR fails if
27 the bound \fBSAP\fR does not match the requested \fBSAP\fR. If the caller does
28 not care which \fBSAP\fR is chosen, \fBDLPI_ANY_SAP\fR can be specified for
29 \fIsap\fR. This is primarily useful in conjunction with \fBdlpi_promiscon()\fR
30 and \fBDL_PROMISC_SAP\fR to receive traffic from all \fBSAP\fRs. If
31 \fBDLPI_ANY_SAP\fR is specified, any transmitted messages must explicitly
32 specify a \fBSAP\fR using \fBdlpi_send\fR(3DLPI).
35 Upon success, the caller can use \fBdlpi_recv\fR(3DLPI) to receive data
36 matching the bound \fBSAP\fR that is sent to the \fBDLPI\fR link associated
37 with \fIdh\fR. In addition, the caller can use \fBdlpi_send\fR(3DLPI) to send
38 data over the bound \fBSAP\fR address associated with \fBDLPI\fR handle
39 \fIdh\fR. The physical address of the bound handle can be retrieved with
40 \fBdlpi_info\fR(3DLPI).
44 Upon success, \fBDLPI_SUCCESS\fR is returned. If \fBDL_SYSERR\fR is returned,
45 \fBerrno\fR contains the specific UNIX system error value. Otherwise, a
46 \fBDLPI\fR error value defined in \fB<sys/dlpi.h>\fR or an error value listed
47 in the following section is returned.
52 \fB\fBDLPI_EBADMSG\fR\fR
61 \fB\fBDLPI_EINHANDLE\fR\fR
64 Invalid \fBDLPI\fR handle
70 \fB\fBDLPI_ETIMEDOUT\fR\fR
73 \fBDLPI\fR operation timed out
79 \fB\fBDLPI_EUNAVAILSAP\fR\fR
82 Unavailable \fBDLPI\fR \fBSAP\fR
88 See \fBattributes\fR(5) for description of the following attributes:
96 ATTRIBUTE TYPE ATTRIBUTE VALUE
98 Interface Stability Committed
106 \fBdlpi_info\fR(3DLPI), \fBdlpi_recv\fR(3DLPI), \fBdlpi_send\fR(3DLPI),
107 \fBdlpi_unbind\fR(3DLPI), \fBlibdlpi\fR(3LIB), \fBattributes\fR(5)