Re: Bandwidth Monitor
- From: "Dave Lowther" <davel@xxxxxxxxx>
- Date: Thu, 19 May 2005 07:09:17 +0100
"Roulette" <Roulette@xxxxxxxxxxxx> wrote
> I want to write a bandwidth monitor that will tally up how much data
is
> sent and received from the machine on which it is run. (I need to add
some
> additional custom functionality, so I'm not looking for any existing
> applications like AnalogX's free monitor, etc..)
>
> Can anyone suggest how I would go about doing this? Would you
intercept
> the appropriate Windows functions, tally up the amount of data being sent
> and received, and then call the original functions? If so, how would you
go
> about intercepting such functions? Which functions would be necessary -
> just the Winsock send() and recv() functions (assuming we're just talking
> about Winsock-based networking), or are there additional functions I'd
have
> to worry about?
>
> Or is there an easier way to do this?
Yes, assuming you just want to monitor and not modify anything.
Use WinPcap http://www.winpcap.org/install/default.htm
Essentially it eavesdrops on the network link and captures all the Ethernet
packets.
You can then process the packets to count how many bytes are being sent /
received.
If for example you wanted to see how much *Internet* bandwidth it was using,
then you can just process packets where Src or Dest IP is not on local LAN.
Dave.
.
- Follow-Ups:
- Re: Bandwidth Monitor
- From: Roulette
- Re: Bandwidth Monitor
- References:
- Bandwidth Monitor
- From: Roulette
- Bandwidth Monitor
- Prev by Date: Re: Re-use an address/port when binding a socket used for Sending data
- Next by Date: Re: What does "Home Networking Wizard" actually do?
- Previous by thread: RE: Bandwidth Monitor
- Next by thread: Re: Bandwidth Monitor
- Index(es):
Relevant Pages
|