Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if.c
Show First 20 Lines • Show All 3,868 Lines • ▼ Show 20 Lines | TAILQ_FOREACH(ifma, &((struct ifnet *)ifp)->if_multiaddrs, ifma_link) { | ||||
count++; | count++; | ||||
if (count == max) | if (count == max) | ||||
break; | break; | ||||
} | } | ||||
if_maddr_runlock(ifp); | if_maddr_runlock(ifp); | ||||
return (count); | return (count); | ||||
} | } | ||||
int | |||||
if_multi_apply(struct ifnet *ifp, int (*filter)(void *, struct ifmultiaddr *, int), void *arg) | |||||
{ | |||||
struct ifmultiaddr *ifma; | |||||
int cnt = 0; | |||||
if_maddr_rlock(ifp); | |||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) | |||||
cnt += filter(arg, ifma, cnt); | |||||
if_maddr_runlock(ifp); | |||||
return (cnt); | |||||
} | |||||
struct mbuf * | struct mbuf * | ||||
if_dequeue(if_t ifp) | if_dequeue(if_t ifp) | ||||
{ | { | ||||
struct mbuf *m; | struct mbuf *m; | ||||
IFQ_DRV_DEQUEUE(&((struct ifnet *)ifp)->if_snd, m); | IFQ_DRV_DEQUEUE(&((struct ifnet *)ifp)->if_snd, m); | ||||
return (m); | return (m); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |