[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printk



On Sun, Dec 08, 2002 at 10:21:55PM -0800, PIYUSH SINGAL wrote:
> I want to dump a packet in a file from the kernel
> itself. Now, I think this will not work, as kernel is
> not a process and every file is related to file
> descriptor. Therefore, I am thinking of using printk. 

I think the more flexible way may be to use netlink to
send packets to a netlink listener (similar to the BPF
facility provided by other systems); check out libpcap
for specifics.

> The thing is I want to increase the debug level of
> printk ( to 8), so that my daemon will write the
> buffer in my specified temp file.

printk("<8>" .....);

But note that syslogd is lossy. I don't recommend it.

Hope this helps. :)

-- 
http://immunix.org/

PGP signature