The Pedigree Project  0.1
pppdebug.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*****************************************************************************
21 * pppdebug.h - System debugging utilities.
22 *
23 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
24 * portions Copyright (c) 1998 Global Election Systems Inc.
25 * portions Copyright (c) 2001 by Cognizant Pty Ltd.
26 *
27 * The authors hereby grant permission to use, copy, modify, distribute,
28 * and license this software and its documentation for any purpose, provided
29 * that existing copyright notices are retained in all copies and that this
30 * notice and the following disclaimer are included verbatim in any
31 * distributions. No written agreement, license, or royalty fee is required
32 * for any of the authorized uses.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
35 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
36 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
37 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
38 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
39 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
40 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
41 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
43 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44 *
45 ******************************************************************************
46 * REVISION HISTORY (please don't use tabs!)
47 *
48 * 03-01-01 Marc Boucher <marc@mbsi.ca>
49 * Ported to lwIP.
50 * 98-07-29 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.
51 * Original.
52 *
53 *****************************************************************************
54 */
55 
56 #include "netif/ppp/ppp_opts.h"
57 #if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
58 
59 #ifndef PPPDEBUG_H
60 #define PPPDEBUG_H
61 
62 /* Trace levels. */
63 #define LOG_CRITICAL (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
64 #define LOG_ERR (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
65 #define LOG_NOTICE (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING)
66 #define LOG_WARNING (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING)
67 #define LOG_INFO (PPP_DEBUG)
68 #define LOG_DETAIL (PPP_DEBUG)
69 #define LOG_DEBUG (PPP_DEBUG)
70 
71 #if PPP_DEBUG
72 
73 #define MAINDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
74 #define SYSDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
75 #define FSMDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
76 #define LCPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
77 #define IPCPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
78 #define IPV6CPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
79 #define UPAPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
80 #define CHAPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a)
81 #define PPPDEBUG(a, b) LWIP_DEBUGF(a, b)
82 
83 #else /* PPP_DEBUG */
84 
85 #define MAINDEBUG(a)
86 #define SYSDEBUG(a)
87 #define FSMDEBUG(a)
88 #define LCPDEBUG(a)
89 #define IPCPDEBUG(a)
90 #define IPV6CPDEBUG(a)
91 #define UPAPDEBUG(a)
92 #define CHAPDEBUG(a)
93 #define PPPDEBUG(a, b)
94 
95 #endif /* PPP_DEBUG */
96 
97 #endif /* PPPDEBUG_H */
98 
99 #endif /* PPP_SUPPORT */