Lines Matching refs:ifma
1714 struct ifmultiaddr *ifma)
1716 if (OSIncrementAtomic((SInt32 *)&ifma->ifma_refcount) <= 0)
1717 panic("ifma_reference: ifma already released or invalid\n");
1722 struct ifmultiaddr *ifma)
1724 while (ifma) {
1726 int32_t prevValue = OSDecrementAtomic((SInt32 *)&ifma->ifma_refcount);
1728 panic("ifma_release: ifma already released or invalid\n");
1733 if (ifma->ifma_protospec && ifma->ifma_free) {
1734 ifma->ifma_free(ifma->ifma_protospec);
1737 next = ifma->ifma_ll;
1738 FREE(ifma->ifma_addr, M_IFMADDR);
1739 FREE(ifma, M_IFMADDR);
1740 ifma = next;
1756 struct ifmultiaddr *ifma;
1757 for (ifma = ifp->if_multiaddrs.lh_first; ifma;
1758 ifma = ifma->ifma_link.le_next) {
1759 if (equal(sa, ifma->ifma_addr)) {
1760 ifma->ifma_usecount++;
1762 *retifma = ifma;
1851 struct ifmultiaddr *ifma = NULL;
1908 MALLOC(ifma, struct ifmultiaddr *, sizeof *ifma, M_IFMADDR, M_WAITOK);
1909 if (ifma == NULL) {
1923 bzero(ifma, sizeof(*ifma));
1924 ifma->ifma_addr = dupsa;
1925 ifma->ifma_ifp = ifp;
1926 ifma->ifma_usecount = 1;
1927 ifma->ifma_refcount = 1;
1930 if (if_addmulti_doesexist(ifp, llsa, &ifma->ifma_ll) == 0) {
1941 ifma->ifma_ll = llifma;
1942 ifma_reference(ifma->ifma_ll);
1946 LIST_INSERT_HEAD(&ifp->if_multiaddrs, ifma, ifma_link);
1949 *retifma = ifma;
1956 rt_newmaddrmsg(RTM_NEWMADDR, ifma);
1967 if (ifma)
1968 FREE(ifma, M_IFADDR);
1981 struct ifmultiaddr *ifma,
1987 ifp = ifma->ifma_ifp;
1993 while (ifma != NULL) {
1996 if (ifma->ifma_usecount > 1) {
1997 ifma->ifma_usecount--;
2002 LIST_REMOVE(ifma, ifma_link);
2004 ll_ifma = ifma->ifma_ll;
2009 rt_newmaddrmsg(RTM_DELMADDR, ifma);
2019 if (ifp && ifma->ifma_addr->sa_family == AF_LINK)
2025 ifma_release(ifma);
2027 ifma = ll_ifma;
2055 struct ifmultiaddr *ifma;
2068 for (ifma = ifp->if_multiaddrs.lh_first; ifma;
2069 ifma = ifma->ifma_link.le_next)
2070 if (equal(sa, ifma->ifma_addr))
2072 if (ifma == 0) {
2079 retval = if_delmultiaddr(ifma, 1);
2103 struct ifmultiaddr *ifma;
2106 for (ifma = ifp->if_multiaddrs.lh_first; ifma;
2107 ifma = ifma->ifma_link.le_next)
2108 if (equal(ifma->ifma_addr, sa))
2112 return ifma;