The getdmapent(), getdmapnam(), getdmapdev(), and getdmaptype() functions each return a device_deallocate entry. The getdmapent() function enumerates all device_maps
entries. The getdmaptype() function enumerates device_maps entries with a given device type. Successive calls to these functions return either successive device_maps entries or NULL. The getdmapnam()
function searches for a device_maps entry with a given device allocation name. The getdmapdev() function searches for a device_maps entry containing a given device special file.
The internal representation of a device_maps entry is a devmap_t structure defined in <bsm/devices.h> with the following members:
|
char *dmap_devname; /* device allocation name */
char *dmap_devtype; /* generic device type */
char *dmap_devlist; /* list of associated device special files */
|
The setdmapent() function "rewinds" to the beginning of the enumeration of device_maps entries. Calls to getdmapnam() may leave the enumeration in an indeterminate state, so setdmapent() should be called before
the first call to getdmapent() or getdmaptype().
The enddmapent() function can be called to indicate that device_maps processing is complete. The library can then close any open device_maps file, deallocate any internal storage, and so forth.
The setdmapfile() function changes the pathname used by the other functions for opening the device_maps file, allowing use of device_maps files other than the default file, /etc/security/device_maps.
|