Definitions common to IGMP host, router and snooping switch. More...
#include "core/net.h"#include "ipv4/ipv4_multicast.h"#include "ipv4/ipv4_misc.h"#include "igmp/igmp_host.h"#include "igmp/igmp_host_misc.h"#include "igmp/igmp_router.h"#include "igmp/igmp_router_misc.h"#include "igmp/igmp_snooping.h"#include "igmp/igmp_snooping_misc.h"#include "igmp/igmp_common.h"#include "igmp/igmp_debug.h"#include "debug.h"Go to the source code of this file.
| Macros | |
| #define | TRACE_LEVEL IGMP_TRACE_LEVEL | 
| Functions | |
| error_t | igmpInit (NetInterface *interface) | 
| IGMP initialization.  More... | |
| void | igmpTick (NetInterface *interface) | 
| IGMP timer handler.  More... | |
| void | igmpLinkChangeEvent (NetInterface *interface) | 
| Callback function for link change event.  More... | |
| error_t | igmpSendMessage (NetInterface *interface, Ipv4Addr destAddr, NetBuffer *buffer, size_t offset) | 
| Send IGMP message.  More... | |
| void | igmpProcessMessage (NetInterface *interface, const Ipv4PseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary) | 
| Process incoming IGMP message.  More... | |
| systime_t | igmpGetRandomDelay (systime_t maxDelay) | 
| Generate a random delay.  More... | |
| uint32_t | igmpDecodeFloatingPointValue (uint8_t code) | 
| Decode a floating-point value.  More... | |
| Variables | |
| systime_t | igmpTickCounter | 
Detailed Description
Definitions common to IGMP host, router and snooping switch.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Description
IGMP is used by IP hosts to report their multicast group memberships to any immediately-neighboring multicast routers. Refer to the following RFCs for complete details:
- RFC 1112: Host Extensions for IP Multicasting
- RFC 2236: Internet Group Management Protocol, Version 2
- RFC 3376: Internet Group Management Protocol, Version 3
- RFC 4541: Considerations for IGMP and MLD Snooping Switches
- RFC 9776: Internet Group Management Protocol, Version 3
- Version
- 2.5.4
Definition in file igmp_common.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL IGMP_TRACE_LEVEL | 
Definition at line 43 of file igmp_common.c.
Function Documentation
◆ igmpDecodeFloatingPointValue()
| uint32_t igmpDecodeFloatingPointValue | ( | uint8_t | code | ) | 
Decode a floating-point value.
- Parameters
- 
  [in] code Floating-point representation 
- Returns
- Decoded value
Definition at line 399 of file igmp_common.c.
◆ igmpGetRandomDelay()
Generate a random delay.
- Parameters
- 
  [in] maxDelay maximum delay 
- Returns
- Random amount of time
Definition at line 374 of file igmp_common.c.
◆ igmpInit()
| error_t igmpInit | ( | NetInterface * | interface | ) | 
IGMP initialization.
- Parameters
- 
  [in] interface Underlying network interface 
- Returns
- Error code
Definition at line 73 of file igmp_common.c.
◆ igmpLinkChangeEvent()
| void igmpLinkChangeEvent | ( | NetInterface * | interface | ) | 
Callback function for link change event.
- Parameters
- 
  [in] interface Underlying network interface 
Definition at line 140 of file igmp_common.c.
◆ igmpProcessMessage()
| void igmpProcessMessage | ( | NetInterface * | interface, | 
| const Ipv4PseudoHeader * | pseudoHeader, | ||
| const NetBuffer * | buffer, | ||
| size_t | offset, | ||
| const NetRxAncillary * | ancillary | ||
| ) | 
Process incoming IGMP message.
- Parameters
- 
  [in] interface Underlying network interface [in] pseudoHeader IPv4 pseudo header [in] buffer Multi-part buffer containing the incoming IGMP message [in] offset Offset to the first byte of the IGMP message [in] ancillary Additional options passed to the stack along with the packet 
Definition at line 293 of file igmp_common.c.
◆ igmpSendMessage()
| error_t igmpSendMessage | ( | NetInterface * | interface, | 
| Ipv4Addr | destAddr, | ||
| NetBuffer * | buffer, | ||
| size_t | offset | ||
| ) | 
Send IGMP message.
- Parameters
- 
  [in] interface Underlying network interface [in] destAddr Destination IP address [in] buffer Multi-part buffer containing the payload [in] offset Offset to the first byte of the payload 
- Returns
- Error code
Definition at line 158 of file igmp_common.c.
◆ igmpTick()
| void igmpTick | ( | NetInterface * | interface | ) | 
IGMP timer handler.
This routine must be periodically called by the TCP/IP stack to handle IGMP related timers
- Parameters
- 
  [in] interface Underlying network interface 
Definition at line 108 of file igmp_common.c.
Variable Documentation
◆ igmpTickCounter
| systime_t igmpTickCounter | 
Definition at line 64 of file igmp_common.c.
