I am writing a linux kernel module that works with some custom
hardware. The custom hardware receives IP like datagrams. The kernel
module I am writing effectively receives the datagrams and wraps them
in skb, much like a normal ethernet driver. I have to totally rebuild
the header when I receive the packet and I am passing it to the stack
using netif_rx. I can see the packets fine using tcpdump with the
device but I am not sure what is happening to the packets pass that. I
am trying to forward them to another network device to go out another
subnet on my eval board using ip_forwarding. TCPDUMP indicates that
everything looks fine by capturing the output file and looking at it in
ethereal but the packet never gets to the fowarded ethernet device nor
have I been able to open a raw socket and receive the any packets from
the device. The packets are probably being discarded (I assume) in the
IP layer in the stack but how do I tell this? Are there any additional
tools that I can short of printk's in the ip layer code that I can use
to see what is happening to the packets?
Perhaps I am not getting the packets prepared right before passing them
using netif_rx(skb)? I am not sure what I would be missing though.
Since I have to basically rebuild the header before passing the packet
up including the checksums, are there any tips in terms of setting data
fields in the skb structure I may be missing?
|