Go to the documentation of this file.
1 /**
2  * @file dhcp_debug.h
3  * @brief Data logging functions for debugging purpose (DHCP)
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
29 #ifndef _DHCP_DEBUG_H
30 #define _DHCP_DEBUG_H
32 //Dependencies
33 #include "core/net.h"
34 #include "dhcp/dhcp_common.h"
35 #include "debug.h"
37 //C++ guard
38 #ifdef __cplusplus
39  extern "C" {
40 #endif
42 //Check current trace level
45  error_t dhcpDumpMessageType(const DhcpOption *option);
47  error_t dhcpDumpBoolean(const DhcpOption *option);
48  error_t dhcpDumpInt8(const DhcpOption *option);
49  error_t dhcpDumpInt16(const DhcpOption *option);
50  error_t dhcpDumpInt32(const DhcpOption *option);
51  error_t dhcpDumpString(const DhcpOption *option);
52  error_t dhcpDumpIpv4Addr(const DhcpOption *option);
54  error_t dhcpDumpRawData(const DhcpOption *option);
55 #else
56  #define dhcpDumpMessage(message, length)
57 #endif
59 //C++ guard
60 #ifdef __cplusplus
61  }
62 #endif
64 #endif
Definitions common to DHCP client and server.
error_t dhcpDumpIpv4Addr(const DhcpOption *option)
Dump an option containing an IPv4 address.
Definition: dhcp_debug.c:516
TCP/IP stack core.
error_t dhcpDumpInt32(const DhcpOption *option)
Dump an option containing a 32-bit integer.
Definition: dhcp_debug.c:469
Debugging facilities.
uint8_t message[]
Definition: chap.h:150
error_t dhcpDumpBoolean(const DhcpOption *option)
Dump an option containing a boolean.
Definition: dhcp_debug.c:405
__start_packed struct @128 DhcpOption
DHCP option.
error_t dhcpDumpInt8(const DhcpOption *option)
Dump an option containing a 8-bit integer.
Definition: dhcp_debug.c:425
error_t dhcpDumpRawData(const DhcpOption *option)
Dump an option containing raw data.
Definition: dhcp_debug.c:569
error_t dhcpDumpMessageType(const DhcpOption *option)
Dump Message Type option.
Definition: dhcp_debug.c:350
error_t dhcpDumpIpv4AddrList(const DhcpOption *option)
Dump an option containing a list of IPv4 addresses.
Definition: dhcp_debug.c:540
error_t dhcpDumpMessage(const DhcpMessage *message, size_t length)
Dump DHCP message for debugging purpose.
Definition: dhcp_debug.c:156
error_t dhcpDumpInt16(const DhcpOption *option)
Dump an option containing a 16-bit integer.
Definition: dhcp_debug.c:445
error_t dhcpDumpParamRequestList(const DhcpOption *option)
Dump Parameter Request List option.
Definition: dhcp_debug.c:377
Error codes.
Definition: error.h:40
error_t dhcpDumpString(const DhcpOption *option)
Dump an option containing a string.
Definition: dhcp_debug.c:493
__start_packed struct @127 DhcpMessage
DHCP message.
uint8_t length
Definition: dtls_misc.h:140