* Attach IGMP when PF_INET is attached to an interface. */
| 611 | * Attach IGMP when PF_INET is attached to an interface. |
| 612 | */ |
| 613 | struct igmp_ifsoftc * |
| 614 | igmp_domifattach(struct ifnet *ifp) |
| 615 | { |
| 616 | struct igmp_ifsoftc *igi; |
| 617 | |
| 618 | CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", |
| 619 | __func__, ifp, ifp->if_xname); |
| 620 | |
| 621 | IGMP_LOCK(); |
| 622 | |
| 623 | igi = igi_alloc_locked(ifp); |
| 624 | if (!(ifp->if_flags & IFF_MULTICAST)) |
| 625 | igi->igi_flags |= IGIF_SILENT; |
| 626 | |
| 627 | IGMP_UNLOCK(); |
| 628 | |
| 629 | return (igi); |
| 630 | } |
| 631 | |
| 632 | /* |
| 633 | * VIMAGE: assume curvnet set by caller. |
no test coverage detected