~ubuntu-branches/ubuntu/gutsy/tcpreen/gutsy

« back to all changes in this revision

Viewing changes to src/systlog.h

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Kurth
  • Date: 2003-03-04 23:19:35 UTC
  • Revision ID: james.westby@ubuntu.com-20030304231935-rlvnd0mv4be1n8rn
Tags: upstream-1.2.2
Import upstream version 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * systlog.h - convenience header for <syslog.h>
 
3
 * $Id: systlog.h,v 1.1 2003/01/26 09:11:31 rdenisc Exp $
 
4
 * 
 
5
 * Feel free to use in your own GPL programs.
 
6
 */
 
7
 
 
8
/***********************************************************************
 
9
 *  Copyright (C) 2002-2003 R�mi Denis-Courmont.                       *
 
10
 *  This program is free software; you can redistribute and/or modify  *
 
11
 *  it under the terms of the GNU General Public License as published  *
 
12
 *  by the Free Software Foundation; version 2 of the license.         *
 
13
 *                                                                     *
 
14
 *  This program is distributed in the hope that it will be useful,    *
 
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of     *
 
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               *
 
17
 *  See the GNU General Public License for more details.               *
 
18
 *                                                                     *
 
19
 *  You should have received a copy of the GNU General Pulic License   *
 
20
 *  along with this program; if not, you can get it from:              *
 
21
 *  http://www.gnu.org/copyleft/gpl.html                               *
 
22
 ***********************************************************************/
 
23
 
 
24
#ifndef __TCPREEN_SYSLOG_H
 
25
 
 
26
# define __TCPREEN_SYSLOG_H
 
27
 
 
28
# if HAVE_SYSLOG_H
 
29
#  include <syslog.h>
 
30
# endif
 
31
 
 
32
# if !HAVE_SYSLOG
 
33
#  ifdef __cplusplus
 
34
extern "C" {
 
35
#  endif
 
36
 
 
37
void openlog (const char *ident, int option, int facility);
 
38
void syslog (int priority, const char *fmt, ...);
 
39
void closelog (void);
 
40
 
 
41
#  define LOG_CONS      0x02
 
42
#  define LOG_NDELAY    0x08
 
43
#  define LOG_NOWAIT    0x10
 
44
#  define LOG_ODELAY    0x04
 
45
#  define LOG_PERROR    0x20
 
46
#  define LOG_PID       0x01
 
47
 
 
48
#  define LOG_AUTH      0040
 
49
#  define LOG_AUTHPRIV  0120
 
50
#  define LOG_CRON      0110
 
51
#  define LOG_DAEMON    0030
 
52
#  define LOG_FTP       0130
 
53
#  define LOG_LOCAL0    0200
 
54
#  define LOG_LOCAL1    0210
 
55
#  define LOG_LOCAL2    0220
 
56
#  define LOG_LOCAL3    0230
 
57
#  define LOG_LOCAL4    0240
 
58
#  define LOG_LOCAL5    0250
 
59
#  define LOG_LOCAL6    0260
 
60
#  define LOG_LOCAL7    0270
 
61
#  define LOG_LPR       0060
 
62
#  define LOG_MAIL      0020
 
63
#  define LOG_NEWS      0070
 
64
#  define LOG_SYSLOG    0050
 
65
#  define LOG_USER      0010
 
66
#  define LOG_UUCP      0100
 
67
 
 
68
#  define LOG_EMERG     0
 
69
#  define LOG_ALERT     1
 
70
#  define LOG_CRIT      2
 
71
#  define LOG_ERR       3
 
72
#  define LOG_WARNING   4
 
73
#  define LOG_NOTICE    5
 
74
#  define LOG_INFO      6
 
75
#  define LOG_DEBUG     7
 
76
 
 
77
#  ifdef __cplusplus
 
78
}
 
79
#  endif
 
80
# endif /* not HAVE_SYSLOG */
 
81
#endif /* not defined __TCPREEN_SYSLOG_H */
 
82