Ãâ·Ñ×¢²á ²é¿´ÐÂÌû |

Chinaunix

  ƽ̨ ÂÛ̳ ²©¿Í ÎÄ¿â
×î½ü·ÃÎÊ°å¿é ·¢ÐÂÌû
²é¿´: 6683 | »Ø¸´: 6
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

skb->mac_headerΪʲôһֱΪ0£¿Ïò¸ßÊÖÇó¾È [¸´ÖÆÁ´½Ó]

ÂÛ̳»ÕÕÂ:
0
Ìøתµ½Ö¸¶¨Â¥²ã
1Â¥ [ÊÕ²Ø(0)] [±¨¸æ]
·¢±íÓÚ 2011-01-10 17:14 |Ö»¿´¸Ã×÷Õß |µ¹Ðòä¯ÀÀ
ÎÒÊÇÔÚ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



ÇóÖú£¡£¡£¡£¡

ÂÛ̳»ÕÕÂ:
0
2Â¥ [±¨¸æ]
·¢±íÓÚ 2011-01-12 16:05 |Ö»¿´¸Ã×÷Õß
¸÷λ°ï°ïæ°¡£¬ÊµÔÚ²»ÖªµÀÄÄÀï³öÎÊÌâÁË

ÂÛ̳»ÕÕÂ:
36
ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-10 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-16 06:20:0015-16Èü¼¾CBAÁªÈüÖ®¹ã¶«
ÈÕÆÚ:2016-04-16 19:59:32ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-18 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-19 06:20:00ÿÈÕÂÛ̳·¢ÌùÖ®ÐÇ
ÈÕÆÚ:2016-04-19 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-25 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-06 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-08 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-13 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-28 06:20:00ÿÈÕÂÛ̳·¢ÌùÖ®ÐÇ
ÈÕÆÚ:2016-05-28 06:20:00
3Â¥ [±¨¸æ]
·¢±íÓÚ 2011-01-14 11:31 |Ö»¿´¸Ã×÷Õß
°Ñ skb->data Ö¸Õë´ò³öÀ´¿´¿´

ÂÛ̳»ÕÕÂ:
0
4Â¥ [±¨¸æ]
·¢±íÓÚ 2011-01-17 15:12 |Ö»¿´¸Ã×÷Õß
´òÓ¡ÁËdataÖ¸Õ룺   head=c058ce00,data=c058ce02,head_mac=0, head_ip=c058ce10,tail=c058ce64

skb->data ºÍ skb->mac¾ÓÈ»²»Ò»Ñù

ÂÛ̳»ÕÕÂ:
0
5Â¥ [±¨¸æ]
·¢±íÓÚ 2011-01-27 20:43 |Ö»¿´¸Ã×÷Õß
ÊDz»ÊǶ¨ÒåÁËNET_SKBUFF_DATA_USES_OFFSET£¿
¶¨ÒåÁËNET_SKBUFF_DATA_USES_OFFSETÖ®ºómac¾ÍÊǸöunsigned int

ÂÛ̳»ÕÕÂ:
36
ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-10 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-16 06:20:0015-16Èü¼¾CBAÁªÈüÖ®¹ã¶«
ÈÕÆÚ:2016-04-16 19:59:32ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-18 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-19 06:20:00ÿÈÕÂÛ̳·¢ÌùÖ®ÐÇ
ÈÕÆÚ:2016-04-19 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-25 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-06 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-08 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-13 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-28 06:20:00ÿÈÕÂÛ̳·¢ÌùÖ®ÐÇ
ÈÕÆÚ:2016-05-28 06:20:00
6Â¥ [±¨¸æ]
·¢±íÓÚ 2011-01-29 00:10 |Ö»¿´¸Ã×÷Õß
àÅ£¬ÄãÊÇ 32λϵͳ»¹ÊÇ 64 λ

ÂÛ̳»ÕÕÂ:
36
ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-10 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-16 06:20:0015-16Èü¼¾CBAÁªÈüÖ®¹ã¶«
ÈÕÆÚ:2016-04-16 19:59:32ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-18 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-19 06:20:00ÿÈÕÂÛ̳·¢ÌùÖ®ÐÇ
ÈÕÆÚ:2016-04-19 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-04-25 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-06 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-08 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-13 06:20:00ITÔËά°æ¿éÿÈÕ·¢ÌûÖ®ÐÇ
ÈÕÆÚ:2016-05-28 06:20:00ÿÈÕÂÛ̳·¢ÌùÖ®ÐÇ
ÈÕÆÚ:2016-05-28 06:20:00
7Â¥ [±¨¸æ]
·¢±íÓÚ 2011-01-29 00:11 |Ö»¿´¸Ã×÷Õß
´òÓ¡ÁËdataÖ¸Õ룺   head=c058ce00,data=c058ce02,head_mac=0, head_ip=c058ce10,tail=c058ce64

skb->data ºÍ skb->mac¾ÓÈ»²»Ò»Ñù

Èç¹û²»Ò»ÑùµÄ»°£¬¸Ð¾õÓ¦¸Ã»¹Ã»Óе÷Óà skb_push °Ñdata Ö¸Ïò MAC Í·²¿°É¡£
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | ×¢²á

±¾°æ»ý·Ö¹æÔò ·¢±í»Ø¸´

  

±±¾©Ê¢ÍØÓÅѶÐÅÏ¢¼¼ÊõÓÐÏÞ¹«Ë¾. °æȨËùÓÐ ¾©ICP±¸16024965ºÅ-6 ±±¾©Êй«°²¾Öº£µí·Ö¾ÖÍø¼àÖÐÐı¸°¸±àºÅ£º11010802020122 niuxiaotong@pcpop.com 17352615567
δ³ÉÄê¾Ù±¨×¨Çø
Öйú»¥ÁªÍøЭ»á»áÔ±  ÁªÏµÎÒÃÇ£ºhuangweiwei@itpub.net
¸ÐлËùÓйØÐĺÍÖ§³Ö¹ýChinaUnixµÄÅóÓÑÃÇ ×ªÔر¾Õ¾ÄÚÈÝÇë×¢Ã÷Ô­×÷ÕßÃû¼°³ö´¦

Çå³ý Cookies - ChinaUnix - Archiver - WAP - TOP