MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers        neteventnotifyregister(9F)



NAME
     neteventnotifyregister,   neteventnotifyunregister   -
     add/delete a function to be called for changes to a event

SYNOPSIS
     #include 
     #include 

     int neteventnotifyregister(nethandlet family, char
          *event, hooknotifyfnt *callback, void *arg);

     int neteventnotifyunregister(nethandlet family, char
          *event, hooknotifyfnt *callback);

     typedef int (* hooknotifyfnt)(hooknotifycmdt command,
          void *arg, const char *name1, const char *name2, const char
          *name3);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     family      value  returned  from  a  successful   call   to
                 netprotocollookup().


     callback    function to call when a change occurs.


     event       name of the  event  for  which  notification  of
                 change is desired.


     arg         pointer to pass  into  the  callback()  function
                 when a change occurs.


DESCRIPTION
     The neteventnotifyregister() function registers  a  func-
     tion  represented  by the pointer callback to be called when
     there is a change to the event represented  by  family.  The
     types  of  changes for which notifications are available for
     is currently limited to the addition and removal of hooks.


     The neteventnotifyunregister()  function  indicates  that
     there  is  no  longer  any desire to receive notification of
     changes to the event through function calls to the specified
     callback.





SunOS 5.11          Last change: 30 Oct 2008                    1






Kernel Functions for Drivers        neteventnotifyregister(9F)



     The name of a hook should be considered a private  interface
     unless  otherwise specified. The hook names used by IPFilter
     in Solaris are a public, but uncommitted, interface.


     Multiple callback functions may be registered  through  this
     interface.  The  same  set  of  parameters is passed to each
     callback  function.  The  memory  referenced   through   the
     pointers  passed  to   the   callback  should  be treated as
     pointing to read-only memory. Changing this data is strictly
     prohibited.


     The function that is called when the event occurs  must  not
     block any other events.


     The arguments passed through to the callback are as  follows
     (the command is either HNREGISTER or HNUNREGISTER):

     name1    is the name of the protocol.


     name2    is the name of the event


     name3    is the name of the hook being added/removed


RETURN VALUES
     If these functions succeed, 0 is  returned.  Otherwise,  the
     following error is returned:

     EXIST    the given callback function is already registered.


CONTEXT
     These functions may be called from user or kernel context.

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













SunOS 5.11          Last change: 30 Oct 2008                    2






Kernel Functions for Drivers        neteventnotifyregister(9F)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWcsu                     
    
     Interface Stability          Committed                   
    


SEE ALSO
     attributes(5),                        nethookregister(9F),
     nethookunregister(9F), netprotocollookup(9F)











































SunOS 5.11          Last change: 30 Oct 2008                    3



OpenSolaris man pages main menu

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