Since I am writing the driver (e.g. not fully running yet) at the moment, it will be nice if I can have a look at the recevied data.
From the skb->data, i got only the data without the network wrappers.
Can you tell me how to get the same raw data as captured by ethereal?
Thanks,
David,
Russell King - ARM Linux wrote:
On Mon, Jan 13, 2003 at 10:28:08AM +0000, D Qi wrote:Another thing, I wanted to dump the received sk_buff raw data using the following sequence but get kernel panic. The question is, is it safe to free the new_skb in the following manner.
new_skb=skb_copy(old_skb, GFP_ATOMIC);
....
kfree_skb(new_skb);
Or if there are other prefered way to get the raw data(including ethernet header) from a sk_buff?
You could just use the standard mechanisms to analyse packets. For an embedded machine: - use tcpdump or tethereal to log packets to a file - copy file to an x86 workstation (eg, via zmodem over serial) - use ethereal on an x86 workstation to read the file and get a full breakdown of each packet, along with full checksum verification I'd recommend this approach any day over dumping the packets byte wise via printk.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/