Hi, Why not create a netfilter hook to log the information you want? If you create one for LOCAL_OUT, I am sure you can easily get the information you want. Just remember to +header length for the ethernet packet to get the size of the whole packet. Hmm...... will probably affect throughput, just keep your codes as few as possible and don't process all packets. What PCI card? You mean a network card? You can refer to Linux Device Drivers 2 or the codes for the other drivers in the kernel source. You need to have intimate knowledge of the hardware though. regards, jonathan Jeremy Andrus wrote: >Hi, > >I'm working on an NSF grant this summer to develop a Beowulf Cluster >Monitoring system. We're trying to monitor both idle CPU time and >Network access. One thing we're stuck on right now is an appropriate >place to put our code into the kernel so that we can monitor some of >the network access. We'd really like to know source and destination IP >for each packet, as well as protocol and size of each packet. We tried >to put our code in net/core/dev.c, but we realized those modifications >cut down the network throughput. > >Another thing we're looking for is how to transfer data across the PCI >card. We are designing a PCI card to send this data over a network >that we design to a monitoring computer to then display the data. Do >we just write to the memory allocated to each device to send data >across the PCI bus? How do we know when the data we have written there >is actually sent? > >Thanks! Any help would be appreciated. We are working at an >undergraduate institution and the only people working on this are 2 >electrical engineers with minimal kernel knowledge and little C >knowledge as well. > >Jeremy & Jeremy > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/