STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
179
NAME
getmid () getmid returns the module identifier for a specified module or driver name.
SYNOPSIS
#include <sys/types.h>
#include <sys/stream.h>
ushort_t getmid (char *name);
PARAMETERS
name
Name of module/driver.
DESCRIPTION
This function looks into the module_info structure for the module/driver as specified in name and retrieves
the mi_idnum value. Note that while the module_info information may be available in both the read-side and
write-side qinit structures, but getadmin() looks only at the read-side qinit.
RETURN VALUES
getmid() returns the module identifier if a module/driver is found with the specified name, and a 0 if no
matching module name is found.
CONSTRAINTS
getmid() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock order can
be held across this call.