From cba4c88776a4d98d197c14ec9014f7abc973255e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 25 Jul 2007 11:35:04 +0000 Subject: moved code to output module --- omfwd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'omfwd.c') diff --git a/omfwd.c b/omfwd.c index 0b1db927..94303288 100644 --- a/omfwd.c +++ b/omfwd.c @@ -104,6 +104,20 @@ CODESTARTdbgPrintInstInfo printf("%s", f->f_un.f_forw.f_hname); ENDdbgPrintInstInfo +/* get the syslog forward port from selector_t. The passed in + * struct must be one that is setup for forwarding. + * rgerhards, 2007-06-28 + * We may change the implementation to try to lookup the port + * if it is unspecified. So far, we use the IANA default auf 514. + */ +static char *getFwdSyslogPt(selector_t *f) +{ + assert(f != NULL); + if(f->f_un.f_forw.port == NULL) + return("514"); + else + return(f->f_un.f_forw.port); +} BEGINdoAction char *psz; /* temporary buffering */ -- cgit