Helper functions for IGMP snooping switch. More...
Go to the source code of this file.
Functions | |
void | igmpSnoopingProcessMessage (IgmpSnoopingContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length, const NetRxAncillary *ancillary) |
Process incoming IGMP message. More... | |
void | igmpSnoopingProcessMembershipQuery (IgmpSnoopingContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length, const NetRxAncillary *ancillary) |
Process incoming Membership Query message. More... | |
void | igmpSnoopingProcessMembershipReport (IgmpSnoopingContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length, const NetRxAncillary *ancillary) |
Process incoming Membership Report message. More... | |
void | igmpSnoopingProcessMembershipReportV3 (IgmpSnoopingContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMembershipReportV3 *message, size_t length, const NetRxAncillary *ancillary) |
Process incoming Version 3 Membership Report message. More... | |
void | igmpSnoopingProcessLeaveGroup (IgmpSnoopingContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length, const NetRxAncillary *ancillary) |
Process incoming Leave Group message. More... | |
void | igmpSnoopingProcessUnknownMessage (IgmpSnoopingContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length, const NetRxAncillary *ancillary) |
Process unrecognized IGMP messages. More... | |
error_t | igmpSnoopingForwardMessage (IgmpSnoopingContext *context, uint32_t forwardPorts, const MacAddr *destMacAddr, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length) |
Forward an IGMP message to the desired ports. More... | |
IgmpSnoopingGroup * | igmpSnoopingCreateGroup (IgmpSnoopingContext *context, Ipv4Addr groupAddr, uint8_t port) |
Create a new multicast group. More... | |
IgmpSnoopingGroup * | igmpSnoopingFindGroup (IgmpSnoopingContext *context, Ipv4Addr groupAddr, uint8_t port) |
Search the list of multicast groups for a given group address. More... | |
void | igmpSnoopingDeleteGroup (IgmpSnoopingContext *context, IgmpSnoopingGroup *group) |
Delete a multicast group. More... | |
void | igmpSnoopingEnableMonitoring (IgmpSnoopingContext *context, bool_t enable) |
Enable IGMP monitoring. More... | |
void | igmpSnoopingUpdateStaticFdbEntry (IgmpSnoopingContext *context, Ipv4Addr groupAddr) |
Update a entry of the static MAC table. More... | |
void | igmpSnoopingSetUnknownMcastFwdPorts (IgmpSnoopingContext *context, bool_t enable, uint32_t forwardPorts) |
Set forward ports for unknown multicast packets. More... | |
uint32_t | igmpSnoopingGetRouterPorts (IgmpSnoopingContext *context) |
Detailed Description
Helper functions for IGMP snooping switch.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 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.
- Version
- 2.4.4
Definition in file igmp_snooping_misc.h.
Function Documentation
◆ igmpSnoopingCreateGroup()
IgmpSnoopingGroup* igmpSnoopingCreateGroup | ( | IgmpSnoopingContext * | context, |
Ipv4Addr | groupAddr, | ||
uint8_t | port | ||
) |
Create a new multicast group.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] groupAddr Multicast group address [in] port Port number associated with the multicast group
- Returns
- Pointer to the newly created multicast group
Definition at line 614 of file igmp_snooping_misc.c.
◆ igmpSnoopingDeleteGroup()
void igmpSnoopingDeleteGroup | ( | IgmpSnoopingContext * | context, |
IgmpSnoopingGroup * | group | ||
) |
Delete a multicast group.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] group Multicast group
Definition at line 695 of file igmp_snooping_misc.c.
◆ igmpSnoopingEnableMonitoring()
void igmpSnoopingEnableMonitoring | ( | IgmpSnoopingContext * | context, |
bool_t | enable | ||
) |
Enable IGMP monitoring.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] enable Enable or disable MLD monitoring
Definition at line 712 of file igmp_snooping_misc.c.
◆ igmpSnoopingFindGroup()
IgmpSnoopingGroup* igmpSnoopingFindGroup | ( | IgmpSnoopingContext * | context, |
Ipv4Addr | groupAddr, | ||
uint8_t | port | ||
) |
Search the list of multicast groups for a given group address.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] groupAddr Multicast group address [in] port Port number
- Returns
- Pointer to the matching multicast group, if any
Definition at line 660 of file igmp_snooping_misc.c.
◆ igmpSnoopingForwardMessage()
error_t igmpSnoopingForwardMessage | ( | IgmpSnoopingContext * | context, |
uint32_t | forwardPorts, | ||
const MacAddr * | destMacAddr, | ||
const Ipv4PseudoHeader * | pseudoHeader, | ||
const IgmpMessage * | message, | ||
size_t | length | ||
) |
Forward an IGMP message to the desired ports.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] forwardPorts Port map [in] destMacAddr Destination MAC address [in] pseudoHeader IPv4 pseudo header [in] message Pointer to the IGMP message [in] length Length of the IGMP message, in bytes
Definition at line 543 of file igmp_snooping_misc.c.
◆ igmpSnoopingGetRouterPorts()
uint32_t igmpSnoopingGetRouterPorts | ( | IgmpSnoopingContext * | context | ) |
Definition at line 854 of file igmp_snooping_misc.c.
◆ igmpSnoopingProcessLeaveGroup()
void igmpSnoopingProcessLeaveGroup | ( | IgmpSnoopingContext * | context, |
const Ipv4PseudoHeader * | pseudoHeader, | ||
const IgmpMessage * | message, | ||
size_t | length, | ||
const NetRxAncillary * | ancillary | ||
) |
Process incoming Leave Group message.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] pseudoHeader IPv4 pseudo header [in] message Pointer to the incoming IGMP message [in] length Length of the IGMP message, in bytes [in] ancillary Additional options passed to the stack along with the packet
Definition at line 459 of file igmp_snooping_misc.c.
◆ igmpSnoopingProcessMembershipQuery()
void igmpSnoopingProcessMembershipQuery | ( | IgmpSnoopingContext * | context, |
const Ipv4PseudoHeader * | pseudoHeader, | ||
const IgmpMessage * | message, | ||
size_t | length, | ||
const NetRxAncillary * | ancillary | ||
) |
Process incoming Membership Query message.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] pseudoHeader IPv4 pseudo header [in] message Pointer to the incoming IGMP message [in] length Length of the IGMP message, in bytes [in] ancillary Additional options passed to the stack along with the packet
Definition at line 118 of file igmp_snooping_misc.c.
◆ igmpSnoopingProcessMembershipReport()
void igmpSnoopingProcessMembershipReport | ( | IgmpSnoopingContext * | context, |
const Ipv4PseudoHeader * | pseudoHeader, | ||
const IgmpMessage * | message, | ||
size_t | length, | ||
const NetRxAncillary * | ancillary | ||
) |
Process incoming Membership Report message.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] pseudoHeader IPv4 pseudo header [in] message Pointer to the incoming IGMP message [in] length Length of the IGMP message, in bytes [in] ancillary Additional options passed to the stack along with the packet
Definition at line 264 of file igmp_snooping_misc.c.
◆ igmpSnoopingProcessMembershipReportV3()
void igmpSnoopingProcessMembershipReportV3 | ( | IgmpSnoopingContext * | context, |
const Ipv4PseudoHeader * | pseudoHeader, | ||
const IgmpMembershipReportV3 * | message, | ||
size_t | length, | ||
const NetRxAncillary * | ancillary | ||
) |
Process incoming Version 3 Membership Report message.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] pseudoHeader IPv4 pseudo header [in] message Pointer to the incoming IGMP message [in] length Length of the IGMP message, in bytes [in] ancillary Additional options passed to the stack along with the packet
Definition at line 331 of file igmp_snooping_misc.c.
◆ igmpSnoopingProcessMessage()
void igmpSnoopingProcessMessage | ( | IgmpSnoopingContext * | context, |
const Ipv4PseudoHeader * | pseudoHeader, | ||
const IgmpMessage * | message, | ||
size_t | length, | ||
const NetRxAncillary * | ancillary | ||
) |
Process incoming IGMP message.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] pseudoHeader IPv4 pseudo header [in] message Pointer to the incoming IGMP message [in] length Length of the IGMP message, in bytes [in] ancillary Additional options passed to the stack along with the packet
Definition at line 56 of file igmp_snooping_misc.c.
◆ igmpSnoopingProcessUnknownMessage()
void igmpSnoopingProcessUnknownMessage | ( | IgmpSnoopingContext * | context, |
const Ipv4PseudoHeader * | pseudoHeader, | ||
const IgmpMessage * | message, | ||
size_t | length, | ||
const NetRxAncillary * | ancillary | ||
) |
Process unrecognized IGMP messages.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] pseudoHeader IPv4 pseudo header [in] message Pointer to the incoming IGMP message [in] length Length of the IGMP message, in bytes [in] ancillary Additional options passed to the stack along with the packet
Definition at line 513 of file igmp_snooping_misc.c.
◆ igmpSnoopingSetUnknownMcastFwdPorts()
void igmpSnoopingSetUnknownMcastFwdPorts | ( | IgmpSnoopingContext * | context, |
bool_t | enable, | ||
uint32_t | forwardPorts | ||
) |
Set forward ports for unknown multicast packets.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] enable Enable or disable forwarding of unknown multicast packets [in] forwardPorts Port map
Definition at line 830 of file igmp_snooping_misc.c.
◆ igmpSnoopingUpdateStaticFdbEntry()
void igmpSnoopingUpdateStaticFdbEntry | ( | IgmpSnoopingContext * | context, |
Ipv4Addr | groupAddr | ||
) |
Update a entry of the static MAC table.
- Parameters
-
[in] context Pointer to the IGMP snooping switch context [in] groupAddr Multicast group address to be updated
Definition at line 735 of file igmp_snooping_misc.c.