From d071de578454754c4701285b3569e55c5cef1ee4 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 16 Apr 2008 15:45:13 +0200 Subject: removed no longer needed things ... and some more cleanup. Also moved a file that I forgot (thanks to Michael Biebl for pointing that out). --- dirty.h | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'dirty.h') diff --git a/dirty.h b/dirty.h index 5783daf8..f0664639 100644 --- a/dirty.h +++ b/dirty.h @@ -29,33 +29,14 @@ #define MAXLINE 2048 /* maximum line length */ -#define MSG_PARSE_HOSTNAME 1 -#define MSG_DONT_PARSE_HOSTNAME 0 - /* Flags to logmsg(). */ #define NOFLAG 0x000 /* no flag is set (to be used when a flag must be specified and none is required) */ #define INTERNAL_MSG 0x001 /* msg generated by logmsgInternal() --> special handling */ -#define SYNC_FILE 0x002 /* do fsync on file after printing */ +/* NO LONGER USED: #define SYNC_FILE 0x002 / * do fsync on file after printing */ #define ADDDATE 0x004 /* add a date to the message */ #define MARK 0x008 /* this message is a mark */ -#ifdef USE_NETZIP -/* config param: minimum message size to try compression. The smaller - * the message, the less likely is any compression gain. We check for - * gain before we submit the message. But to do so we still need to - * do the (costly) compress() call. The following setting sets a size - * for which no call to compress() is done at all. This may result in - * a few more bytes being transmited but better overall performance. - * Note: I have not yet checked the minimum UDP packet size. It might be - * that we do not save anything by compressing very small messages, because - * UDP might need to pad ;) - * rgerhards, 2006-11-30 - */ -#define MIN_SIZE_FOR_COMPRESS 60 -#endif - -extern int glblHadMemShortage; /* indicates if we had memory shortage some time during the run */ extern int DisableDNS; extern char **StripDomains; extern char *LocalDomain; @@ -65,8 +46,10 @@ extern int family; extern int bDropMalPTRMsgs; extern int option_DisallowWarning; +#define MSG_PARSE_HOSTNAME 1 +#define MSG_DONT_PARSE_HOSTNAME 0 + rsRetVal submitMsg(msg_t *pMsg); -int getSubString(uchar **ppSrc, char *pDst, size_t DstSize, char cSep); rsRetVal logmsgInternal(int pri, char *msg, int flags); rsRetVal parseAndSubmitMessage(char *hname, char *msg, int len, int bParseHost, int flags, flowControl_t flowCtlType); @@ -89,4 +72,19 @@ extern int bReduceRepeatMsgs; #define BACKOFF(f) { if (++(f)->f_repeatcount > MAXREPEAT) \ (f)->f_repeatcount = MAXREPEAT; \ } +#ifdef USE_NETZIP +/* config param: minimum message size to try compression. The smaller + * the message, the less likely is any compression gain. We check for + * gain before we submit the message. But to do so we still need to + * do the (costly) compress() call. The following setting sets a size + * for which no call to compress() is done at all. This may result in + * a few more bytes being transmited but better overall performance. + * Note: I have not yet checked the minimum UDP packet size. It might be + * that we do not save anything by compressing very small messages, because + * UDP might need to pad ;) + * rgerhards, 2006-11-30 + */ +#define MIN_SIZE_FOR_COMPRESS 60 +#endif + #endif /* #ifndef DIRTY_H_INCLUDED */ -- cgit