1.2.4
by Michael Biebl
Import upstream version 3.20.4 |
1 |
/* This file is an aid to support non-modular object accesses
|
2 |
* while we do not have fully modularized everything. Once this is
|
|
3 |
* done, this file can (and should) be deleted. Presence of it
|
|
4 |
* also somewhat indicates that the runtime library is not really
|
|
5 |
* yet a runtime library, because it depends on some functionality
|
|
6 |
* residing somewhere else.
|
|
7 |
*
|
|
8 |
* Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH.
|
|
9 |
*
|
|
10 |
* This file is part of rsyslog.
|
|
11 |
*
|
|
12 |
* Rsyslog is free software: you can redistribute it and/or modify
|
|
13 |
* it under the terms of the GNU General Public License as published by
|
|
14 |
* the Free Software Foundation, either version 3 of the License, or
|
|
15 |
* (at your option) any later version.
|
|
16 |
*
|
|
17 |
* Rsyslog is distributed in the hope that it will be useful,
|
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20 |
* GNU General Public License for more details.
|
|
21 |
*
|
|
22 |
* You should have received a copy of the GNU General Public License
|
|
23 |
* along with Rsyslog. If not, see <http://www.gnu.org/licenses/>.
|
|
24 |
*
|
|
25 |
* A copy of the GPL can be found in the file "COPYING" in this distribution.
|
|
26 |
*/
|
|
27 |
#ifndef DIRTY_H_INCLUDED
|
|
28 |
#define DIRTY_H_INCLUDED 1
|
|
29 |
||
30 |
rsRetVal submitMsg(msg_t *pMsg); |
|
31 |
rsRetVal logmsgInternal(int iErr, int pri, uchar *msg, int flags); |
|
1.2.7
by Michael Biebl
Import upstream version 4.2.0 |
32 |
rsRetVal parseAndSubmitMessage(uchar *hname, uchar *hnameIP, uchar *msg, int len, int flags, flowControl_t flowCtlTypeu, uchar *pszInputName, struct syslogTime *stTime, time_t ttGenTime); |
33 |
int parseRFCSyslogMsg(msg_t *pMsg, int flags); |
|
34 |
int parseLegacySyslogMsg(msg_t *pMsg, int flags); |
|
1.2.4
by Michael Biebl
Import upstream version 3.20.4 |
35 |
|
36 |
/* TODO: the following 2 need to go in conf obj interface... */
|
|
37 |
rsRetVal cflineParseTemplateName(uchar** pp, omodStringRequest_t *pOMSR, int iEntry, int iTplOpts, uchar *dfltTplName); |
|
38 |
rsRetVal cflineParseFileName(uchar* p, uchar *pFileName, omodStringRequest_t *pOMSR, int iEntry, int iTplOpts, uchar *pszTpl); |
|
39 |
||
40 |
/* Intervals at which we flush out "message repeated" messages,
|
|
41 |
* in seconds after previous message is logged. After each flush,
|
|
42 |
* we move to the next interval until we reach the largest.
|
|
43 |
* TODO: move this to action object! Only action.c and syslogd.c use it.
|
|
44 |
*/
|
|
45 |
extern int bActExecWhenPrevSusp; |
|
46 |
extern int iActExecOnceInterval; |
|
47 |
extern int MarkInterval; |
|
48 |
extern int repeatinterval[2]; |
|
49 |
extern int bReduceRepeatMsgs; |
|
50 |
#define MAXREPEAT ((int)((sizeof(repeatinterval) / sizeof(repeatinterval[0])) - 1))
|
|
51 |
#define REPEATTIME(f) ((f)->f_time + repeatinterval[(f)->f_repeatcount])
|
|
52 |
#define BACKOFF(f) { if (++(f)->f_repeatcount > MAXREPEAT) \
|
|
53 |
(f)->f_repeatcount = MAXREPEAT; \
|
|
54 |
}
|
|
1.2.7
by Michael Biebl
Import upstream version 4.2.0 |
55 |
extern int bDropTrailingLF; |
56 |
extern uchar cCCEscapeChar; |
|
57 |
extern int bEscapeCCOnRcv; |
|
1.2.4
by Michael Biebl
Import upstream version 3.20.4 |
58 |
#ifdef USE_NETZIP
|
59 |
/* config param: minimum message size to try compression. The smaller
|
|
60 |
* the message, the less likely is any compression gain. We check for
|
|
61 |
* gain before we submit the message. But to do so we still need to
|
|
62 |
* do the (costly) compress() call. The following setting sets a size
|
|
63 |
* for which no call to compress() is done at all. This may result in
|
|
64 |
* a few more bytes being transmited but better overall performance.
|
|
65 |
* Note: I have not yet checked the minimum UDP packet size. It might be
|
|
66 |
* that we do not save anything by compressing very small messages, because
|
|
67 |
* UDP might need to pad ;)
|
|
68 |
* rgerhards, 2006-11-30
|
|
69 |
*/
|
|
70 |
#define MIN_SIZE_FOR_COMPRESS 60
|
|
71 |
#endif
|
|
72 |
||
73 |
#endif /* #ifndef DIRTY_H_INCLUDED */ |