sk_buff extraction problem

From: will fitzgerald (william.fitzgerald6@beer.com)
Date: Mon May 20 2002 - 10:16:55 EST


hi all,

i'm having trouble extracting a packets source and destination
address from the sk_buff. i want to be able to see if a packet does
in fact pass through my router.

for no particular reason i choose dev.c and a function called
netif_rx to do this.

at the beginning of netif_rx() i added the lines:
int this_cpu = smp_processor_id();
........
        char *p;
        int i;
        
                 // p= (char *) (skb->mac.ethernet);
                    p= (char *) (skb->h.uh);

then just before return softnet_data[this_cpu].cng_level;
i added this:

for( i=0; i<8;i++){
            printk(KERN_DEBUG"netif_rx() ->ethernet: %02x ",*(p+i));
            }

it complies but as soon as i pass a packet through it the router
freezes up.

am i even on the rigth track?

regards will.

Beer Mail, brought to you by your friends at beer.com.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 23 2002 - 22:00:19 EST