ipv4_multicast.h
Go to the documentation of this file.
1 /**
2  * @file ipv4_multicast.h
3  * @brief IPv4 multicast filtering
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 _IPV4_MULTICAST_H
32 #define _IPV4_MULTICAST_H
33 
34 //Dependencies
35 #include "core/net.h"
36 #include "ipv4/ipv4.h"
37 
38 //C++ guard
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 //IPv4 multicast related functions
46 
49 
51 
53  SocketMulticastGroup *group);
54 
57 
59 
62 
65 
67 
71 
73  const Ipv4SrcAddrList *list2);
74 
75 //C++ guard
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif
Multicast group.
Definition: socket.h:273
int bool_t
Definition: compiler_port.h:53
Source address list.
Definition: ipv4.h:399
Ipv4Addr destAddr
Definition: ipv4.h:329
signed int int_t
Definition: compiler_port.h:49
void ipv4RemoveSrcAddr(Ipv4SrcAddrList *list, Ipv4Addr srcAddr)
Remove a source address from a given list.
uint32_t Ipv4Addr
IPv4 network address.
Definition: ipv4.h:297
error_t ipv4AddSrcAddr(Ipv4SrcAddrList *list, Ipv4Addr srcAddr)
Append a source address to a given list.
error_t
Error codes.
Definition: error.h:43
void ipv4DropMulticastAddr(NetInterface *interface, Ipv4Addr groupAddr)
Reconfigure the MAC layer to reject multicast traffic.
Ipv4FilterEntry * ipv4CreateMulticastFilterEntry(NetInterface *interface, Ipv4Addr multicastAddr)
Create a new multicast filter entry.
Ipv4FilterEntry * ipv4FindMulticastFilterEntry(NetInterface *interface, Ipv4Addr multicastAddr)
Search the multicast filter for a given address.
error_t ipv4LeaveMulticastGroup(NetInterface *interface, Ipv4Addr groupAddr)
Leave the specified host group.
#define NetInterface
Definition: net.h:36
IPv4 multicast filter entry.
Definition: ipv4.h:412
error_t ipv4JoinMulticastGroup(NetInterface *interface, Ipv4Addr groupAddr)
Join the specified host group.
bool_t ipv4CompareSrcAddrLists(const Ipv4SrcAddrList *list1, const Ipv4SrcAddrList *list2)
Compare lists of sources.
int_t ipv4FindSrcAddr(const Ipv4SrcAddrList *list, Ipv4Addr srcAddr)
Search the list of sources for a given IP address.
void ipv4DeleteMulticastFilterEntry(Ipv4FilterEntry *entry)
Delete a multicast filter entry.
MacAddr
Definition: ethernet.h:195
error_t ipv4MapMulticastAddrToMac(Ipv4Addr ipAddr, MacAddr *macAddr)
Map an host group address to a MAC-layer multicast address.
void ipv4DeriveInterfaceState(Ipv4FilterEntry *entry, SocketMulticastGroup *group)
Derive the per-interface state from the per-socket state.
Ipv4Addr groupAddr
Definition: igmp_common.h:214
MacAddr srcAddr
Definition: ethernet.h:220
error_t ipv4MulticastFilter(NetInterface *interface, Ipv4Addr destAddr, Ipv4Addr srcAddr)
Filter out incoming multicast traffic.
Ipv4Addr ipAddr
Definition: ipcp.h:105
error_t ipv4AcceptMulticastAddr(NetInterface *interface, Ipv4Addr groupAddr)
Reconfigure the MAC layer to accept multicast traffic.
void ipv4UpdateMulticastFilter(NetInterface *interface, Ipv4Addr groupAddr)
Update IPv4 multicast filter table.
IPv4 (Internet Protocol Version 4)
TCP/IP stack core.
Ipv4Addr multicastAddr
Definition: igmp_common.h:267