Definitions common to MLD node, router and snooping switch. More...
#include "core/net.h"
Go to the source code of this file.
Macros | |
#define | MLD_TICK_INTERVAL 200 |
#define | MLD_ROBUSTNESS_VARIABLE 2 |
#define | MLD_UNSOLICITED_REPORT_INTERVAL 10000 |
#define | MLD_OLDER_VERSION_QUERIER_PRESENT_TIMEOUT 400000 |
#define | MLD_V2_UNSOLICITED_REPORT_INTERVAL 1000 |
#define | MLD_MAX_MSG_SIZE 1024 |
#define | MLD_HOP_LIMIT 1 |
Enumerations | |
enum | MldVersion { MLD_VERSION_1 = 1, MLD_VERSION_2 = 2 } |
MLD versions. More... | |
enum | MldMcastAddrRecordType { MLD_MCAST_ADDR_RECORD_TYPE_IS_IN = 1, MLD_MCAST_ADDR_RECORD_TYPE_IS_EX = 2, MLD_MCAST_ADDR_RECORD_TYPE_TO_IN = 3, MLD_MCAST_ADDR_RECORD_TYPE_TO_EX = 4, MLD_MCAST_ADDR_RECORD_TYPE_ALLOW = 5, MLD_MCAST_ADDR_RECORD_TYPE_BLOCK = 6 } |
MLDv2 multicast address record types. More... | |
Functions | |
error_t | mldInit (NetInterface *interface) |
MLD initialization. More... | |
void | mldTick (NetInterface *interface) |
MLD node timer handler. More... | |
void | mldLinkChangeEvent (NetInterface *interface) |
Callback function for link change event. More... | |
error_t | mldSendMessage (NetInterface *interface, const Ipv6Addr *destAddr, NetBuffer *buffer, size_t offset) |
Send MLD message. More... | |
void | mldProcessMessage (NetInterface *interface, const Ipv6PseudoHeader *pseudoHeader, const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary) |
Process incoming MLD message. More... | |
systime_t | mldGetRandomDelay (systime_t maxDelay) |
Generate a random delay. More... | |
uint32_t | mldDecodeFloatingPointValue8 (uint8_t code) |
Decode a floating-point value (8-bit code) More... | |
uint32_t | mldDecodeFloatingPointValue16 (uint16_t code) |
Decode a floating-point value (16-bit code) More... | |
Variables | |
typedef | __packed_struct |
MLD message. More... | |
uint8_t | code |
uint16_t | checksum |
uint16_t | maxRespDelay |
uint16_t | reserved |
Ipv6Addr | multicastAddr |
MldMessage | |
uint16_t | maxRespCode |
uint16_t | reserved1 |
uint8_t | qrv |
uint8_t | s |
uint8_t | reserved2 |
uint8_t | qqic |
uint16_t | numOfSources |
Ipv6Addr | srcAddr [] |
MldListenerQueryV2 | |
uint16_t | numOfMcastAddrRecords |
uint8_t | mcastAddrRecords [] |
MldListenerReportV2 | |
uint8_t | auxDataLen |
MldMcastAddrRecord | |
const Ipv6Addr | MLD_V2_ALL_ROUTERS_ADDR |
systime_t | mldTickCounter |
Detailed Description
Definitions common to MLD node, router and 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 mld_common.h.
Macro Definition Documentation
◆ MLD_HOP_LIMIT
#define MLD_HOP_LIMIT 1 |
Definition at line 80 of file mld_common.h.
◆ MLD_MAX_MSG_SIZE
#define MLD_MAX_MSG_SIZE 1024 |
Definition at line 74 of file mld_common.h.
◆ MLD_OLDER_VERSION_QUERIER_PRESENT_TIMEOUT
#define MLD_OLDER_VERSION_QUERIER_PRESENT_TIMEOUT 400000 |
Definition at line 60 of file mld_common.h.
◆ MLD_ROBUSTNESS_VARIABLE
#define MLD_ROBUSTNESS_VARIABLE 2 |
Definition at line 46 of file mld_common.h.
◆ MLD_TICK_INTERVAL
#define MLD_TICK_INTERVAL 200 |
Definition at line 39 of file mld_common.h.
◆ MLD_UNSOLICITED_REPORT_INTERVAL
#define MLD_UNSOLICITED_REPORT_INTERVAL 10000 |
Definition at line 53 of file mld_common.h.
◆ MLD_V2_UNSOLICITED_REPORT_INTERVAL
#define MLD_V2_UNSOLICITED_REPORT_INTERVAL 1000 |
Definition at line 67 of file mld_common.h.
Enumeration Type Documentation
◆ MldMcastAddrRecordType
MLDv2 multicast address record types.
Definition at line 103 of file mld_common.h.
◆ MldVersion
enum MldVersion |
Function Documentation
◆ mldDecodeFloatingPointValue16()
uint32_t mldDecodeFloatingPointValue16 | ( | uint16_t | code | ) |
Decode a floating-point value (16-bit code)
- Parameters
-
[in] code Floating-point representation
- Returns
- Decoded value
Definition at line 315 of file mld_common.c.
◆ mldDecodeFloatingPointValue8()
uint32_t mldDecodeFloatingPointValue8 | ( | uint8_t | code | ) |
Decode a floating-point value (8-bit code)
- Parameters
-
[in] code Floating-point representation
- Returns
- Decoded value
Definition at line 294 of file mld_common.c.
◆ mldGetRandomDelay()
Generate a random delay.
- Parameters
-
[in] maxDelay maximum delay
- Returns
- Random amount of time
Definition at line 269 of file mld_common.c.
◆ mldInit()
error_t mldInit | ( | NetInterface * | interface | ) |
MLD initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 72 of file mld_common.c.
◆ mldLinkChangeEvent()
void mldLinkChangeEvent | ( | NetInterface * | interface | ) |
Callback function for link change event.
- Parameters
-
[in] interface Underlying network interface
Definition at line 118 of file mld_common.c.
◆ mldProcessMessage()
void mldProcessMessage | ( | NetInterface * | interface, |
const Ipv6PseudoHeader * | pseudoHeader, | ||
const NetBuffer * | buffer, | ||
size_t | offset, | ||
const NetRxAncillary * | ancillary | ||
) |
Process incoming MLD message.
- Parameters
-
[in] interface Underlying network interface [in] pseudoHeader IPv6 pseudo header [in] buffer Multi-part buffer containing the incoming MLD message [in] offset Offset to the first byte of the MLD message [in] ancillary Additional options passed to the stack along with the packet
Definition at line 226 of file mld_common.c.
◆ mldSendMessage()
error_t mldSendMessage | ( | NetInterface * | interface, |
const Ipv6Addr * | destAddr, | ||
NetBuffer * | buffer, | ||
size_t | offset | ||
) |
Send MLD message.
- Parameters
-
[in] interface Underlying network interface [in] destAddr Destination IP address [in] buffer Multi-part buffer containing the payload [in] offset Offset to the first byte of the payload
- Returns
- Error code
Definition at line 136 of file mld_common.c.
◆ mldTick()
void mldTick | ( | NetInterface * | interface | ) |
MLD node timer handler.
This routine must be periodically called by the TCP/IP stack to handle MLD related timers
- Parameters
-
[in] interface Underlying network interface
Definition at line 104 of file mld_common.c.
Variable Documentation
◆ __packed_struct
typedef __packed_struct |
MLD message.
MLDv2 multicast address record.
MLDv2 Report message.
MLDv2 Query message.
Definition at line 126 of file mld_common.h.
◆ auxDataLen
uint8_t auxDataLen |
Definition at line 186 of file mld_common.h.
◆ checksum
uint16_t checksum |
Definition at line 130 of file mld_common.h.
◆ code
uint8_t code |
Definition at line 129 of file mld_common.h.
◆ maxRespCode
uint16_t maxRespCode |
Definition at line 146 of file mld_common.h.
◆ maxRespDelay
uint16_t maxRespDelay |
Definition at line 131 of file mld_common.h.
◆ mcastAddrRecords
uint8_t mcastAddrRecords[] |
Definition at line 175 of file mld_common.h.
◆ MLD_V2_ALL_ROUTERS_ADDR
|
extern |
Definition at line 59 of file mld_common.c.
◆ MldListenerQueryV2
MldListenerQueryV2 |
Definition at line 161 of file mld_common.h.
◆ MldListenerReportV2
MldListenerReportV2 |
Definition at line 176 of file mld_common.h.
◆ MldMcastAddrRecord
MldMcastAddrRecord |
Definition at line 190 of file mld_common.h.
◆ MldMessage
MldMessage |
Definition at line 134 of file mld_common.h.
◆ mldTickCounter
|
extern |
Definition at line 63 of file mld_common.c.
◆ multicastAddr
Ipv6Addr multicastAddr |
Definition at line 133 of file mld_common.h.
◆ numOfMcastAddrRecords
uint16_t numOfMcastAddrRecords |
Definition at line 174 of file mld_common.h.
◆ numOfSources
uint16_t numOfSources |
Definition at line 159 of file mld_common.h.
◆ qqic
uint8_t qqic |
Definition at line 158 of file mld_common.h.
◆ qrv
uint8_t qrv |
Definition at line 154 of file mld_common.h.
◆ reserved
uint16_t reserved |
Definition at line 132 of file mld_common.h.
◆ reserved1
uint8_t reserved1 |
Definition at line 147 of file mld_common.h.
◆ reserved2
uint16_t reserved2 |
Definition at line 156 of file mld_common.h.
◆ s
uint8_t s |
Definition at line 155 of file mld_common.h.
◆ srcAddr
Ipv6Addr srcAddr[] |
Definition at line 160 of file mld_common.h.