STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
178
NAME
getadmin () – Returns a pointer to the module administration function.
SYNOPSIS
#include <sys/types.h>
#include <sys/stream.h>
int (*getadmin(ushort_t mid))();
PARAMETERS
mid
Module ID of module/driver, for which the administration function pointer is needed.
DESCRIPTION
getadmin() returns a pointer to the module administration function. The module administration function is
pointed to by qqadmin, a member of the qinit structure. The module identifier is available in the mi_idnum
field of the module_info structure. The qi_minfo field of the qinit structure points to the module_info
structure. Note that while the module_info information may be available in both the read- and write-side
qinit structures, but getadmin() returns the admin() function pointer from read-side qinit structure.
RETURN VALUES
getadmin returns a pointer to the module administration function if a module or driver is present with the
specified identifier (
mid
). It returns NULL if no module or driver is present with that identifier.
CONSTRAINTS
getadmin() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock order
can be held across this call.