Kernel functions hook_t(9s) NAME hook_t - callback structure for subscribing to netinfo events SYNOPSIS #include INTERFACE LEVEL Solaris DDI specific (Solaris DDI) DESCRIPTION The hook_t data structure is used to define a callback that is to be inserted onto an event. This data structure must be allocated via a call to hook_alloc and released with a call to hook_free. STRUCTURE MEMBERS hook_func_t h_func; /* callback function to invoke */ char *h_name; /* unique name given to the hook */ int h_flags; hook_hint_t h_hint; /* insertion hint type */ uintptr_t h_hintvalue; /* used with h_hint */ void *h_arg; /* value to pass into h_func */ typedef int (*hook_func_t)(net_event_t token, hook_data_t info, void *); HINT TYPES Hook hints must be thought of as hints that are used at the time of insertion and not rules that enforce where a hook lives for its entire lifetime on an event. The valid values for the h_hint field are: HH_NONE Just insert the hook wherever seems convienient. HH_FIRST Ask for the hook should be placed first on the list of hooks. HH_LAST Ask for the hook should be placed last on the list of hooks. HH_BEFORE Ask for the hook to be placed before another hook on the list. The value in h_hintvalue must be a pointer to the name of another hook. HH_AFTER Ask for the hook to be placed after another hook on the list. The value in h_hintvalue must be a pointer to the name of another hook. SunOS 5.10 Last change: DD Month 2007 1 Kernel functions hook_t(9s) ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Interface Stability | Committed | |_____________________________|_____________________________| SEE ALSO netinfo(9f), SunOS 5.10 Last change: DD Month 2007 2