* Find a route for a given origin IP address and multicast group address. * Statistics must be updated by the caller. */
| 377 | * Statistics must be updated by the caller. |
| 378 | */ |
| 379 | static __inline struct mfc * |
| 380 | mfc_find(struct in_addr *o, struct in_addr *g) |
| 381 | { |
| 382 | struct mfc *rt; |
| 383 | |
| 384 | MFC_LOCK_ASSERT(); |
| 385 | |
| 386 | LIST_FOREACH(rt, &V_mfchashtbl[MFCHASH(*o, *g)], mfc_hash) { |
| 387 | if (in_hosteq(rt->mfc_origin, *o) && |
| 388 | in_hosteq(rt->mfc_mcastgrp, *g) && |
| 389 | TAILQ_EMPTY(&rt->mfc_stall)) |
| 390 | break; |
| 391 | } |
| 392 | |
| 393 | return (rt); |
| 394 | } |
| 395 | |
| 396 | /* |
| 397 | * Handle MRT setsockopt commands to modify the multicast forwarding tables. |
no outgoing calls
no test coverage detected