'\" 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 "April 9, 2016" .SH NAME dlbindack, dlphysaddrack, dlokack, dlerrorack, dluderrorind \- DLPI device driver helper functions .SH SYNOPSIS .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 illumos DDI specific (illumos DDI). .SH PARAMETERS .ne 2 .na \fB\fIwq\fR\fR .ad .RS 21n Streams write queue. .RE .sp .ne 2 .na \fB\fImp\fR\fR .ad .RS 21n Pointer to the bind request message. .RE .sp .ne 2 .na \fB\fIsap\fR\fR .ad .RS 21n Service access point being requested. .RE .sp .ne 2 .na \fB\fIaddrp\fR\fR .ad .RS 21n Pointer to the dlpi layer source address. .RE .sp .ne 2 .na \fB\fIaddrlen\fR\fR .ad .RS 21n Size of the \fBdlpi\fR layer address pointed to by \fIaddr\fR. .RE .sp .ne 2 .na \fB\fImaxconind\fR\fR .ad .RS 21n Maximum number of \fBDL_CONNECT_IND\fR messages allowed to be outstanding per stream. .RE .sp .ne 2 .na \fB\fIxidtest\fR\fR .ad .RS 21n The \fBXID\fR and \fBTEST\fR responses supported. .RE .sp .ne 2 .na \fB\fIcorrect_primitive\fR\fR .ad .RS 21n Identifies the \fBDL\fR primitive completing successfully. .RE .sp .ne 2 .na \fB\fIerror_primitive\fR\fR .ad .RS 21n Identifies the \fBDL\fR primitive in error. .RE .sp .ne 2 .na \fB\fIerror\fR\fR .ad .RS 21n \fBDLPI\fR error associated with the failure in the \fBDLPI\fR request. .RE .sp .ne 2 .na \fB\fIunix_errno\fR\fR .ad .RS 21n Corresponding \fBUNIX\fR system error that can be associated with the failure in the \fBDLPI\fR request. .RE .SH DESCRIPTION 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 successful 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 unsuccessful 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 None. .SH NOTES These functions are not required if you are are writing a \fBDLPI\fR device driver using \fBgld\fR(4D). .SH CONTEXT All \fBDLPI\fR helper functions can be called from user, interrupt, or kernel context. .SH SEE ALSO .BR gld (4D), .BR dlpi (4P), .BR qreply (9F) .sp .LP \fIWriting Device Drivers\fR .sp .LP \fISTREAMS Programming Guide\fR