#ident "@(#)di_walk_hp.3devinfo.txt 1.2 09/08/09 SMI" Device Information Library Functions di_walk_hp(3DEVINFO) NAME di_walk_hp - traverse libdevinfo hotplug nodes SYNOPSIS cc [ flag... ] file... -ldevinfo [ library... ] #include int di_walk_hp(di_node_t root, const char *hotplug_type, uint_t flag, void *arg, int (*hp_callback)(di_node_t node, di_hp_t hp, void *arg)); PARAMETERS arg Pointer to caller-specific user data. flag Traversal content specification. The possible values can be a bitwise OR of at least one of the following: DI_HP_CONNECTOR Include physical hotplug connectors. DI_HP_PORT Include virtual hotplug ports. hp The hotplug node visited. hotplug_type A character string specifying the hotplug connection type to visit. It may be one of the values returned by the function di_hp_description(3DEVINFO). NULL matches all hotplug connection types. node The device node to which the hotplug node is associated. root Root of subtree to visit. DESCRIPTION The di_walk_hp() function visits all hotplug connection nodes attached to device nodes in a subtree rooted at root. For each hotplug node that matches hotplug_type, the caller-supplied function hp_callback() is invoked. The walk terminates immediately when hp_callback() returns DI_WALK_TERMINATE. RETURN VALUES Upon successful completion, di_walk_hp() returns 0. Otherwise, -1 is returned and errno is set to indicate the error. The hp_callback() function returns one of the following: DI_WALK_CONTINUE Continue to visit subsequent hotplug connection nodes. DI_WALK_TERMINATE Terminate the walk immediately. ERRORS The di_walk_hp() function will fail if: EINVAL Invalid argument. ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Interface Stability | Consolidation Private | |_____________________________|_____________________________| | MT-Level | Safe | |_____________________________|_____________________________| SEE ALSO di_hp_name(3DEVINFO), libdevinfo(3LIB), attributes(5) Writing Device Drivers