1hook_t(9S)                Data Structures for Drivers               hook_t(9S)
2
3
4

NAME

6       hook_t - callback structure for subscribing to netinfo events
7

SYNOPSIS

9       #include <sys/hook.h>
10
11

INTERFACE LEVEL

13       Solaris DDI specific (Solaris DDI).
14

DESCRIPTION

16       The  hook_t  data  structure  defines a callback that is to be inserted
17       into a networking event. This data structure must be allocated  with  a
18       call to hook_alloc() and released with a call to hook_free().
19

STRUCTURE MEMBERS

21         hook_func_t  h_func;      /* callback function to invoke */
22         char         *h_name;     /* unique name given to the hook */
23         int          h_flags;
24         hook_hint_t  h_hint;      /* insertion hint type */
25         uintptr_t    h_hintvalue; /* used with h_hint */
26         void         *h_arg;      /* value to pass into h_func */
27
28         typedef int (*hook_func_t)(net_event_t token, hook_data_t info,
29                       void *);
30
31
32   HINT TYPES
33       Hook hints are hints that are used at the time of insertion and are not
34       rules that enforce where a hook lives for its  entire  lifetime  on  an
35       event. The valid values for the h_hint field are:
36
37       HH_NONE      Insert the hook wherever convenient.
38
39
40       HH_FIRST     Place the hook first on the list of hooks.
41
42
43       HH_LAST      Place the hook last on the list of hooks.
44
45
46       HH_BEFORE    Place  the  hook before another hook on the list of hooks.
47                    The value in h_hintvalue must be a pointer to the name  of
48                    another hook.
49
50
51       HH_AFTER     Place  the  hook  after another hook on the list of hooks.
52                    The value in h_hintvalue must be a pointer to the name  of
53                    another hook.
54
55

ATTRIBUTES

57       See attributes(5) for descriptions of the following attributes:
58
59
60
61
62       ┌─────────────────────────────┬─────────────────────────────┐
63       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
64       ├─────────────────────────────┼─────────────────────────────┤
65       │Interface Stability          │Committed                    │
66       └─────────────────────────────┴─────────────────────────────┘
67

SEE ALSO

69       netinfo(9F)
70
71
72
73SunOS 5.11                        1 May 2008                        hook_t(9S)
Impressum