igmp_debug.c File Reference

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

#include "core/net.h"
#include "igmp/igmp_debug.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   IGMP_TRACE_LEVEL
 

Functions

void igmpDumpMessage (const IgmpMessage *message, size_t length)
 Dump IGMP message for debugging purpose. More...
 
void igmpDumpMembershipQueryV3 (const IgmpMembershipQueryV3 *message, size_t length)
 Dump Version 3 Membership Query message. More...
 
void igmpDumpMessageMembershipReportV3 (const IgmpMembershipReportV3 *message, size_t length)
 Dump Version 3 Membership Report message. More...
 
void igmpDumpGroupRecord (const IgmpGroupRecord *record, size_t length)
 Dump group record for debugging purpose. More...
 
const char_tigmpGetParamName (uint_t value, const IgmpParamName *paramList, size_t paramListLen)
 Convert a parameter to string representation. More...
 

Variables

const IgmpParamName igmpMessageTypeList []
 
const IgmpParamName igmpGroupRecordTypeList []
 

Detailed Description

Data logging functions for debugging purpose (IGMP)

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 igmp_debug.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   IGMP_TRACE_LEVEL

Definition at line 32 of file igmp_debug.c.

Function Documentation

◆ igmpDumpGroupRecord()

void igmpDumpGroupRecord ( const IgmpGroupRecord record,
size_t  length 
)

Dump group record for debugging purpose.

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

Definition at line 279 of file igmp_debug.c.

◆ igmpDumpMembershipQueryV3()

void igmpDumpMembershipQueryV3 ( const IgmpMembershipQueryV3 message,
size_t  length 
)

Dump Version 3 Membership Query message.

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

Definition at line 136 of file igmp_debug.c.

◆ igmpDumpMessage()

void igmpDumpMessage ( const IgmpMessage message,
size_t  length 
)

Dump IGMP message for debugging purpose.

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

Definition at line 70 of file igmp_debug.c.

◆ igmpDumpMessageMembershipReportV3()

void igmpDumpMessageMembershipReportV3 ( const IgmpMembershipReportV3 message,
size_t  length 
)

Dump Version 3 Membership Report message.

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

Definition at line 220 of file igmp_debug.c.

◆ igmpGetParamName()

const char_t* igmpGetParamName ( uint_t  value,
const IgmpParamName 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 333 of file igmp_debug.c.

Variable Documentation

◆ igmpGroupRecordTypeList

const IgmpParamName igmpGroupRecordTypeList[]
Initial value:
=
{
{IGMP_GROUP_RECORD_TYPE_IS_IN, "MODE_IS_INCLUDE"},
{IGMP_GROUP_RECORD_TYPE_IS_EX, "MODE_IS_EXCLUDE"},
{IGMP_GROUP_RECORD_TYPE_TO_IN, "CHANGE_TO_INCLUDE_MODE"},
{IGMP_GROUP_RECORD_TYPE_TO_EX, "CHANGE_TO_EXCLUDE_MODE"},
{IGMP_GROUP_RECORD_TYPE_ALLOW, "ALLOW_NEW_SOURCES"},
{IGMP_GROUP_RECORD_TYPE_BLOCK, "BLOCK_OLD_SOURCES"}
}

Definition at line 53 of file igmp_debug.c.

◆ igmpMessageTypeList

const IgmpParamName igmpMessageTypeList[]
Initial value:
=
{
{IGMP_TYPE_MEMBERSHIP_QUERY, "Membership Query"},
{IGMP_TYPE_MEMBERSHIP_REPORT_V1, "Version 1 Membership Report"},
{IGMP_TYPE_MEMBERSHIP_REPORT_V2, "Version 2 Membership Report"},
{IGMP_TYPE_LEAVE_GROUP, "Leave Group"},
{IGMP_TYPE_MEMBERSHIP_REPORT_V3, "Version 3 Membership Report"}
}

Definition at line 43 of file igmp_debug.c.

@ IGMP_TYPE_MEMBERSHIP_REPORT_V2
Definition: igmp_common.h:176
@ IGMP_TYPE_MEMBERSHIP_REPORT_V1
Definition: igmp_common.h:175
@ IGMP_TYPE_MEMBERSHIP_QUERY
Definition: igmp_common.h:174
@ IGMP_GROUP_RECORD_TYPE_BLOCK
Definition: igmp_common.h:193
@ IGMP_GROUP_RECORD_TYPE_ALLOW
Definition: igmp_common.h:192
@ IGMP_TYPE_MEMBERSHIP_REPORT_V3
Definition: igmp_common.h:178
@ IGMP_GROUP_RECORD_TYPE_IS_EX
Definition: igmp_common.h:189
@ IGMP_GROUP_RECORD_TYPE_TO_EX
Definition: igmp_common.h:191
@ IGMP_GROUP_RECORD_TYPE_IS_IN
Definition: igmp_common.h:188
@ IGMP_GROUP_RECORD_TYPE_TO_IN
Definition: igmp_common.h:190
@ IGMP_TYPE_LEAVE_GROUP
Definition: igmp_common.h:177