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

Function igmp_v1v2_process_group_timer

freebsd/netinet/igmp.c:1800–1839  ·  view source on GitHub ↗

* Update host report group timer for IGMPv1/v2. * Will update the global pending timer flags. */

Source from the content-addressed store, hash-verified

1798 * Will update the global pending timer flags.
1799 */
1800static void
1801igmp_v1v2_process_group_timer(struct in_multi *inm, const int version)
1802{
1803 int report_timer_expired;
1804
1805 IN_MULTI_LIST_LOCK_ASSERT();
1806 IGMP_LOCK_ASSERT();
1807
1808 if (inm->inm_timer == 0) {
1809 report_timer_expired = 0;
1810 } else if (--inm->inm_timer == 0) {
1811 report_timer_expired = 1;
1812 } else {
1813 V_current_state_timers_running = 1;
1814 return;
1815 }
1816
1817 switch (inm->inm_state) {
1818 case IGMP_NOT_MEMBER:
1819 case IGMP_SILENT_MEMBER:
1820 case IGMP_IDLE_MEMBER:
1821 case IGMP_LAZY_MEMBER:
1822 case IGMP_SLEEPING_MEMBER:
1823 case IGMP_AWAKENING_MEMBER:
1824 break;
1825 case IGMP_REPORTING_MEMBER:
1826 if (report_timer_expired) {
1827 inm->inm_state = IGMP_IDLE_MEMBER;
1828 (void)igmp_v1v2_queue_report(inm,
1829 (version == IGMP_VERSION_2) ?
1830 IGMP_v2_HOST_MEMBERSHIP_REPORT :
1831 IGMP_v1_HOST_MEMBERSHIP_REPORT);
1832 }
1833 break;
1834 case IGMP_G_QUERY_PENDING_MEMBER:
1835 case IGMP_SG_QUERY_PENDING_MEMBER:
1836 case IGMP_LEAVING_MEMBER:
1837 break;
1838 }
1839}
1840
1841/*
1842 * Update a group's timers for IGMPv3.

Callers 1

igmp_fasttimo_vnetFunction · 0.85

Calls 1

igmp_v1v2_queue_reportFunction · 0.85

Tested by

no test coverage detected