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

Function mfc_find

freebsd/netinet/ip_mroute.c:379–394  ·  view source on GitHub ↗

* Find a route for a given origin IP address and multicast group address. * Statistics must be updated by the caller. */

Source from the content-addressed store, hash-verified

377 * Statistics must be updated by the caller.
378 */
379static __inline struct mfc *
380mfc_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.

Callers 6

get_sg_cntFunction · 0.85
add_mfcFunction · 0.85
del_mfcFunction · 0.85
X_ip_mforwardFunction · 0.85
add_bw_upcallFunction · 0.85
del_bw_upcallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected