Network traffic analysis - Kernel level - please help
Iīm actually carrying an internship and I would like to make some traffic analysis on a Kernel level. My first goal is to build a loadable module to count how many packets go throught eth0 during a short time and to save this packets somewhere (maybe in a created /proc/<my_folder> folder). I read about net_device and net_device stat but I canīt find any .c to see how it works. So Iīve two questions:
Do you think net_device is the good way to do it?
Do you know where I could find any examples?
/* Config */
2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux
Thank you for helping!