1
我在/ net/core的dev.c中編輯函數netif_rx,只是爲了在數據包到達時創建printk。重新編輯netif_Rx函數並啓動相應的模塊
I called "make" at the kernel's root directory but i don't know witch module was compiled. I need to update the old-module ir order to turn on the changes that i made.
If i want to see my changes i need to:
1-make at the kernel's root directory;
2- make modules;
3-make bzImage;
4- insert the new bzImage on the grub file;
5-Reboot;
I want to to access directly to the modulean update withou do all that things.
你能幫助我嗎?
最好的問候, 裏卡多·裏貝羅
你不能,dev.c被內置到主內核映像中。如果對其進行更改,則必須重新編譯整個內核。 你試圖完成什麼? – ldx 2012-03-17 11:58:32
我想捕獲通過該函數的數據包。我插入一個printk來通知每次數據包到達。我重新編譯了內核並重新啓動。這些變化是成功的。我發送數據包以太網到接口並且不會發生打印,但是如果我使用wireshark進行監控,則數據包會成功到達。可能是什麼問題呢? – Ricardo 2012-03-19 14:43:45
我在網上搜索信息,我發現這個:netif_rx仍然在文件dev.c中,但是用處不大。現在用來接收數據包的函數是netif_receive_skb。你可以向我確認嗎?我還沒有找到原因。非常感謝 – Ricardo 2012-03-19 17:18:02