* 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. */
| 206 | * is detached. |
| 207 | */ |
| 208 | static int __inline |
| 209 | inm_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 | /* |
no outgoing calls
no test coverage detected