LDI_EV_GET_COOKIE(9F) | Kernel Functions for Drivers | LDI_EV_GET_COOKIE(9F) |
ldi_ev_get_cookie - get an LDI event cookie for a specified event
#include <sys/sunldi.h> int ldi_ev_get_cookie(ldi_handle_t lh, char *evname,
ldi_ev_cookie_t *cookiep);
illumos DDI specific (illumos DDI)
ldi_handle_t lh
char *evname
ldi_ev_cookie_t *cookiep
The ldi_ev_get_cookie() function accepts the string name of a state change event affecting the device represented by the layered driver handle "lh" and returns an opaque cookie on success. The call is successful if the framework supports event notification for the event named by "evname". If successful, the function returns an opaque cookie through the "cookiep" parameter. The cookie is required in subsequent calls for registering callbacks on events.
The following two LDI events are currently defined:
LDI_EV_OFFLINE
LDI_EV_DEGRADE
ldi_ev_get_cookie() also accepts the string name of any events defined for NDI event services. For such events, ldi_ev_get_cookie() replaces ldi_get_eventcookie(9F) (which is now obsolete).
The return values for this function are:
LDI_EV_SUCCESS
LDI_EV_FAILURE
This function can be called from user and kernel contexts only.
August 21, 2007 | OmniOS |