Using the HP-UX libIO Library

dev_t Related Routines
The operating system communicates with the hardware by associating the driver
name with a hardware address and recognizes interface and device drivers by a
unique number named dev_t. The communication generally pertains to input/output
related to that device. The libIO routines related to dev_t are listed in Table 5.
Table 5 – dev_t Related Routines
Routine Description
io_mkdev()
Creates a legacy dev_t
io_mkdev_ext()
Creates an agile dev_t
io_get_devs()
Returns all dev_ts and device options of an I/O
node
io_dev_to_options()
Returns the device specific options of a given
dev_t
io_is_legacy_dev()
Returns TRUE if the dev_t is legacy
io_dev_to_node()
Returns a I/O Tree node corresponding to the
specified dev_t
io_legacy_to_new_dev()
Returns the agile dev_t for the given legacy
dev_t
io_new_to_legacy_devs()
Returns all the legacy dev_ts of the agile dev_t
io_raw_to_block()
Returns the block dev_t of the given character
dev_t
io_block_to_raw()
Returns the character dev_t of the given block
dev_t
io_mkdev()
This routine is used to create a dev_t for the given legacy node or to query the
dev_t of the given legacy node. The function prototype of this routine is:
int io_mkdev(io_token_t node, int dev_type, char *options,
dev_t *dev);
io_mkdev_ext()
This routine is used to create a dev_t for the given agile node or to query the
dev_t of the agile node. The function prototype of this routine is:
dev_t io_mkdev_ext(void *node, int dev_type,
uint64_t options);
It returns the dev_t given the node, dev_t type (D_BLK or D_CHR), and device-
specific options. The device specific options are specified as an integer bitmask.