hello Jim

Jim Reimer wrote:
How can I set up to monitor what's coming and going on my gateway?
Network is all hubs, no switches, and all I need to do is count
bytes going to and coming from 192.168.0.1 - don't care where it
came from or where it's going, I just need to count it.

there is lot of ways to do that...
the most simplest (for me) is writing a basic sniffer... or use an existing... like tcpdump... to look the ip adresses (sender an receiver)
and depending the result... incremant a value...
if you want some skeleton code examples... send me a mail
an other way is by using the iptables... the netfilter...
you can insert a kernel module into the network stack and use an entry point in the netfilter... ("Hacking the Linux Kernel Network Stack" explain how to do that)...
may be there is some existing iptables user-space fonctionality to perform that...
using the iptables-netfilter ask you for your application portability...
an other idea is writing a kernel module who intercept the socket () system call...
in hope you find something useful...


simon


- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to