Kernel Functions for Drivers netinstancenotifyregister(9F)
NAME
netinstancenotifyregister, netinstancenotifyunregister
- add/delete a function to be called for changes to an
instance
SYNOPSIS
#include
#include
int netinstancenotifyregister(net idt netid,
hooknotifyfnt *callback, void *arg);
int netinstancenotifyunregister(net idt netid,
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
netid value from either callback registered with
netinstanceregister() or netzoneidtonetid().
callback function to call when a change occurs.
arg pointer to pass into the callback() function
when a change occurs.
DESCRIPTION
The netinstancenotifyregister() function registers a
function represented by the pointer callback to be called
when there is a new instance added or removed from the given
network instance (represented by netid.)
The netinstancenotifyunregister() function indicates that
there is no longer any desire to receive notification of
changes to the instance through function calls to the speci-
fied callback.
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
SunOS 5.11 Last change: 30 Oct 2008 1
Kernel Functions for Drivers netinstancenotifyregister(9F)
pointing to read-only memory. Changing this data is strictly
prohibited.
The function that is called 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 netid represented as a string.
name2 is NUL.
name3 is the name of the instance 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:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcsu
Interface Stability Committed
SEE ALSO
attributes(5), netinstanceregister(9F),
netinstanceunregister(9F), netzoneidtonetid(9F)
SunOS 5.11 Last change: 30 Oct 2008 2
|