]> git.sur5r.net Git - freertos/blob - Demo/Common/ethernet/lwIP_130/src/netif/ppp/pppdebug.h
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Demo / Common / ethernet / lwIP_130 / src / netif / ppp / pppdebug.h
1 /*****************************************************************************\r
2 * pppdebug.h - System debugging utilities.\r
3 *\r
4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.\r
5 * portions Copyright (c) 1998 Global Election Systems Inc.\r
6 * portions Copyright (c) 2001 by Cognizant Pty Ltd.\r
7 *\r
8 * The authors hereby grant permission to use, copy, modify, distribute,\r
9 * and license this software and its documentation for any purpose, provided\r
10 * that existing copyright notices are retained in all copies and that this\r
11 * notice and the following disclaimer are included verbatim in any \r
12 * distributions. No written agreement, license, or royalty fee is required\r
13 * for any of the authorized uses.\r
14 *\r
15 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR\r
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
18 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
25 *\r
26 ******************************************************************************\r
27 * REVISION HISTORY (please don't use tabs!)\r
28 *\r
29 * 03-01-01 Marc Boucher <marc@mbsi.ca>\r
30 *   Ported to lwIP.\r
31 * 98-07-29 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.\r
32 *   Original.\r
33 *\r
34 *****************************************************************************\r
35 */\r
36 #ifndef PPPDEBUG_H\r
37 #define PPPDEBUG_H\r
38 \r
39 /************************\r
40 *** PUBLIC DATA TYPES ***\r
41 ************************/\r
42 /* Trace levels. */\r
43 typedef enum {\r
44 LOG_CRITICAL = 0,\r
45 LOG_ERR      = 1,\r
46 LOG_NOTICE   = 2,\r
47 LOG_WARNING  = 3,\r
48 LOG_INFO     = 5,\r
49 LOG_DETAIL   = 6,\r
50 LOG_DEBUG    = 7\r
51 } LogCodes;\r
52 \r
53 \r
54 /***********************\r
55 *** PUBLIC FUNCTIONS ***\r
56 ***********************/\r
57 /*\r
58  * ppp_trace - a form of printf to send tracing information to stderr\r
59  */\r
60 void ppp_trace(int level, const char *format,...);\r
61 \r
62 #define TRACELCP PPP_DEBUG\r
63 \r
64 #if PPP_DEBUG\r
65 \r
66 #define AUTHDEBUG(a) ppp_trace a\r
67 #define IPCPDEBUG(a) ppp_trace a\r
68 #define UPAPDEBUG(a) ppp_trace a\r
69 #define LCPDEBUG(a)  ppp_trace a\r
70 #define FSMDEBUG(a)  ppp_trace a\r
71 #define CHAPDEBUG(a) ppp_trace a\r
72 #define PPPDEBUG(a)  ppp_trace a\r
73 \r
74 #else /* PPP_DEBUG */\r
75 \r
76 #define AUTHDEBUG(a)\r
77 #define IPCPDEBUG(a)\r
78 #define UPAPDEBUG(a)\r
79 #define LCPDEBUG(a)\r
80 #define FSMDEBUG(a)\r
81 #define CHAPDEBUG(a)\r
82 #define PPPDEBUG(a)\r
83 \r
84 #endif /* PPP_DEBUG */\r
85 \r
86 #endif /* PPPDEBUG_H */\r