The following functions are in the C library for use in
processing the hwinfo section:
- hwi_tag2off()
- unsigned hwi_tag2off(void *);
Given a pointer to the start of a tag, return the offset,
in bytes, from the beginning of the start of the hwinfo
section.
- hwi_off2tag()
- void *hwi_off2tag(unsigned);
Given an offset, in bytes, from the start of the
hwinfo section, return a pointer to the start of
the tag.
- hwi_find_tag()
- unsigned hwi_find_tag(unsigned start, int curr_item, const char *tagname);
Find the tag named tagname. The
start parameter works the same as the one in
hwi_find_item(). If curr_item is
nonzero, the search stops at the end of the current item
(whatever item the start parameter points into).
If curr_item is zero, the search continues until
the end of the section. If the tag isn't found,
HWI_NULL_OFF is returned.
- hwi_next_item()
- unsigned hwi_next_item( unsigned off );
Get the offset of the next item after the given offset from the start of the
hwinfo section.
- hwi_next_tag()
- unsigned hwi_next_tag( unsigned off, int curr_item );
Get the offset of the next tag after the given offset from the start of the
hwinfo section.
As it is for hwi_find_tag(), the curr_item
restricts the search to the current item.
The following functions are in the libdrvr library:
- hwi_find()
- Find a specific item instance owned by a specific parent, resolving all synonym names
- hwi_find_bus()
- Find the offset of the section in the system page for a bus
- hwi_find_device()
- Find the offset in the system page of a device
- hwi_find_devicebus()
- Find the bus that a device belongs to
- hwi_find_num_units()
- Count the instances of a unit in the system page
- hwi_find_unit()
- Determine which instance of a device an offset corresponds to
- hwi_tag_find()
- Locate a specific instance of the named tag for a device
- hwiattr_get(), hwiattr_get_*()
- Get attributes of a bus or device
- hwitag_find_busattr()
- Find a bus attribute tag associated with a bus
- hwitag_find_clkfreq()
- Find the clock source for a device
- hwitag_find_errata()
- Find an erratum for a device
- hwitag_find_ivec()
- Find the interrupt vector associated with a device
- hwitag_find_nicaddr()
- Get the NIC address of a device
- hwitag_find_phyaddr()
- Find the PHY address associated with a device
For more information about these functions, see the
QNX Neutrino C Library Reference.