1net_instance_notify_registKeerr(n9eFl)Functions for Dnreitv_eirnsstance_notify_register(9F)
2
3
4

NAME

6       net_instance_notify_register,      net_instance_notify_unregister     -
7       add/delete a function to be called for changes to an instance
8

SYNOPSIS

10       #include <sys/hook.h>
11       #include <sys/neti.h>
12
13       int net_instance_notify_register(net id_t net_id,
14            hook_notify_fn_t *callback, void *arg);
15
16       int net_instance_notify_unregister(net id_t net_id,
17            hook_notify_fn_t *callback);
18
19       typedef int (* hook_notify_fn_t)(hook_notify_cmd_t command,
20            void *arg, const char *name1, const char *name2, const char
21            *name3);
22
23

INTERFACE LEVEL

25       Solaris DDI specific (Solaris DDI).
26

PARAMETERS

28       netid       value    from    either    callback     registered     with
29                   net_instance_register() or net_zoneidtonetid().
30
31
32       callback    function to call when a change occurs.
33
34
35       arg         pointer  to pass into the callback() function when a change
36                   occurs.
37
38

DESCRIPTION

40       The net_instance_notify_register() function registers a function repre‐
41       sented  by  the  pointer  callback  to  be  called  when there is a new
42       instance added or removed from the given network instance  (represented
43       by netid.)
44
45
46       The  net_instance_notify_unregister()  function indicates that there is
47       no longer any desire to receive notification of changes to the instance
48       through function calls to the specified callback.
49
50
51       Multiple  callback  functions may be registered through this interface.
52       The same set of parameters is passed to  each  callback  function.  The
53       memory referenced through the pointers passed to the callback should be
54       treated as pointing to read-only memory. Changing this data is strictly
55       prohibited.
56
57
58       The function that is called must not block any other events.
59
60
61       The  arguments  passed through to the callback are as follows (the com‐
62       mand is either HN_REGISTER or HN_UNREGISTER):
63
64       name1    is the netid represented as a string.
65
66
67       name2    is NULL.
68
69
70       name3    is the name of the instance being added/removed
71
72

RETURN VALUES

74       If these functions succeed, 0 is  returned.  Otherwise,  the  following
75       error is returned:
76
77       EEXIST    the given callback function is already registered.
78
79

CONTEXT

81       These functions may be called from user or kernel context.
82

ATTRIBUTES

84       See attributes(5) for descriptions of the following attributes:
85
86
87
88
89       ┌─────────────────────────────┬─────────────────────────────┐
90       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
91       ├─────────────────────────────┼─────────────────────────────┤
92       │Availability                 │SUNWcsu                      │
93       ├─────────────────────────────┼─────────────────────────────┤
94       │Interface Stability          │Committed                    │
95       └─────────────────────────────┴─────────────────────────────┘
96

SEE ALSO

98       attributes(5),  net_instance_register(9F), net_instance_unregister(9F),
99       net_zoneidtonetid(9F)
100
101
102
103SunOS 5.11                        30 Oct 2008 net_instance_notify_register(9F)
Impressum