igmp_router_misc.h
Go to the documentation of this file.
1 /**
2  * @file igmp_router_misc.h
3  * @brief Helper functions fore IGMP router
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneTCP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.4
29  **/
30 
31 #ifndef _IGMP_ROUTER_MISC_H
32 #define _IGMP_ROUTER_MISC_H
33 
34 //Dependencies
35 #include "core/net.h"
36 #include "igmp/igmp_router.h"
37 
38 //C++ guard
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 //IGMP router related functions
45 
48 
51 
53  const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message,
54  size_t length);
55 
57  const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message,
58  size_t length);
59 
61  const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message,
62  size_t length);
63 
65  const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message,
66  size_t length);
67 
70 
73 
75 
76 //C++ guard
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif
Ipv4Addr destAddr
Definition: ipv4.h:329
uint8_t maxRespTime
Definition: igmp_common.h:212
IgmpMessage
Definition: igmp_common.h:215
uint8_t message[]
Definition: chap.h:154
error_t igmpRouterSendGeneralQuery(IgmpRouterContext *context)
Send General Query message.
uint32_t Ipv4Addr
IPv4 network address.
Definition: ipv4.h:297
void igmpRouterDeleteGroup(IgmpRouterContext *context, IgmpRouterGroup *group)
Delete a multicast group.
IgmpRouterGroup * igmpRouterCreateGroup(IgmpRouterContext *context, Ipv4Addr groupAddr)
Create a new multicast group.
IGMP router.
error_t
Error codes.
Definition: error.h:43
void igmpRouterProcessMembershipReport(IgmpRouterContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length)
Process incoming Membership Report message.
#define Ipv4PseudoHeader
Definition: ipv4.h:39
uint8_t length
Definition: tcp.h:368
error_t igmpRouterSendGroupSpecificQuery(IgmpRouterContext *context, Ipv4Addr groupAddr)
Send Group-Specific Query message.
uint32_t systime_t
System time.
IgmpRouterGroup * igmpRouterFindGroup(IgmpRouterContext *context, Ipv4Addr groupAddr)
Search the list of multicast groups for a given group address.
void igmpRouterProcessMessage(IgmpRouterContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length)
Process incoming IGMP message.
Ipv4Addr groupAddr
Definition: igmp_common.h:214
#define IgmpRouterContext
Definition: igmp_router.h:47
void igmpRouterProcessMembershipQuery(IgmpRouterContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length)
Process incoming Membership Query message.
TCP/IP stack core.
Multicast group.
Definition: igmp_router.h:101
error_t igmpRouterSendMembershipQuery(IgmpRouterContext *context, Ipv4Addr destAddr, Ipv4Addr groupAddr, systime_t maxRespTime)
Send Membership Query message.
void igmpRouterProcessLeaveGroup(IgmpRouterContext *context, const Ipv4PseudoHeader *pseudoHeader, const IgmpMessage *message, size_t length)
Process incoming Leave Group message.