#include <sys/ddi.h> int drv_getparm(unsigned long parm, unsigned long *value_p);
Architecture independent level 1 (DDI/DKI).
- LBOLT
- Read the value of lbolt. (lbolt is an integer that represents the number of clock ticks since the last system reboot. This value is used as a counter or timer inside the system kernel.)
- PPGRP
- Read the process group identification number. This number determines which processes should receive a HANGUP or BREAK signal when detected by a driver.
- UPROCP
- Read the process table token value.
- PPID
- Read process identification number.
- PSID
- Read process session identification number.
- TIME
- Read time in seconds.
- UCRED
- Return a pointer to the caller’s credential structure.
drv_getparm() function verifies that parm corresponds to a kernel parameter that may be read. If the value of parm does not correspond to a parameter or corresponds to a parameter that may not be read, -1 is returned. Otherwise, the value of the parameter is stored in the data space pointed to by value_p.
drv_getparm() does not explicitly check to see whether the device has the appropriate context when the function is called and the function does not check for correct alignment in the data space pointed to by value_p. It is the responsibility of the driver writer to use this function only when it is appropriate to do so and to correctly declare the data space needed by the driver.
drv_getparm() can be called from user context only when using PPGRP , PPID , PSID , UCRED , or UPROCP . It can be called from user or interrupt context when using the LBOLT or TIME argument.