~ubuntu-branches/ubuntu/karmic/rsyslog/karmic

« back to all changes in this revision

Viewing changes to syslogd-types.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-04-08 00:59:14 UTC
  • mfrom: (1.1.9 upstream) (3.2.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090408005914-gfyay7o45szt05zl
Tags: 3.20.5-1
* New upstream release.
* debian/rsyslog.logcheck.ignore.server
  - Install a logcheck ignore file for rsyslog (using dh_installlogcheck).
    Thanks to Kim Holviala for the patch. Closes: #522164

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* syslogd-type.h
2
 
 * This file contains type defintions used by syslogd and its modules.
3
 
 * It is a required input for any module.
4
 
 *
5
 
 * File begun on 2007-07-13 by RGerhards (extracted from syslogd.c)
6
 
 *
7
 
 * Copyright 2007 Rainer Gerhards and Adiscon GmbH.
8
 
 *
9
 
 * This file is part of rsyslog.
10
 
 *
11
 
 * Rsyslog is free software: you can redistribute it and/or modify
12
 
 * it under the terms of the GNU General Public License as published by
13
 
 * the Free Software Foundation, either version 3 of the License, or
14
 
 * (at your option) any later version.
15
 
 *
16
 
 * Rsyslog 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 Rsyslog.  If not, see <http://www.gnu.org/licenses/>.
23
 
 *
24
 
 * A copy of the GPL can be found in the file "COPYING" in this distribution.
25
 
 */
26
 
#ifndef SYSLOGD_TYPES_INCLUDED
27
 
#define SYSLOGD_TYPES_INCLUDED 1
28
 
 
29
 
#include "stringbuf.h"
30
 
//#include "net.h"
31
 
#include <sys/param.h>
32
 
#if HAVE_SYSLOG_H
33
 
#include <syslog.h>
34
 
#endif
35
 
 
36
 
#define FALSE 0
37
 
#define TRUE 1
38
 
 
39
 
#ifdef UT_NAMESIZE
40
 
# define UNAMESZ        UT_NAMESIZE     /* length of a login name */
41
 
#else
42
 
# define UNAMESZ        8       /* length of a login name */
43
 
#endif
44
 
#define MAXUNAMES       20      /* maximum number of user names */
45
 
#define MAXFNAME        200     /* max file pathname length */
46
 
 
47
 
#define _DB_MAXDBLEN    128     /* maximum number of db */
48
 
#define _DB_MAXUNAMELEN 128     /* maximum number of user name */
49
 
#define _DB_MAXPWDLEN   128     /* maximum number of user's pass */
50
 
#define _DB_DELAYTIMEONERROR    20      /* If an error occur we stop logging until
51
 
                                           a delayed time is over */
52
 
 
53
 
 
54
 
/* we define features of the syslog code. This features can be used
55
 
 * to check if modules are compatible with them - and possible other
56
 
 * applications I do not yet envision. -- rgerhards, 2007-07-24
57
 
 */
58
 
typedef enum _syslogFeature {
59
 
        sFEATURERepeatedMsgReduction = 1
60
 
} syslogFeature;
61
 
 
62
 
/* we define our own facility and severities */
63
 
/* facility and severity codes */
64
 
typedef struct _syslogCode {
65
 
        char    *c_name;
66
 
        int     c_val;
67
 
} syslogCODE;
68
 
 
69
 
/* values for host comparisons specified with host selector blocks
70
 
 * (+host, -host). rgerhards 2005-10-18.
71
 
 */
72
 
enum _EHostnameCmpMode {
73
 
        HN_NO_COMP = 0, /* do not compare hostname */
74
 
        HN_COMP_MATCH = 1, /* hostname must match */
75
 
        HN_COMP_NOMATCH = 2 /* hostname must NOT match */
76
 
};
77
 
typedef enum _EHostnameCmpMode EHostnameCmpMode;
78
 
 
79
 
/* rgerhards 2004-11-11: the following structure represents
80
 
 * a time as it is used in syslog.
81
 
 */
82
 
struct syslogTime {
83
 
        int timeType;   /* 0 - unitinialized , 1 - RFC 3164, 2 - syslog-protocol */
84
 
        int year;
85
 
        int month;
86
 
        int day;
87
 
        int hour; /* 24 hour clock */
88
 
        int minute;
89
 
        int second;
90
 
        int secfrac;    /* fractional seconds (must be 32 bit!) */
91
 
        int secfracPrecision;
92
 
        char OffsetMode;        /* UTC offset + or - */
93
 
        char OffsetHour;        /* UTC offset in hours */
94
 
        int OffsetMinute;       /* UTC offset in minutes */
95
 
        /* full UTC offset minutes = OffsetHours*60 + OffsetMinute. Then use
96
 
         * OffsetMode to know the direction.
97
 
         */
98
 
};
99
 
typedef struct syslogTime syslogTime_t;
100
 
 
101
 
#endif /* #ifndef SYSLOGD_TYPES_INCLUDED */
102
 
/*
103
 
 * vi:set ai:
104
 
 */