'\" te .\" Copyright (c) 2006, 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 dlbindack 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME dlbindack, dlphysaddrack, dlokack, dlerrorack, dluderrorind \- DLPI device driver helper functions .SH SYNOPSIS .LP .nf #include \fBvoid\fR \fBdlokack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBt_uscalar_t\fR \fIcorrect_primitive\fR); .fi .LP .nf \fBvoid\fR \fBdlerrorack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBt_uscalar_t\fR \fIerror_primitive\fR, \fBt_uscalar_t\fR \fIerror\fR, \fBt_uscalar_t\fR \fIunix_errno\fR); .fi .LP .nf \fBvoid\fR \fBdlbindack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBt_scalar_t\fR \fIsap\fR, \fBconst void *\fR\fIaddrp\fR, \fBt_uscalar_t\fR \fIaddrlen\fR, \fBt_uscalar_t\fR \fImaxconind\fR, \fB t_uscalar_t\fR \fIxidtest\fR); .fi .LP .nf \fBvoid\fR \fBdlphysaddrack\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBconst void *\fR\fIaddrp\fR, \fBt_uscalar_t\fR \fIaddrlen\fR); .fi .LP .nf \fBvoid\fR \fBdluderrorind\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBconst void *\fR\fIaddrp\fR, \fBt_uscalar_t\fR \fIaddrlen\fR, \fBt_uscalar_t\fR \fIerror\fR, \fBt_uscalar_t\fR \fIunix_errno\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris DDI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIwq\fR\fR .ad .RS 21n .rt Streams write queue. .RE .sp .ne 2 .mk .na \fB\fImp\fR\fR .ad .RS 21n .rt Pointer to the bind request message. .RE .sp .ne 2 .mk .na \fB\fIsap\fR\fR .ad .RS 21n .rt Service access point being requested. .RE .sp .ne 2 .mk .na \fB\fIaddrp\fR\fR .ad .RS 21n .rt Pointer to the dlpi layer source address. .RE .sp .ne 2 .mk .na \fB\fIaddrlen\fR\fR .ad .RS 21n .rt Size of the \fBdlpi\fR layer address pointed to by \fIaddr\fR. .RE .sp .ne 2 .mk .na \fB\fImaxconind\fR\fR .ad .RS 21n .rt Maximum number of \fBDL_CONNECT_IND\fR messages allowed to be outstanding per stream. .RE .sp .ne 2 .mk .na \fB\fIxidtest\fR\fR .ad .RS 21n .rt The \fBXID\fR and \fBTEST\fR responses supported. .RE .sp .ne 2 .mk .na \fB\fIcorrect_primitive\fR\fR .ad .RS 21n .rt Identifies the \fBDL\fR primitive completing successfully. .RE .sp .ne 2 .mk .na \fB\fIerror_primitive\fR\fR .ad .RS 21n .rt Identifies the \fBDL\fR primitive in error. .RE .sp .ne 2 .mk .na \fB\fIerror\fR\fR .ad .RS 21n .rt \fBDLPI\fR error associated with the failure in the \fBDLPI\fR request. .RE .sp .ne 2 .mk .na \fB\fIunix_errno\fR\fR .ad .RS 21n .rt Corresponding \fBUNIX\fR system error that can be associated with the failure in the \fBDLPI\fR request. .RE .SH DESCRIPTION .sp .LP All functions described in this manpage take a pointer to the message passed to the \fBDLPI\fR provider (\fBmblk_t\fR) and attempt to reuse it in formulating the \fBM_PROTO\fR reply. If the message block is too small to be reused, it is freed and a new one is allocated. .sp .LP All functions reply upstream using \fBqreply\fR(9F). The write-side queue pointer must be provided. .sp .LP The \fBdlokack()\fR function provides the successfull acknowledgement \fBDL_OK_ACK\fR message reply to the \fBDLPI\fR provider and is used to complete many of the \fBDLPI\fR requests in the \fBDLPI\fR consumer. .sp .LP The \fBdlerrorack()\fR function provides the unsuccessfull acknowledgement \fBDL_ERROR_ACK\fR message reply to the \fBDLPI\fR() provider and is used for error completions were required for \fBDLPI\fR requests in the \fBDLPI\fR consumer. .sp .LP The \fBdlbindack()\fR function provides the \fBDL_BIND_ACK\fR message reply to the \fBDLPI\fR provider and is used to complete the \fBDL_BIND_REQ\fR processing in the \fBDLPI\fR consumer. .sp .LP The \fBdlphysaddrack()\fR function provides the \fB\fR()\fBDL_PHYS_ADDR_ACK\fR message reply used to complete the \fBDL_PHYS_ADDR_ACK\fR processing. .sp .LP The \fBdluderrorind()\fR function provides the \fBDL_UDERROR_IND\fR message reply used to complete an unsuccessful \fBDL_UNITDATA_REQ\fR. .SH RETURN VALUES .sp .LP None. .SH NOTES .sp .LP These functions are not required if you are are writing a \fBDLPI\fR device driver using \fBgld\fR(7D). .SH CONTEXT .sp .LP All \fBDLPI\fR helper functions can be called from user, interrupt, or kernel context. .SH SEE ALSO .sp .LP \fBgld\fR(7D), \fBdlpi\fR(7P), \fBqreply\fR(9F) .sp .LP \fIWriting Device Drivers\fR .sp .LP \fISTREAMS Programming Guide\fR