Messages in this thread | | | Subject | Re: about syslogd and printk() | From | Andi Kleen <> | Date | 19 Jul 1998 10:32:42 +0200 |
| |
CHANG Lei <chang714@mx.cei.gov.cn> writes:
> Hello,every. (sorry,My last code was not correctly.) > I'm reading the linux kernel code about network. > I want to analyze the packet,so I insert a piece of code into net_bh( ) > to display every packet : > > { > unsigned char *temp; > printk("\n"); > for(temp=skb->data;temp<skb->tail;temp++) /* to print a completely > packet.(frame)*/ > printk("%02x:",*temp); > printk("\n"); > } > > and syslog.conf include: > kern.* /usr/adm/mylog > > when come some packets, EVERY packet could display on the screen. > But there only a part of packers could be recorded into /usr/adm/mylog, > not EVERY packet recorded into the file, why?
Because you didn't prefix the line with KERN_INFO/KERN_DEBUG etc.
But why do you want this? Networking already has packet sockets, which are able to intercept every packet just fine.
-Andi
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |