summaryrefslogtreecommitdiffstats
path: root/syslogd.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-22 10:15:39 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-22 10:15:39 +0000
commite38d58bc743fe0c80789c5954488fdd54680f72a (patch)
tree32f34390ab9fae68e08d68c30d4a92d71f5c9b91 /syslogd.h
parent38c0cf2b0115202b67156d6938698f5d911c5def (diff)
downloadrsyslog-e38d58bc743fe0c80789c5954488fdd54680f72a.tar.gz
rsyslog-e38d58bc743fe0c80789c5954488fdd54680f72a.tar.xz
rsyslog-e38d58bc743fe0c80789c5954488fdd54680f72a.zip
moved some more modules to their own file sets
Diffstat (limited to 'syslogd.h')
-rw-r--r--syslogd.h52
1 files changed, 51 insertions, 1 deletions
diff --git a/syslogd.h b/syslogd.h
index 55ed1547..38127c5f 100644
--- a/syslogd.h
+++ b/syslogd.h
@@ -22,6 +22,40 @@
#include "syslogd-types.h"
+#ifdef USE_NETZIP
+#include <zlib.h>
+/* 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
+
+#define MAXLINE 2048 /* maximum line length */
+
+#ifdef SYSLOG_INET
+#define INET_SUSPEND_TIME 60 /* equal to 1 minute
+ * rgerhards, 2005-07-26: This was 3 minutes. As the
+ * same timer is used for tcp based syslog, we have
+ * reduced it. However, it might actually be worth
+ * thinking about a buffered tcp sender, which would be
+ * a much better alternative. When that happens, this
+ * time here can be re-adjusted to 3 minutes (or,
+ * even better, made configurable).
+ */
+#define INET_RETRY_MAX 30 /* maximum of retries for gethostbyname() */
+ /* was 10, changed to 30 because we reduced INET_SUSPEND_TIME by one third. So
+ * this "fixes" some of implications of it (see comment on INET_SUSPEND_TIME).
+ * rgerhards, 2005-07-26
+ */
+#endif
#if defined(__GLIBC__)
#define dprintf mydprintf
#endif /* __GLIBC__ */
@@ -31,6 +65,10 @@ void logerror(char *type);
void logerrorSz(char *type, char *errMsg);
void logerrorInt(char *type, int iErr);
+void printchopped(char *hname, char *msg, int len, int fd, int iSourceType);
+void freeAllSockets(int **socks);
+int isAllowedSender(struct AllowedSenders *pAllowRoot, struct sockaddr *pFrom, const char *pszFromHost);
+char *getFwdSyslogPt(selector_t *f);
void getCurrTime(struct syslogTime *t);
int formatTimestampToMySQL(struct syslogTime *ts, char* pDst, size_t iLenDst);
int formatTimestamp3339(struct syslogTime *ts, char* pBuf, size_t iLenBuf);
@@ -41,6 +79,18 @@ char *iovAsString(selector_t *f);
extern int glblHadMemShortage; /* indicates if we had memory shortage some time during the run */
extern syslogCODE rs_prioritynames[];
extern syslogCODE rs_facilitynames[];
+extern char LocalHostName[];
+extern int family;
+extern int NoHops;
+extern int *finet;
+extern int send_to_all;
+extern int option_DisallowWarning;
+extern int Debug;
+extern char**LocalHosts;
+extern int DisableDNS;
+extern char **StripDomains;
+extern char *LocalDomain;
+extern int bDropMalPTRMsgs;
+extern struct AllowedSenders *pAllowedSenders_TCP;
-#include "rsyslog.h"
#endif /* #ifndef SYSLOGD_H_INCLUDED */