2 .\" Copyright (c) 2003, 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 DDI_GET_EVENTCOOKIE 9F "Nov 6, 2003"
8 ddi_get_eventcookie \- retrieve a NDI event service cookie handle
12 #include <sys/dditypes.h>
13 #include <sys/sunddi.h>
15 \fBint\fR \fBddi_get_eventcookie\fR(\fBdev_info_t *\fR\fIdip\fR, \fBchar *\fR\fIname\fR,
16 \fBddi_eventcookie_t *\fR\fIevent_cookiep\fR);
22 Solaris DDI specific (Solaris DDI).
27 \fB\fBdev_info_t *\fR\fIdip\fR\fR
31 Child device node requesting the cookie.
37 \fB\fBchar *\fR\fIname\fR\fR
41 NULL-terminated string containing the name of the event.
47 \fB\fBddi_eventcookie_t *\fR\fIevent_cookiep\fR\fR
51 Pointer to cookie where event cookie will be returned.
57 The \fBddi_get_eventcookie()\fR function queries the device tree for a cookie
58 matching the given event name and returns a reference to that cookie. The
59 search is performed by a calling up the device tree hierarchy until the request
60 is satisfied by a bus nexus driver, or the top of the \fBdev_info\fR tree is
64 The cookie returned by this function can be used to register a callback
65 handler, unregister a callback handler, or post an event.
70 \fB\fBDDI_SUCCESS\fR\fR
73 Cookie handle is returned.
79 \fB\fBDDI_FAILURE\fR\fR
82 Request was not serviceable by any nexus driver in the driver's ancestral
83 device tree hierarchy.
89 The \fBddi_get_eventcookie()\fR function can be called from user and kernel
94 See \fBattributes\fR(5) for a description of the following attributes:
102 ATTRIBUTE TYPE ATTRIBUTE VALUE
104 Interface Stability Committed
110 \fBattributes\fR(5), \fBddi_add_event_handler\fR(9F),
111 \fBddi_remove_event_handler\fR(9F)
114 \fIWriting Device Drivers\fR