Kernel Functions for Drivers ldievgetcookie(9F)
NAME
ldievgetcookie - get an LDI event cookie for a specified
event
SYNOPSIS
#include
int ldievgetcookie(ldihandlet lh, char *evname,
ldievcookiet *cookiep);
INTERFACE LEVEL
Solaris DI specific (Solaris DI)
PARAMETERS
ldihandlet lh
A layered handle representing the device for which the
event notification was requested.
char *evname
The string name of the event.
ldievcookiet *cookiep
A pointer to type ldievcookiet. Contains a pointer to
the event cookie on return.
DESCRIPTION
The ldievgetcookie() 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 suc-
cessful, 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:
LDIEVOFLINE
The device is moving to the offline state.
LDIEVDEGRADE
SunOS 5.11 Last change: 21 Aug 2007 1
Kernel Functions for Drivers ldievgetcookie(9F)
The device is moving to the degraded state.
ldievgetcookie() also accepts the string name of any
events defined for NDI event services. For such events,
ldievgetcookie() replaces ldigeteventcookie(9F) (which
is now obsolete).
RETURN VALUES
The return values for this function are:
LDIEVSUCES
The event cookie was created successfully.
LDIEVFAILURE
An error occurred and the cookie was not created.
CONTEXT
This function can be called from user and kernel contexts
only.
SEE ALSO
ldievregistercallbacks(9F), ldievremovecallbacks(9F)
SunOS 5.11 Last change: 21 Aug 2007 2
|