About LOG facilities
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
[email protected]
[email protected]
----------------------------------------------------------------