ipv6_multicast.h
Go to the documentation of this file.
1 /**
2  * @file ipv6_multicast.h
3  * @brief IPv6 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 _IPV6_MULTICAST_H
32 #define _IPV6_MULTICAST_H
33 
34 //Dependencies
35 #include "core/net.h"
36 #include "ipv6/ipv6.h"
37 
38 //C++ guard
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 //IPv6 multicast related functions
45  const Ipv6Addr *srcAddr);
46 
48  const Ipv6Addr *groupAddr);
49 
51  const Ipv6Addr *groupAddr);
52 
54  const Ipv6Addr *groupAddr);
55 
57  SocketMulticastGroup *group);
58 
60  const Ipv6Addr *groupAddr);
61 
62 void ipv6DropMulticastAddr(NetInterface *interface,
63  const Ipv6Addr *groupAddr);
64 
66 
68  const Ipv6Addr *multicastAddr);
69 
71  const Ipv6Addr *multicastAddr);
72 
74 
78 
80  const Ipv6SrcAddrList *list2);
81 
82 //C++ guard
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif
IPv6 (Internet Protocol Version 6)
Multicast group.
Definition: socket.h:273
int bool_t
Definition: compiler_port.h:53
Ipv4Addr destAddr
Definition: ipv4.h:329
Source address list.
Definition: ipv6.h:469
signed int int_t
Definition: compiler_port.h:49
void ipv6DeriveInterfaceState(Ipv6FilterEntry *entry, SocketMulticastGroup *group)
Derive the per-interface state from the per-socket state.
void ipv6RemoveSrcAddr(Ipv6SrcAddrList *list, const Ipv6Addr *srcAddr)
Remove a source address from a given list.
Ipv6Addr
Definition: ipv6.h:260
error_t ipv6AcceptMulticastAddr(NetInterface *interface, const Ipv6Addr *groupAddr)
Reconfigure the MAC layer to accept multicast traffic.
error_t ipv6JoinMulticastGroup(NetInterface *interface, const Ipv6Addr *groupAddr)
Join an IPv6 multicast group.
error_t
Error codes.
Definition: error.h:43
int_t ipv6FindSrcAddr(const Ipv6SrcAddrList *list, const Ipv6Addr *srcAddr)
Search the list of sources for a given IP address.
error_t ipv6MulticastFilter(NetInterface *interface, const Ipv6Addr *destAddr, const Ipv6Addr *srcAddr)
Filter out incoming multicast traffic.
#define NetInterface
Definition: net.h:36
void ipv6DropMulticastAddr(NetInterface *interface, const Ipv6Addr *groupAddr)
Reconfigure the MAC layer to reject multicast traffic.
MacAddr
Definition: ethernet.h:195
bool_t ipv6CompareSrcAddrLists(const Ipv6SrcAddrList *list1, const Ipv6SrcAddrList *list2)
Compare lists of sources.
error_t ipv6MapMulticastAddrToMac(const Ipv6Addr *ipAddr, MacAddr *macAddr)
Map an IPv6 multicast address to a MAC-layer multicast address.
void ipv6UpdateMulticastFilter(NetInterface *interface, const Ipv6Addr *groupAddr)
Update IPv6 multicast filter table.
Ipv6FilterEntry * ipv6FindMulticastFilterEntry(NetInterface *interface, const Ipv6Addr *multicastAddr)
Search the multicast filter for a given address.
Ipv4Addr groupAddr
Definition: igmp_common.h:214
void ipv6DeleteMulticastFilterEntry(Ipv6FilterEntry *entry)
Delete a multicast filter entry.
MacAddr srcAddr
Definition: ethernet.h:220
Ipv4Addr ipAddr
Definition: ipcp.h:105
error_t ipv6AddSrcAddr(Ipv6SrcAddrList *list, const Ipv6Addr *srcAddr)
Append a source address to a given list.
TCP/IP stack core.
Ipv6FilterEntry * ipv6CreateMulticastFilterEntry(NetInterface *interface, const Ipv6Addr *multicastAddr)
Create a new multicast filter entry.
Ipv4Addr multicastAddr
Definition: igmp_common.h:267
error_t ipv6LeaveMulticastGroup(NetInterface *interface, const Ipv6Addr *groupAddr)
Leave an IPv6 multicast group.
IPv6 multicast filter entry.
Definition: ipv6.h:482