Using the HP-UX libIO Library

If relative is NULL, addr is used to identify a particular child or sibling. If
relative is not NULL, addr is ignored.
If relative is equivalent to node, the first child or sibling is returned. Otherwise,
the next child or sibling (after the one identified by relative) is returned.
io_is_option_set()
This routine determines if the option(s) is set for a dev. The function prototype of this
routine is:
int io_is_option_set(dev_t dev, int dev_type, char *options);
This function calls io_mkdev() with or without options to generate an option mask.
This mask is "anded" with dev and the boolean result is returned. This routine does
not distinguish between one or more options set or multi-bit options.
io_get_mapping()
This routine gets the mapping of lun to/from lunpath tokens, and legacy to/from
agile node. The function prototype of this routine is:
int io_get_mapping(io_token_t node, io_map_type_t map_type,
int *count, io_token_t *token_arry);
The map type is:
IO_LEGACY_2_NEW - map legacy to agile node
IO_NEW_2_LEGACY - map agile to legacy node
IO_LUN_2_LUNPATH - map lun to lunpath
IO_LUNPATH_2_LUN - map lunpath to lun
It returns all the io_token_ts mapped to the given node. The caller must allocate
an array of io_token_t and indicate its size (number of io_token_t) in count.
The interface will copy the data into the array if it is large enough and return the
actual count. If the array is not big enough:
1. No data will be returned,
2. The count will be set to represent the required size,
3. The service will return IO_ERROR,and
4. io_errno will be set to IO_E_BUF_TOO_SMALL.
The caller must reallocate a larger buffer and calls the routine again.