Using the HP-UX libIO Library

Miscellaneous Routines
The libIO library contains the following routines for miscellaneous services:
Routine Description
io_is_legacy_token()
Determines whether token is of agile or legacy style.
io_is_option_set()
Determines if the option(s) is set for a dev_t.
io_get_node_relation()
Retrieve a relative of a given node token.
io_get_mapping()
Get the mapping of lun to/from lunpath tokens
and legacy to/from agile node.
io_is_legacy_token()
This routine accepts a node token and determines whether it is of agile or legacy
style. The function prototype of this routine is:
int io_is_legacy_token(io_token_t token);
The routine returns:
IO_TOKEN_NEW - if token is in the agile I/O Tree
IO_TOKEN_LEGACY - if token is in the legacy I/O Tree
IO_ERROR – Otherwise, io_errno is set to indicate the error.
io_get_node_relation()
This routine retrieves a relative of the given node token. The function prototype of this
routine is:
int io_get_node_relation (io_token_t node, int relationship,
uint64 addr, io_token_t *relative );
This routine is called to get the relative of the I/O node specified by node. The
parameter relationship indicates the type of relation. Valid relations are:
IO_REL_CHILD
IO_REL_PARENT
IO_REL_SIBLING
The node token of the relative is returned in the parameter relative. If either
IO_REL_CHILD or IO_REL_SIBLING is specified, the parameters addr and
relative can be used to specify the child or sibling.