mld_debug.c File Reference

Data logging functions for debugging purpose (MLD) More...

#include "core/net.h"
#include "ipv6/icmpv6.h"
#include "mld/mld_debug.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   MLD_TRACE_LEVEL
 

Functions

void mldDumpMessage (const MldMessage *message, size_t length)
 Dump MLD message for debugging purpose. More...
 
void mldDumpQueryV2 (const MldListenerQueryV2 *message, size_t length)
 Dump MLDv2 Query message for debugging purpose. More...
 
void mldDumpReportV2 (const MldListenerReportV2 *message, size_t length)
 Dump MLDv2 Report message for debugging purpose. More...
 
void mldDumpMulticastAddrRecord (const MldMcastAddrRecord *record, size_t length)
 Dump multicast address record for debugging purpose. More...
 
const char_tmldGetParamName (uint_t value, const MldParamName *paramList, size_t paramListLen)
 Convert a parameter to string representation. More...
 

Variables

const MldParamName mldMessageTypeList []
 
const MldParamName mldMulticastAddrRecordTypeList []
 

Detailed Description

Data logging functions for debugging purpose (MLD)

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file mld_debug.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   MLD_TRACE_LEVEL

Definition at line 32 of file mld_debug.c.

Function Documentation

◆ mldDumpMessage()

void mldDumpMessage ( const MldMessage message,
size_t  length 
)

Dump MLD message for debugging purpose.

Parameters
[in]messagePointer to the MLD message to dump
[in]lengthLength of the MLD message, in bytes

Definition at line 70 of file mld_debug.c.

◆ mldDumpMulticastAddrRecord()

void mldDumpMulticastAddrRecord ( const MldMcastAddrRecord record,
size_t  length 
)

Dump multicast address record for debugging purpose.

Parameters
[in]recordPointer to the multicast address record to dump
[in]lengthLength of the multicast address record, in bytes

Definition at line 290 of file mld_debug.c.

◆ mldDumpQueryV2()

void mldDumpQueryV2 ( const MldListenerQueryV2 message,
size_t  length 
)

Dump MLDv2 Query message for debugging purpose.

Parameters
[in]messagePointer to the MLD message to dump
[in]lengthLength of the MLD message, in bytes

Definition at line 141 of file mld_debug.c.

◆ mldDumpReportV2()

void mldDumpReportV2 ( const MldListenerReportV2 message,
size_t  length 
)

Dump MLDv2 Report message for debugging purpose.

Parameters
[in]messagePointer to the MLD message to dump
[in]lengthLength of the MLD message, in bytes

Definition at line 232 of file mld_debug.c.

◆ mldGetParamName()

const char_t* mldGetParamName ( uint_t  value,
const MldParamName paramList,
size_t  paramListLen 
)

Convert a parameter to string representation.

Parameters
[in]valueParameter value
[in]paramListList of acceptable parameters
[in]paramListLenNumber of entries in the list
Returns
NULL-terminated string describing the parameter

Definition at line 344 of file mld_debug.c.

Variable Documentation

◆ mldMessageTypeList

const MldParamName mldMessageTypeList[]
Initial value:
=
{
{ICMPV6_TYPE_MCAST_LISTENER_QUERY, "Multicast Listener Query"},
{ICMPV6_TYPE_MCAST_LISTENER_REPORT_V1, "Version 1 Multicast Listener Report"},
{ICMPV6_TYPE_MCAST_LISTENER_DONE_V1, "Version 1 Multicast Listener Done"},
{ICMPV6_TYPE_MCAST_LISTENER_REPORT_V2, "Version 2 Multicast Listener Report"}
}

Definition at line 44 of file mld_debug.c.

◆ mldMulticastAddrRecordTypeList

const MldParamName mldMulticastAddrRecordTypeList[]
Initial value:
=
{
{MLD_MCAST_ADDR_RECORD_TYPE_IS_IN, "MODE_IS_INCLUDE"},
{MLD_MCAST_ADDR_RECORD_TYPE_IS_EX, "MODE_IS_EXCLUDE"},
{MLD_MCAST_ADDR_RECORD_TYPE_TO_IN, "CHANGE_TO_INCLUDE_MODE"},
{MLD_MCAST_ADDR_RECORD_TYPE_TO_EX, "CHANGE_TO_EXCLUDE_MODE"},
{MLD_MCAST_ADDR_RECORD_TYPE_ALLOW, "ALLOW_NEW_SOURCES"},
{MLD_MCAST_ADDR_RECORD_TYPE_BLOCK, "BLOCK_OLD_SOURCES"}
}

Definition at line 53 of file mld_debug.c.

@ MLD_MCAST_ADDR_RECORD_TYPE_IS_EX
Definition: mld_common.h:106
@ MLD_MCAST_ADDR_RECORD_TYPE_IS_IN
Definition: mld_common.h:105
@ ICMPV6_TYPE_MCAST_LISTENER_QUERY
Definition: icmpv6.h:59
@ MLD_MCAST_ADDR_RECORD_TYPE_TO_IN
Definition: mld_common.h:107
@ ICMPV6_TYPE_MCAST_LISTENER_REPORT_V1
Definition: icmpv6.h:60
@ MLD_MCAST_ADDR_RECORD_TYPE_TO_EX
Definition: mld_common.h:108
@ ICMPV6_TYPE_MCAST_LISTENER_DONE_V1
Definition: icmpv6.h:61
@ MLD_MCAST_ADDR_RECORD_TYPE_BLOCK
Definition: mld_common.h:110
@ ICMPV6_TYPE_MCAST_LISTENER_REPORT_V2
Definition: icmpv6.h:67
@ MLD_MCAST_ADDR_RECORD_TYPE_ALLOW
Definition: mld_common.h:109