From: simon <simon.guinot@laposte.net>
To: linux-newbie <linux-newbie@vger.kernel.org>
Subject: Re: Need a network traffic monitor
Date: Sun, 28 Nov 2004 15:04:52 +0100 [thread overview]
Message-ID: <41A9DB04.8070004@laposte.net> (raw)
In-Reply-To: <10444189897.20041127192716@wa5rrh.org>
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
prev parent reply other threads:[~2004-11-28 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-28 1:27 Need a network traffic monitor Jim Reimer
2004-11-28 3:00 ` Ray Olszewski
2004-11-28 14:04 ` simon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41A9DB04.8070004@laposte.net \
--to=simon.guinot@laposte.net \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox