Lines Matching refs:hdl

71 sw_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)  in sw_recv()  argument
79 msinfo = (struct sw_modspecific *)fmd_hdl_getspecific(hdl); in sw_recv()
92 if (fmd_nvl_class_match(hdl, nvl, dp->swd_classpat)) { in sw_recv()
99 (*dispf)(hdl, ep, nvl, class, dp->swd_arg); in sw_recv()
116 sw_timer_install(fmd_hdl_t *hdl, id_t who, void *arg, fmd_event_t *ep, in sw_timer_install() argument
125 msinfo = (struct sw_modspecific *)fmd_hdl_getspecific(hdl); in sw_timer_install()
127 fmd_hdl_abort(hdl, "sw_timer_install: invalid subid %d\n", who); in sw_timer_install()
133 fmd_hdl_abort(hdl, "sw_timer_install: no swsub_timeout\n"); in sw_timer_install()
149 fmd_hdl_abort(hdl, "timer slots exhausted\n"); in sw_timer_install()
154 fmd_timer_install(hdl, arg, ep, hrt); in sw_timer_install()
181 sw_timer_remove(fmd_hdl_t *hdl, id_t who, id_t timerid) in sw_timer_remove() argument
188 msinfo = (struct sw_modspecific *)fmd_hdl_getspecific(hdl); in sw_timer_remove()
190 fmd_hdl_abort(hdl, "sw_timer_remove: invalid subid\n"); in sw_timer_remove()
197 fmd_hdl_abort(hdl, "sw_timer_remove: timerid %d not found " in sw_timer_remove()
199 fmd_timer_remove(hdl, timerid); in sw_timer_remove()
208 sw_timeout(fmd_hdl_t *hdl, id_t timerid, void *arg) in sw_timeout() argument
216 msinfo = (struct sw_modspecific *)fmd_hdl_getspecific(hdl); in sw_timeout()
220 fmd_hdl_abort(hdl, "sw_timeout: timerid %d not found\n"); in sw_timeout()
225 fmd_hdl_abort(hdl, "sw_timeout: invalid subid\n"); in sw_timeout()
230 sip->swsub_timeout(hdl, timerid, arg); in sw_timeout()
238 sw_id_to_casetype(fmd_hdl_t *hdl, id_t who) in sw_id_to_casetype() argument
244 msinfo = (struct sw_modspecific *)fmd_hdl_getspecific(hdl); in sw_id_to_casetype()
246 fmd_hdl_abort(hdl, "sw_id_to_casetype: invalid subid %d\n", in sw_id_to_casetype()
253 fmd_hdl_abort(hdl, "sw_id_to_casetype: bad case type %d " in sw_id_to_casetype()
264 sw_subinfo_bycase(fmd_hdl_t *hdl, enum sw_casetype type) in sw_subinfo_bycase() argument
271 msinfo = (struct sw_modspecific *)fmd_hdl_getspecific(hdl); in sw_subinfo_bycase()
287 sw_sub_case_close_func(fmd_hdl_t *hdl, enum sw_casetype type) in sw_sub_case_close_func() argument
291 if ((sip = sw_subinfo_bycase(hdl, type)) == NULL) in sw_sub_case_close_func()
292 fmd_hdl_abort(hdl, "sw_sub_case_close_func: case type " in sw_sub_case_close_func()
302 sw_sub_case_vrfy_func(fmd_hdl_t *hdl, enum sw_casetype type) in sw_sub_case_vrfy_func() argument
306 if ((sip = sw_subinfo_bycase(hdl, type)) == NULL) in sw_sub_case_vrfy_func()
307 fmd_hdl_abort(hdl, "sw_sub_case_vrfy_func: case type " in sw_sub_case_vrfy_func()
321 sw_add_callbacks(fmd_hdl_t *hdl, const char *who, in sw_add_callbacks() argument
334 fmd_hdl_abort(hdl, "subsidiary %s dispatch table not NULL-" in sw_add_callbacks()
340 fmd_hdl_abort(hdl, "subsidiary %s dispatch table entry " in sw_add_callbacks()
347 sw_fmd_init(fmd_hdl_t *hdl, const fmd_hdl_info_t *hdlinfo, in sw_fmd_init() argument
353 if (fmd_hdl_register(hdl, FMD_API_VERSION, hdlinfo) != 0) in sw_fmd_init()
356 if (fmd_prop_get_int32(hdl, "enable") != B_TRUE) { in sw_fmd_init()
357 fmd_hdl_debug(hdl, "%s disabled though .conf file setting\n", in sw_fmd_init()
359 fmd_hdl_unregister(hdl); in sw_fmd_init()
363 msinfo = fmd_hdl_zalloc(hdl, sizeof (*msinfo), FMD_SLEEP); in sw_fmd_init()
366 msinfo->swms_disptbl = fmd_hdl_zalloc(hdl, in sw_fmd_init()
374 fmd_hdl_setspecific(hdl, (void *)msinfo); in sw_fmd_init()
376 (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, sizeof (sw_stats) / in sw_fmd_init()
395 initrslt = (*sip->swsub_init)(hdl, IDX2ID(i), &dp, &nelem); in sw_fmd_init()
404 fmd_hdl_abort(hdl, "%s returned dispatch " in sw_fmd_init()
408 fmd_hdl_debug(hdl, "%s initialized\n", dbgbuf); in sw_fmd_init()
409 sw_add_callbacks(hdl, sip->swsub_name, dp, nelem, in sw_fmd_init()
414 fmd_hdl_debug(hdl, "%s chose not to initialize\n", in sw_fmd_init()
416 sw_add_callbacks(hdl, sip->swsub_name, NULL, -1, in sw_fmd_init()
421 fmd_hdl_debug(hdl, "%s failed to initialize " in sw_fmd_init()
423 sw_add_callbacks(hdl, sip->swsub_name, NULL, -1, in sw_fmd_init()
428 fmd_hdl_abort(hdl, "%s returned out-of-range result " in sw_fmd_init()
438 sw_fmd_fini(fmd_hdl_t *hdl) in sw_fmd_fini() argument
444 msinfo = (struct sw_modspecific *)fmd_hdl_getspecific(hdl); in sw_fmd_fini()
452 fmd_timer_remove(hdl, msinfo->swms_timers[i].swt_timerid); in sw_fmd_fini()
466 (*sip->swsub_fini)(hdl); in sw_fmd_fini()
469 fmd_hdl_free(hdl, msinfo->swms_disptbl, in sw_fmd_fini()
472 fmd_hdl_setspecific(hdl, NULL); in sw_fmd_fini()
473 fmd_hdl_free(hdl, msinfo, sizeof (*msinfo)); in sw_fmd_fini()