dns_debug.c File Reference

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

#include "core/net.h"
#include "dns/dns_debug.h"
#include "netbios/nbns_client.h"
#include "netbios/nbns_responder.h"
#include "netbios/nbns_common.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   DNS_TRACE_LEVEL
 

Functions

void dnsDumpMessage (const DnsHeader *message, size_t length)
 Dump DNS message for debugging purpose. More...
 
size_t dnsDumpQuestion (const DnsHeader *message, size_t length, size_t pos, char_t *buffer)
 Dump DNS question for debugging purpose. More...
 
size_t dnsDumpResourceRecord (const DnsHeader *message, size_t length, size_t pos, char_t *buffer)
 Dump DNS resource record for debugging purpose. More...
 

Detailed Description

Data logging functions for debugging purpose (DNS)

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.0

Definition in file dns_debug.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   DNS_TRACE_LEVEL

Definition at line 32 of file dns_debug.c.

Function Documentation

◆ dnsDumpMessage()

void dnsDumpMessage ( const DnsHeader message,
size_t  length 
)

Dump DNS message for debugging purpose.

Parameters
[in]messagePointer to the DNS message
[in]lengthLength of the DNS message

Definition at line 52 of file dns_debug.c.

◆ dnsDumpQuestion()

size_t dnsDumpQuestion ( const DnsHeader message,
size_t  length,
size_t  pos,
char_t buffer 
)

Dump DNS question for debugging purpose.

Parameters
[in]messagePointer to the DNS message
[in]lengthLength of the DNS message
[in]posOffset of the question to decode
[in]bufferMemory buffer to holds domain names
Returns
Offset to the next question

Definition at line 170 of file dns_debug.c.

◆ dnsDumpResourceRecord()

size_t dnsDumpResourceRecord ( const DnsHeader message,
size_t  length,
size_t  pos,
char_t buffer 
)

Dump DNS resource record for debugging purpose.

Parameters
[in]messagePointer to the DNS message
[in]lengthLength of the DNS message
[in]posOffset of the question to decode
[in]bufferMemory buffer to holds domain names
Returns
Offset to the next question

Definition at line 223 of file dns_debug.c.