ppp_debug.h
Go to the documentation of this file.
1 /**
2  * @file ppp_debug.h
3  * @brief Data logging functions for debugging purpose (PPP)
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
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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  **/
28 
29 #ifndef _DHCP_DEBUG_H
30 #define _DHCP_DEBUG_H
31 
32 //Dependencies
33 #include "core/net.h"
34 #include "ppp/ppp.h"
35 #include "ppp/lcp.h"
36 #include "ppp/ipcp.h"
37 #include "debug.h"
38 
39 //C++ guard
40 #ifdef __cplusplus
41  extern "C" {
42 #endif
43 
44 //Check current trace level
45 #if (PPP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
46  error_t pppDumpPacket(const PppPacket *packet, size_t length, PppProtocol protocol);
47  error_t lcpDumpPacket(const PppPacket *packet, size_t length);
48  error_t ncpDumpPacket(const PppPacket *packet, size_t length, PppProtocol protocol);
49  error_t papDumpPacket(const PppPacket *packet, size_t length);
50  error_t chapDumpPacket(const PppPacket *packet, size_t length);
51  error_t lcpDumpOptions(const PppOption *option, size_t length);
52  error_t ipcpDumpOptions(const PppOption *option, size_t length);
53  error_t ipv6cpDumpOptions(const PppOption *option, size_t length);
54 #else
55  #define pppDumpPacket(packet, length, protocol)
56 #endif
57 
58 //C++ guard
59 #ifdef __cplusplus
60  }
61 #endif
62 
63 #endif
PPP (Point-to-Point Protocol)
TCP/IP stack core.
error_t lcpDumpPacket(const PppPacket *packet, size_t length)
Dump LCP packet for debugging purpose.
Definition: ppp_debug.c:183
Debugging facilities.
error_t pppDumpPacket(const PppPacket *packet, size_t length, PppProtocol protocol)
Dump LCP/NCP packet for debugging purpose.
Definition: ppp_debug.c:141
error_t chapDumpPacket(const PppPacket *packet, size_t length)
Dump CHAP packet for debugging purpose.
Definition: ppp_debug.c:591
#define PppPacket
Definition: ppp.h:35
__start_packed struct @294 PppOption
LCP/NCP option.
LCP (PPP Link Control Protocol)
error_t
Error codes.
Definition: error.h:40
error_t ncpDumpPacket(const PppPacket *packet, size_t length, PppProtocol protocol)
Dump NCP packet for debugging purpose.
Definition: ppp_debug.c:341
error_t ipv6cpDumpOptions(const PppOption *option, size_t length)
Dump IPV6CP options for debugging purpose.
Definition: ppp_debug.c:844
uint8_t protocol
uint8_t length
Definition: dtls_misc.h:140
error_t lcpDumpOptions(const PppOption *option, size_t length)
Dump LCP options for debugging purpose.
Definition: ppp_debug.c:700
error_t papDumpPacket(const PppPacket *packet, size_t length)
Dump PAP packet for debugging purpose.
Definition: ppp_debug.c:471
IPCP (PPP Internet Protocol Control Protocol)
PppProtocol
Protocol field values.
Definition: ppp.h:195
error_t ipcpDumpOptions(const PppOption *option, size_t length)
Dump IPCP options for debugging purpose.
Definition: ppp_debug.c:773