Tue, 10 Jul 2001 11:56:46 +0200
On Mon, Jul 09, 2001 at 08:01:35PM -0400, Brad Chapman wrote:
~ Mr. Vallimar,
~ This would be a nice feature, but unfortunately, it wouldn't be possible
~ with the vanilla IPv4/IPv6 LOG target, which uses kernel printk()'s.
on printk you can set kernel log level but this cannot be use for various
kind of logging, because any macro KERN_* is referred to certain situation.
but whit a simple kernel hack netfilter module can call sys_syslog, the
system call used by userspace function syslog(3).
the log priority is simple put by the first 3/4 byte of buffer, eg:
<1> Jul 10 10:51:55 claudio last message repeated 11 times
<12> blablabla ...
and the selection on /etc/syslog.conf is related to the number contain between
"<" and ">"
the problem can be that syslog has not symbol exporteb, but for call from
your kernel module you can simple read kernel address form System.map file
and assig it to a function pointer with some declaration of original
sys_syslog (~linux/kernel/printk.c) (call directly do_syslogd is better)
(System.map must be up to date at running kernel and is simple read kernel
address from netfilter module on initalization phase or with other way ..)