di_walk_minor(3devinfo) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

di_walk_minor(3devinfo)

Device Information Library Functions                   di_walk_minor(3DEVINFO)



NAME
       di_walk_minor - traverse libdevinfo minor nodes

SYNOPSIS
       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));

PARAMETERS
       arg               Pointer to caller- specific user data.


       flag              Specify 0. Reserved for future use.


       minor             The minor node visited.


       minor_nodetype    A  character  string  specifying the minor data type,
                         which may be one of the types defined by the  Solaris
                         DDI   framework,   for  example,  DDI_NT_BLOCK.  NULL
                         matches   all   minor_node   types.   See    ddi_cre‐
                         ate_minor_node(9F).


       node              The device node with which to the minor node is asso‐
                         ciated.


       root              Root of subtree to visit.


DESCRIPTION
       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.

RETURN VALUES
       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     Continue to visit subsequent minor data nodes.


       DI_WALK_TERMINATE    Terminate the walk immediately.


ERRORS
       The di_walk_minor() function will fail if:

       EINVAL    Invalid argument.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe


SEE ALSO
       di_minor_nodetype(3DEVINFO),    libdevinfo(3LIB),     dlpi_walk(3DLPI),
       attributes(7), filesystem(7), dladm(8), ddi_create_minor_node(9F)


       Writing Device Drivers in Oracle Solaris 11.4

NOTES
       The  di_walk_minor() function is no longer an accurate method for walk‐
       ing 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_node‐
       type  of  DDI_NT_NET, in most cases to discover the set of DLPI devices
       on the system. Solaris now makes a layering  distinction  between  net‐
       working  devices  (the  objects  displayed in the DEVICE field by dladm
       show-phys) 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 filesys‐
       tem(7)). The dlpi_walk(3DLPI) function is the proper function  to  walk
       these nodes.



Oracle Solaris 11.4               14 Jan 2009          di_walk_minor(3DEVINFO)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3