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

Function inm_is_ifp_detached

freebsd/netinet/in_mcast.c:208–224  ·  view source on GitHub ↗

* Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp * is detached. */

Source from the content-addressed store, hash-verified

206 * is detached.
207 */
208static int __inline
209inm_is_ifp_detached(const struct in_multi *inm)
210{
211 struct ifnet *ifp;
212
213 KASSERT(inm->inm_ifma != NULL, ("%s: no ifma", __func__));
214 ifp = inm->inm_ifma->ifma_ifp;
215 if (ifp != NULL) {
216 /*
217 * Sanity check that netinet's notion of ifp is the
218 * same as net's.
219 */
220 KASSERT(inm->inm_ifp == ifp, ("%s: bad ifp", __func__));
221 }
222
223 return (ifp == NULL);
224}
225#endif
226
227/*

Callers 1

in_leavegroup_lockedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected