- ÂÛ̳»ÕÕÂ:
- 0
|
ÎÒÊÇÔÚhard->start->xmit֮ǰ²åÈëÒ»¸öº¯Êý£¬²éѯskb->mac_headerÖ¸ÕëµÄÖµ£¬·¢ÏÖËüһֱΪ0£¬ÕâÊÇΪʲôÄØ£¿
static int our_xmit(struct sk_buff *skb,
struct net_device *dev)
{
printk("hello ,wait a while to send~~~~~~~~~~~\n");
unsigned char *a;
printk("head=%x,head_mac=%x, head_ip=%x,tail=%x\n",skb->head, skb_mac_header(skb), skb_network_header(skb), skb->tail);
for(a=skb->head; a<skb->tail; a++)
{
printk("%02X ",*a);
}
p(skb, dev);
}
int init_module(void)
{
printk("Im in the module *******************************");
dev=dev_get_by_name("eth0");
struct sk_buff *skb;
skb=dev->gso_skb;
p=dev->hard_start_xmit;
dev->hard_start_xmit=&our_xmit;
return 0;
}
ÔËÐнá¹ûÈçÏ£º head=c8b1ba00,head_mac=0, head_ip=c8b1ba10,tail=c8b1ba64
ÆäËû¶¼ÓÐÖµ£¬¾ÍmacµÄÖ¸ÕëһֱΪ0
ÇóÖú£¡£¡£¡£¡ |
|