1di_walk_lnode(3DEVINFOD)evice Information Library Functiondsi_walk_lnode(3DEVINFO)
2
3
4

NAME

6       di_walk_lnode - traverse libdevinfo lnodes
7

SYNOPSIS

9       cc [ flag... ] file... -ldevinfo [ library... ]
10       #include <libdevinfo.h>
11
12       int di_walk_lnode(di_node_t root, uint_t flag, void *arg,
13            int (*lnode_callback)(di_lnode_t link, void *arg));
14
15

PARAMETERS

17       root              The handle to the root node of the subtree to visit.
18
19
20       flag              Specify 0. Reserved for future use.
21
22
23       arg               A pointer to caller-specific data.
24
25
26       lnode_callback    The caller-supplied callback function.
27
28

DESCRIPTION

30       The  di_walk_lnode() function visits all nodes in the subtree rooted at
31       root.  For each node found, the  caller-supplied  function  lnode_call‐
32       back() is invoked for each lnode associated with that node.  The return
33       value of lnode_callback() specifies subsequent walking  behavior  where
34       that node is the specified endpoint of the link.
35

RETURN VALUES

37       Upon  successful  completion, di_walk_lnode() returns 0.  Otherwise, -1
38       is returned and errno is set to indicate the error.
39
40
41       The callback function lnode_callback() can return one of the following:
42
43       DI_WALK_CONTINUE     Continue walking.
44
45
46       DI_WALK_TERMINATE    Terminate the walk immediately.
47
48

ERRORS

50       The di_walk_lnode() function will fail if:
51
52       EINVAL    An argument is invalid.
53
54

ATTRIBUTES

56       See attributes(5) for descriptions of the following attributes:
57
58
59
60
61       ┌─────────────────────────────┬─────────────────────────────┐
62       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
63       ├─────────────────────────────┼─────────────────────────────┤
64       │Interface Stability          │Evolving                     │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │MT-Level                     │Safe                         │
67       └─────────────────────────────┴─────────────────────────────┘
68

SEE ALSO

70       di_init(3DEVINFO), libdevinfo(3LIB), attributes(5)
71
72
73
74SunOS 5.11                        22 Mar 2004          di_walk_lnode(3DEVINFO)
Impressum