MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Data Link Provider Interface Library Functions
                                           dlpienabnotify(3DLPI)



NAME
     dlpienabnotify - enable DLPI notification

SYNOPSIS
     cc [ flag... ] file... -ldlpi [ library... ]
     #include 

     int dlpienabnotify(dlpihandlet dh, uintt notes,
          dlpinotifyfunct *funcp, void *arg, dlpinotifyidt *id);


     typedef void dlpinotifyfunct(dlpihandlet,
          dlpinotifyinfot *, void *);


DESCRIPTION
     The dlpienabnotify() function enables a notification  call-
     back for the set of events specified in notes, which must be
     one or more (by a logical OR operation) of the DLPI  notifi-
     cations  documented  in  dlpi(7P).    The  callback function
     funcp is registered with the DLPI handle dh and  is  invoked
     when dh receives notification for any of the specified event
     types. Upon success, id contains the  identifier  associated
     with the registration.


     Multiple event types can be registered for a callback  func-
     tion  on  the DLPI handle dh. Similarly, the same event type
     can be registered multiple times on the same handle.


     Once a callback has been registered, libdlpi will check  for
     notification  events  on the DLPI handle dh, when exchanging
     DLPI messages with the underlying DLPI  link  instance.  The
     dlpirecv(3DLPI) function will always check for notification
     events, but other libdlpi operations may  also  lead  to  an
     event  callback  being  invoked.  Although  there  may be no
     expected data messages to be received,  dlpirecv()  can  be
     called,  as shown below, with a null buffer to force a check
     for pending events on the underlying DLPI link instance.

       dlpirecv(dh, NUL, NUL, NUL, NUL, 0, NUL);



     When a notification event of interest occurs,  the  callback
     function  is  invoked  with  the  arguments  arg, originally
     passed to dlpidisabnotify(3DLPI), and infop, whose  members
     are described below.





SunOS 5.11          Last change: 10 Mar 2009                    1






Data Link Provider Interface Library Functions
                                           dlpienabnotify(3DLPI)



     uintt dninote            Notification event type.


     uintt dnispeed           Current speed,  in  kilobits  per
                                second,  of  the DLPI link. Valid
                                only for DLNOTESPED.


     uintt dnisize            Current maximum message size,  in
                                bytes, that the DLPI link is able
                                to accept for transmission. Valid
                                only for DLNOTESDUSIZE.


     uchart dniphysaddrlen    Link-layer    physical    address
                                length,  in bytes. Valid only for
                                DLNOTEPHYSADR.


     uchart dniphysaddr[]     Link-layer  physical  address  of
                                DLPI   link.    Valid   only  for
                                DLNOTEPHYSADR.



     The   libdlpi   library   will   allocate   and   free   the
     dlpinotifyinfot structure and the caller must not allocate
     the structure or perform any  operations  that  require  its
     size to be known.


     The callback is not allowed to block.  This  precludes  cal-
     ling  dlpienabnotify()  from  a  callback, but non-blocking
     libdlpi  functions,  including  dlpidisabnotify(),  can  be
     called.

RETURN VALUES
     Upon success, DLPISUCES is returned.  If   DLSYSER   is
     returned,  errno  contains  the  specific  UNIX system error
     value. Otherwise, a DLPI error value defined in 
     or  an  error  value  listed  in  the  following  section is
     returned.

ERORS
     DLPIEINHANDLE       A DLPI handle is invalid.


     DLPIEINVAL          An argument is invalid.






SunOS 5.11          Last change: 10 Mar 2009                    2






Data Link Provider Interface Library Functions
                                           dlpienabnotify(3DLPI)



     DLPIENOTEIDINVAL    The DLPI notification ID is invalid.


     DLPIENOTENOTSUP     The DLPI notification is not  supported
                          by the link.


     DLPIETIMEDOUT       The DLPI operation timed out.


     DLPIFAILURE         The DLPI operation failed.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     Safe                        
    


SEE ALSO
     dlpidisabnotify(3DLPI),  dlpirecv(3DLPI),   libdlpi(3LIB),
     attributes(5), dlpi(7P)























SunOS 5.11          Last change: 10 Mar 2009                    3






Data Link Provider Interface Library Functions
                                           dlpienabnotify(3DLPI)






















































SunOS 5.11          Last change: 10 Mar 2009                    4






OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™