Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* net/mld/mld_group.c
|
|
|
|
*
|
2020-09-03 07:19:37 +02:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
*
|
2020-09-03 07:19:37 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
*
|
2020-09-03 07:19:37 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <nuttx/compiler.h>
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2021-05-18 08:59:14 +02:00
|
|
|
#include <assert.h>
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
#include <arch/irq.h>
|
|
|
|
|
|
|
|
#include <nuttx/arch.h>
|
|
|
|
#include <nuttx/wdog.h>
|
|
|
|
#include <nuttx/kmalloc.h>
|
2022-09-25 17:08:38 +02:00
|
|
|
#include <nuttx/queue.h>
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
#include <nuttx/net/net.h>
|
|
|
|
#include <nuttx/net/netdev.h>
|
|
|
|
#include <nuttx/net/ip.h>
|
|
|
|
#include <nuttx/net/mld.h>
|
|
|
|
|
|
|
|
#include "devif/devif.h"
|
|
|
|
#include "mld/mld.h"
|
|
|
|
|
|
|
|
#ifdef CONFIG_NET_MLD
|
|
|
|
|
2018-11-11 19:43:03 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Private Functions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: mld_ngroups
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Return the number of groups joined by applications.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2023-01-11 12:44:41 +01:00
|
|
|
#ifndef CONFIG_NET_MLD_ROUTER
|
2018-11-11 19:43:03 +01:00
|
|
|
static int mld_ngroups(FAR struct net_driver_s *dev)
|
|
|
|
{
|
|
|
|
FAR struct mld_group_s *group;
|
2018-11-11 22:25:16 +01:00
|
|
|
int ngroups = 0;
|
2018-11-11 19:43:03 +01:00
|
|
|
|
|
|
|
/* Count the number of groups in the group list */
|
|
|
|
|
|
|
|
for (group = (FAR struct mld_group_s *)dev->d_mld.grplist.head;
|
|
|
|
group != NULL;
|
|
|
|
group = group->next)
|
|
|
|
{
|
|
|
|
ngroups++;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* REVISIT: Subtract one for the IPv6 allnodes group. Why is this here?
|
|
|
|
* what do we need it for? It was cloned from IGMP and is probably not
|
|
|
|
* needed.
|
|
|
|
*/
|
|
|
|
|
2018-11-11 23:23:18 +01:00
|
|
|
return ngroups > 0 ? ngroups - 1 : 0;
|
2018-11-11 19:43:03 +01:00
|
|
|
}
|
2023-01-11 12:44:41 +01:00
|
|
|
#endif
|
2018-11-11 19:43:03 +01:00
|
|
|
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Functions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: mld_grpalloc
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Allocate a new group from heap memory.
|
|
|
|
*
|
2018-11-03 23:47:08 +01:00
|
|
|
* Assumptions:
|
|
|
|
* The network is locked.
|
|
|
|
*
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
FAR struct mld_group_s *mld_grpalloc(FAR struct net_driver_s *dev,
|
|
|
|
FAR const net_ipv6addr_t addr)
|
|
|
|
{
|
|
|
|
FAR struct mld_group_s *group;
|
|
|
|
|
2018-11-06 01:39:55 +01:00
|
|
|
mldinfo("addr: %08x dev: %p\n", *addr, dev);
|
2023-08-28 09:39:47 +02:00
|
|
|
group = kmm_zalloc(sizeof(struct mld_group_s));
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
2018-11-06 01:39:55 +01:00
|
|
|
mldinfo("group: %p\n", group);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
|
|
|
/* Check if we successfully allocated a group structure */
|
|
|
|
|
|
|
|
if (group != NULL)
|
|
|
|
{
|
|
|
|
/* Initialize the non-zero elements of the group structure */
|
|
|
|
|
|
|
|
net_ipv6addr_copy(group->grpaddr, addr);
|
|
|
|
nxsem_init(&group->sem, 0, 0);
|
|
|
|
|
2018-11-03 23:47:08 +01:00
|
|
|
/* Save the interface index */
|
2018-11-03 20:45:33 +01:00
|
|
|
|
2018-11-03 23:47:08 +01:00
|
|
|
group->ifindex = dev->d_ifindex;
|
2018-11-03 20:45:33 +01:00
|
|
|
|
2018-11-11 23:23:18 +01:00
|
|
|
#ifndef CONFIG_NET_MLD_ROUTER
|
2018-11-11 18:38:29 +01:00
|
|
|
/* Start the query timer if we are the Querier and this is the first
|
|
|
|
* group member of the group.
|
|
|
|
*/
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
2018-11-11 23:23:18 +01:00
|
|
|
if (mld_ngroups(dev) == 0)
|
2018-11-11 18:38:29 +01:00
|
|
|
{
|
|
|
|
mld_start_gentimer(dev, MSEC2TICK(MLD_QUERY_MSEC));
|
|
|
|
}
|
|
|
|
#endif
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
|
|
|
/* Add the group structure to the list in the device structure */
|
|
|
|
|
2018-11-11 18:38:29 +01:00
|
|
|
sq_addfirst((FAR sq_entry_t *)group, &dev->d_mld.grplist);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return group;
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: mld_grpfind
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Find an existing group.
|
|
|
|
*
|
2018-11-03 23:47:08 +01:00
|
|
|
* Assumptions:
|
|
|
|
* The network is locked.
|
|
|
|
*
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
FAR struct mld_group_s *mld_grpfind(FAR struct net_driver_s *dev,
|
|
|
|
FAR const net_ipv6addr_t addr)
|
|
|
|
{
|
|
|
|
FAR struct mld_group_s *group;
|
|
|
|
|
2018-11-10 18:29:02 +01:00
|
|
|
mldinfo("Searching for group: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
2023-08-22 08:00:32 +02:00
|
|
|
NTOHS(addr[0]), NTOHS(addr[1]), NTOHS(addr[2]), NTOHS(addr[3]),
|
|
|
|
NTOHS(addr[4]), NTOHS(addr[5]), NTOHS(addr[6]), NTOHS(addr[7]));
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
2018-11-11 18:38:29 +01:00
|
|
|
for (group = (FAR struct mld_group_s *)dev->d_mld.grplist.head;
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
group;
|
|
|
|
group = group->next)
|
|
|
|
{
|
2018-11-06 01:39:55 +01:00
|
|
|
mldinfo("Compare: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
2023-08-22 08:00:32 +02:00
|
|
|
NTOHS(group->grpaddr[0]), NTOHS(group->grpaddr[1]),
|
|
|
|
NTOHS(group->grpaddr[2]), NTOHS(group->grpaddr[3]),
|
|
|
|
NTOHS(group->grpaddr[4]), NTOHS(group->grpaddr[5]),
|
|
|
|
NTOHS(group->grpaddr[6]), NTOHS(group->grpaddr[7]));
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
|
|
|
if (net_ipv6addr_cmp(group->grpaddr, addr))
|
|
|
|
{
|
2018-11-06 01:39:55 +01:00
|
|
|
mldinfo("Match!\n");
|
2018-11-03 23:47:08 +01:00
|
|
|
DEBUGASSERT(group->ifindex == dev->d_ifindex);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return group;
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: mld_grpallocfind
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Find an existing group. If not found, create a new group for the
|
|
|
|
* address.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
FAR struct mld_group_s *mld_grpallocfind(FAR struct net_driver_s *dev,
|
|
|
|
FAR const net_ipv6addr_t addr)
|
|
|
|
{
|
|
|
|
FAR struct mld_group_s *group = mld_grpfind(dev, addr);
|
|
|
|
|
2018-11-06 01:39:55 +01:00
|
|
|
mldinfo("group: %p addr: %08x\n", group, (int)*addr);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
if (!group)
|
|
|
|
{
|
|
|
|
group = mld_grpalloc(dev, addr);
|
|
|
|
}
|
|
|
|
|
2018-11-06 01:39:55 +01:00
|
|
|
mldinfo("group: %p\n", group);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
return group;
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: mld_grpfree
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Release a previously allocated group.
|
|
|
|
*
|
2018-11-03 23:47:08 +01:00
|
|
|
* Assumptions:
|
|
|
|
* The network is locked.
|
|
|
|
*
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
void mld_grpfree(FAR struct net_driver_s *dev, FAR struct mld_group_s *group)
|
|
|
|
{
|
2018-11-06 01:39:55 +01:00
|
|
|
mldinfo("Free: %p flags: %02x\n", group, group->flags);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
2018-11-04 21:07:27 +01:00
|
|
|
/* Cancel the timers */
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
2020-08-04 12:31:31 +02:00
|
|
|
wd_cancel(&group->polldog);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
|
|
|
/* Remove the group structure from the group list in the device structure */
|
|
|
|
|
2018-11-11 18:38:29 +01:00
|
|
|
sq_rem((FAR sq_entry_t *)group, &dev->d_mld.grplist);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
|
|
|
/* Destroy the wait semaphore */
|
|
|
|
|
2020-01-02 17:49:34 +01:00
|
|
|
nxsem_destroy(&group->sem);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
2020-08-04 12:31:31 +02:00
|
|
|
/* Cancel the watchdog timer */
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
2020-08-04 12:31:31 +02:00
|
|
|
wd_cancel(&group->polldog);
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
|
|
|
/* Then release the group structure resources. */
|
|
|
|
|
2020-04-07 16:31:47 +02:00
|
|
|
mldinfo("Call kmm_free()\n");
|
2018-11-06 00:51:09 +01:00
|
|
|
kmm_free(group);
|
2018-11-11 18:38:29 +01:00
|
|
|
|
2018-11-11 23:23:18 +01:00
|
|
|
#ifndef CONFIG_NET_MLD_ROUTER
|
2018-11-11 18:38:29 +01:00
|
|
|
/* If there are no longer any groups, then stop the general query and v1
|
|
|
|
* compatibility timers.
|
|
|
|
*/
|
|
|
|
|
2018-11-11 23:23:18 +01:00
|
|
|
if (mld_ngroups(dev) == 0)
|
2018-11-11 18:38:29 +01:00
|
|
|
{
|
2020-08-04 12:31:31 +02:00
|
|
|
wd_cancel(&dev->d_mld.gendog);
|
|
|
|
wd_cancel(&dev->d_mld.v1dog);
|
2018-11-11 18:38:29 +01:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: mld_new_pollcycle
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Update accumulated membership at the beginning of each new poll cycle
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef CONFIG_NET_MLD_ROUTER
|
|
|
|
void mld_new_pollcycle(FAR struct net_driver_s *dev)
|
|
|
|
{
|
|
|
|
FAR struct mld_group_s *member;
|
|
|
|
|
|
|
|
/* Update member ship in every group */
|
|
|
|
|
2019-03-11 19:48:17 +01:00
|
|
|
for (member = (FAR struct mld_group_s *)dev->d_mld.grplist.head;
|
|
|
|
member;
|
|
|
|
member = member->next)
|
|
|
|
{
|
|
|
|
/* Save the number of members that reported in the previous query
|
|
|
|
* cycle; reset the number of members that have reported in the new
|
|
|
|
* query cycle.
|
|
|
|
*/
|
|
|
|
|
|
|
|
member->lstmbrs = member->members;
|
|
|
|
member->members = 0;
|
|
|
|
}
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
}
|
2018-11-11 18:38:29 +01:00
|
|
|
#endif
|
Squashed commit of the following:
net/mld: The MLD logic now compiles and is much less toxic. It still is not a proper MLD implementation: (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested. For this reason, it will remain EXPERIMENTAL for some time.
net/mld: Add some missing macros, more fixes related to IPv6 vs IPv4 types,
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
net/mld: More compilation cleaning. Most fixups for IPv6 vs IPv4 types.
net/mld: Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
net/mld: Add support for MLD statistics.
net/mld: Hook in MLD poll and packet transmission logic.
net/mld: Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input. Add functions to catch MLD messages dispatched by ICMPv6 input logic.
net/mld: As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 22:18:40 +01:00
|
|
|
|
|
|
|
#endif /* CONFIG_NET_MLD */
|