1 |
786 |
skrzyp |
#ifndef CYGONCE_PPP_SYSLOG_H
|
2 |
|
|
#define CYGONCE_PPP_SYSLOG_H
|
3 |
|
|
// ====================================================================
|
4 |
|
|
//
|
5 |
|
|
// syslog.h
|
6 |
|
|
//
|
7 |
|
|
// PPP syslog stub
|
8 |
|
|
//
|
9 |
|
|
// ====================================================================
|
10 |
|
|
// ####ECOSGPLCOPYRIGHTBEGIN####
|
11 |
|
|
// -------------------------------------------
|
12 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
13 |
|
|
// Copyright (C) 2003 Free Software Foundation, Inc.
|
14 |
|
|
//
|
15 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
16 |
|
|
// the terms of the GNU General Public License as published by the Free
|
17 |
|
|
// Software Foundation; either version 2 or (at your option) any later
|
18 |
|
|
// version.
|
19 |
|
|
//
|
20 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT
|
21 |
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
22 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
23 |
|
|
// for more details.
|
24 |
|
|
//
|
25 |
|
|
// You should have received a copy of the GNU General Public License
|
26 |
|
|
// along with eCos; if not, write to the Free Software Foundation, Inc.,
|
27 |
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
28 |
|
|
//
|
29 |
|
|
// As a special exception, if other files instantiate templates or use
|
30 |
|
|
// macros or inline functions from this file, or you compile this file
|
31 |
|
|
// and link it with other works to produce a work based on this file,
|
32 |
|
|
// this file does not by itself cause the resulting work to be covered by
|
33 |
|
|
// the GNU General Public License. However the source code for this file
|
34 |
|
|
// must still be made available in accordance with section (3) of the GNU
|
35 |
|
|
// General Public License v2.
|
36 |
|
|
//
|
37 |
|
|
// This exception does not invalidate any other reasons why a work based
|
38 |
|
|
// on this file might be covered by the GNU General Public License.
|
39 |
|
|
// -------------------------------------------
|
40 |
|
|
// ####ECOSGPLCOPYRIGHTEND####
|
41 |
|
|
// ====================================================================
|
42 |
|
|
//#####DESCRIPTIONBEGIN####
|
43 |
|
|
//
|
44 |
|
|
// Author(s): nickg
|
45 |
|
|
// Contributors: nickg
|
46 |
|
|
// Date: 2003-06-01
|
47 |
|
|
// Purpose: Syslog
|
48 |
|
|
// Description: This header contains definitions for using syslog
|
49 |
|
|
// in the PPP code.
|
50 |
|
|
//
|
51 |
|
|
//####DESCRIPTIONEND####
|
52 |
|
|
//
|
53 |
|
|
// ====================================================================
|
54 |
|
|
|
55 |
|
|
#include <cyg/infra/diag.h>
|
56 |
|
|
|
57 |
|
|
#include <cyg/ppp/names.h>
|
58 |
|
|
|
59 |
|
|
// ====================================================================
|
60 |
|
|
// Syslog functions
|
61 |
|
|
//
|
62 |
|
|
// We ignore setlogmask() but syslog() is a simple stub that goes to
|
63 |
|
|
// diag_printf().
|
64 |
|
|
|
65 |
|
|
#define setlogmask(x)
|
66 |
|
|
|
67 |
|
|
void syslog( int level, char *fmt, ... );
|
68 |
|
|
|
69 |
|
|
// ====================================================================
|
70 |
|
|
// Log level flags
|
71 |
|
|
//
|
72 |
|
|
// These are duplicates of the defines in sys/param.h.
|
73 |
|
|
|
74 |
|
|
#define LOG_ERR 0x0001
|
75 |
|
|
#define LOG_WARNING 0x0002
|
76 |
|
|
#define LOG_NOTICE 0x0004
|
77 |
|
|
#define LOG_INFO 0x0008
|
78 |
|
|
#define LOG_DEBUG 0x0010
|
79 |
|
|
#define LOG_MDEBUG 0x0020
|
80 |
|
|
#define LOG_IOCTL 0x0040
|
81 |
|
|
#define LOG_ADDR 0x0100
|
82 |
|
|
#define LOG_FAIL 0x0200
|
83 |
|
|
#define LOG_INIT 0x0080
|
84 |
|
|
#define LOG_EMERG 0x4000
|
85 |
|
|
#define LOG_CRIT 0x8000
|
86 |
|
|
|
87 |
|
|
// ====================================================================
|
88 |
|
|
// Debug facility
|
89 |
|
|
//
|
90 |
|
|
// Switch these defines over to enable some debugging messages
|
91 |
|
|
|
92 |
|
|
//#define db_printf diag_printf
|
93 |
|
|
#define db_printf(fmt, ... )
|
94 |
|
|
|
95 |
|
|
// ====================================================================
|
96 |
|
|
#endif // CYGONCE_PPP_SYSLOG_H
|