From: "=?ISO-8859-1?Q?Jos=E9=20Queiroz?=" Subject: About LOG facilities Date: Mon, 01 Sep 2003 11:07:12 -0300 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_E5BB84B9.B9D846BD" Return-path: To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org --=_E5BB84B9.B9D846BD Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Hi, I m working with iptables (1.2.4) and I'm interested on setting a log facility along with loglevel, said, auth.alert instead of simply 'alert'. I know that iptables is coded so "log levels" are tied to levels 0-7, and that there is no possibility to set the facility (hardcoded to "Kernel"). So I came to suggest you to add this facility (and those "facilities") to iptables front-end. Also, looking at the soruce code, I saw that you had coded the log-level strings within your sources. But the header file have these log-level strings also, so these can be used as: typedef struct _code { char *c_name; int c_val; } CODE; CODE prioritynames[], facilitynames[]; both these tables have a "{ NULL, -1}" as its last entry. Speaking of limiting possible choices on facility/priority numerical codes, there's also some constants, as LOG_PRIMASK and LOG_FACMASK, which can be combined to form a "LOG_LEVELMASK" and/or a "LOG_MAXLEVEL". Relevant system versions: Kernel 2.4.19, Sysklogd 1.4.1, Distribution: Conectiva Linux 8+ Thanks in advance. ---------------------------------------------------------------- José D. Queiroz - Analista de Informática MPF/PR/RJ/CDIJ/DDI/Gerência de Rede jqueiroz@prrj.mpf.gov.br jdqueiroz@ibest.com.br ---------------------------------------------------------------- --=_E5BB84B9.B9D846BD Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit
Hi,
 
I´m working with iptables (1.2.4) and I'm interested on setting a log facility along with loglevel, said, auth.alert instead of simply 'alert'.
 
I know that iptables is coded so "log levels" are tied to levels 0-7, and that there is no possibility to set the facility (hardcoded to "Kernel").
 
So I came to suggest you to add this facility (and those "facilities") to iptables front-end.
 
Also, looking at the soruce code, I saw that you had coded the log-level strings within your sources. But the header file <sys/syslog.h> have these log-level strings also, so these can be used as:
 
typedef struct _code {
        char    *c_name;
        int     c_val;
} CODE;
CODE prioritynames[], facilitynames[];
 
both these tables have a "{ NULL, -1}" as its last entry.
 
Speaking of limiting possible choices on facility/priority numerical codes, there's also some constants, as LOG_PRIMASK and  LOG_FACMASK, which can be combined to form a "LOG_LEVELMASK" and/or a "LOG_MAXLEVEL".
 
Relevant system versions: Kernel 2.4.19, Sysklogd 1.4.1, Distribution: Conectiva Linux 8+
 
Thanks in advance.
 
----------------------------------------------------------------
José D. Queiroz - Analista de Informática
MPF/PR/RJ/CDIJ/DDI/Gerência de Rede
jqueiroz@prrj.mpf.gov.br
jdqueiroz@ibest.com.br
----------------------------------------------------------------
--=_E5BB84B9.B9D846BD--