DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer 5

getmid(D3str)


getmid -- given the driver or module name, return module identifier

Synopsis (Not in DDI)

#include <sys/types.h>
#include <sys/stream.h>

ushort_t getmid(char *name);

Description

The getmid function returns the module identifier for the driver or module called name.

Arguments


name

Return values

Returns the module identifier of the driver or module which has the given name, or 0 if the given name cannot be found.

Usage

It first searches the character device table for any STREAMS driver with the given name, then searches the STREAMS pushable module table. If no driver or module can be found with that name, the function returns zero.

The module name is usually the same as the driver or module and is held in the mi_idname member of the module_info structure pointed to by the qi_minfo member of the qinit structure, which is usually hard coded for each driver or module. The name should be unique.

Context and synchronization

context

Hardware applicability

All

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

Calls to getmid( ) can be deleted when porting drivers to DDI; it is not necessary to replace it with anything.

References

getadmin(D3str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005