MCPcopy Create free account
hub / github.com/F-Stack/f-stack / igmp_modevent

Function igmp_modevent

freebsd/netinet/igmp.c:3681–3703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3679#endif
3680
3681static int
3682igmp_modevent(module_t mod, int type, void *unused __unused)
3683{
3684
3685 switch (type) {
3686 case MOD_LOAD:
3687 CTR1(KTR_IGMPV3, "%s: initializing", __func__);
3688 IGMP_LOCK_INIT();
3689 m_raopt = igmp_ra_alloc();
3690 netisr_register(&igmp_nh);
3691 break;
3692 case MOD_UNLOAD:
3693 CTR1(KTR_IGMPV3, "%s: tearing down", __func__);
3694 netisr_unregister(&igmp_nh);
3695 m_free(m_raopt);
3696 m_raopt = NULL;
3697 IGMP_LOCK_DESTROY();
3698 break;
3699 default:
3700 return (EOPNOTSUPP);
3701 }
3702 return (0);
3703}
3704
3705static moduledata_t igmp_mod = {
3706 "igmp",

Callers

nothing calls this directly

Calls 4

igmp_ra_allocFunction · 0.85
netisr_registerFunction · 0.85
netisr_unregisterFunction · 0.85
m_freeFunction · 0.50

Tested by

no test coverage detected