FreeBSD/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.c
/*
 * Unregister all hooks and cookies for that module. Note: doesn't disconnect
 * any hooks!
 */
Unregister all hooks and cookies for that module. Note: doesn't disconnect
any hooks!
Unregister all hooks and cookies for that module . Note : doesn ' t disconnect any hooks!
void
ng_unregister_module(const struct lmodule *mod)
{
	struct msgreg *m, *m1;
	struct datareg *d, *d1;
	m = SLIST_FIRST(&msgreg_list);
	while (m != NULL) {
		m1 = SLIST_NEXT(m, link);
		if (m->mod == mod) {
			SLIST_REMOVE(&msgreg_list, m, msgreg, link);
			free(m);
		}
		m = m1;
	}
	d = SLIST_FIRST(&datareg_list);
	while (d != NULL) {
		d1 = SLIST_NEXT(d, link);
		if (d->mod == mod) {
			SLIST_REMOVE(&datareg_list, d, datareg, link);
			free(d);
		}
		d = d1;
	}
}
void ng_unregister_module ( const struct lmodule * mod ) { struct msgreg * m , * m1 ; struct datareg * d , * d1 ; m = SLIST_FIRST ( & msgreg_list ) ; while ( m != NULL ) { m1 = SLIST_NEXT ( m , link ) ; if ( m -> mod == mod ) { SLIST_REMOVE ( & msgreg_list , m , msgreg , link ) ; free ( m ) ; } m = m1 ; } d = SLIST_FIRST ( & datareg_list ) ; while ( d != NULL ) { d1 = SLIST_NEXT ( d , link ) ; if ( d -> mod == mod ) { SLIST_REMOVE ( & datareg_list , d , datareg , link ) ; free ( d ) ; } d = d1 ; } }
Unregister all hooks and cookies for that module.
Unregister all hooks and cookies for that module .