di_walk_minor - traverse libdevinfo minor nodes
cc [ flag... ] file... -ldevinfo [ library... ] #include <libdevinfo.h> int di_walk_minor(di_node_t root, const char *minor_nodetype, uint_t flag, void *arg, int (*minor_callback)di_node_t node, di_minor_t minor, void *arg);
arg
flag
minor
minor_nodetype
node
root
The di_walk_minor() function visits all minor nodes attached to device nodes in a subtree rooted at root. For each minor node that matches minor_nodetype, the caller-supplied function minor_callback() is invoked. The walk terminates immediately when minor_callback() returns DI_WALK_TERMINATE.
Upon successful completion, di_walk_minor() returns 0. Otherwise, -1 is returned and errno is set to indicate the error.
The minor_callback() function returns one of the following:
DI_WALK_CONTINUE
DI_WALK_TERMINATE
The di_walk_minor() function will fail if:
EINVAL
See attributes(5) for descriptions of the following attributes:
|
dladm(1M), di_minor_nodetype(3DEVINFO), dlpi_walk(3DLPI), libdevinfo(3LIB), attributes(5), filesystem(5), ddi_create_minor_node(9F)
The di_walk_minor() function is no longer an accurate method for walking network datalink interfaces on the system. Applications should use dlpi_walk(3DLPI) instead. It has been common for applications to use di_walk_minor() to walk networking devices by passing in a minor_nodetype of DDI_NT_NET, in most cases to discover the set of DLPI devices on the system. Solaris now makes a layering distinction between networking devices (the objects displayed by dladm show-dev) and network datalink interfaces (the objects displayed by dladm show-link). Datalink interfaces are represented as the set of DLPI device nodes that applications can open by using dlpi_open(3DLPI) or by opening DLPI nodes out of the /dev/net filesystem (see filesystem(5)). The dlpi_walk(3DLPI) function is the proper function to walk these nodes.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |