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

Function igmp_isgroupreported

freebsd/netinet/igmp.c:578–587  ·  view source on GitHub ↗

* Filter outgoing IGMP report state by group. * * Reports are ALWAYS suppressed for ALL-HOSTS (224.0.0.1). * If the net.inet.igmp.sendlocal sysctl is 0, then IGMP reports are * disabled for all groups in the 224.0.0.0/24 link-local scope. However, * this may break certain IGMP snooping switches which rely on the old * report behaviour. * * Return zero if the given group is one for which IG

Source from the content-addressed store, hash-verified

576 * should be suppressed, or non-zero if reports should be issued.
577 */
578static __inline int
579igmp_isgroupreported(const struct in_addr addr)
580{
581
582 if (in_allhosts(addr) ||
583 ((!V_igmp_sendlocal && IN_LOCAL_GROUP(ntohl(addr.s_addr)))))
584 return (0);
585
586 return (1);
587}
588
589/*
590 * Construct a Router Alert option to use in outgoing packets.

Callers 2

igmp_initial_joinFunction · 0.85
igmp_handle_state_changeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected