Click here to Skip to main content
Click here to Skip to main content


, 15 Nov 2002 CPOL
Rate this:
Please Sign up or sign in to vote.
A tool to measure network traffic by service (FTP, mail, news, web, UDP etc)

Sample Image


TrafficWatch is a small utility to get information about the amount of data transferred to and from the internet. It uses the WinPcap library from Network traffic inside a LAN is ignored - only IP packets going through the standard gateway are measured. Traffic is also measured by service: FTP, mail, news, web, UDP and others. So you can see for what you need your internet connection.


Flat rates are getting more common these days. ISPs often offer them only up to a specified amount of traffic - additional transferred data must be paid extra. So I wanted to know exactly how much traffic I use/need to decide which ISP and which offer I wanted. And of course I'm curious Smile | :)

Sample Image


To gather only the internet traffic and ignore traffic inside LAN I needed a way to analyse every IP data packet entering or leaving the network interface. The WinPcap library is used to catch all these packets. Then the program analyses the captured packets by source and destination IP and port. With these data the program builds the statistics.

Other tools

There are other tools in this utility: Ping, Traceroute, Connection Information and Whois. The Whois-utility uses a text file to determine which server to ask for specific TLD's. The one offered with this utility is far from complete. If someone wants to complete it, please send me a copy!


An installer is provided. If you don't have WinPcap already installed, you must either download it from or let the installer install it for you. After installation you should maybe restart your computer to proper initialize the WinPcap drivers - otherwise the program may crash.


For this tool I used many classes and tips from this website. Some of them are unchanged, some of them I changed a little or more. This tool is also kind of a try out project for me - whenever I want to try out some API's or functions I add them to this tool. An example of that you can see in the "About" pane. So please don't blame me if some things are not perfectly coded.


16.11.02 fixed several bugs where the prog crashed on startup (I hope Smile | :) . Also the statistics page now shows a red line in the bars to separate up from downloads.

22.6.02 corrected a bug where the statistics weren't correctly cleaned up. Fixed a bug where the program crashed when more than 10 adapters were found. Also fixed missing files in source.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
Switzerland Switzerland

Comments and Discussions

Generala version that works on Vista PinmemberSteveKing23-Apr-09 20:40 
QuestionRe: a version that works on Vista PinmemberDavid Reis3-May-09 8:18 
GeneralMy vote of 2 PinmemberElmue16-Jan-09 5:46 
GeneralDoes not function PinmemberElmue27-Mar-08 23:35 
AnswerRe: Does not function [modified] Pinmembero-lox15-Jan-09 6:08 
QuestionDoes this work on Windows Vista? PinmemberDallas at Ekky25-Aug-07 19:04 
GeneralNot working on x64 systems Pinmembermanfbraun8-Apr-07 13:18 
QuestionHow to Compile in VC++ 6 ! PinmemberInyong Jeong26-Apr-06 21:56 
AnswerRe: How to Compile in VC++ 6 ! Pinmemberddas7730-Aug-07 4:34 
Generalworks with VC2002 and WinPCap 3.1 Pinmembereurocent19-Apr-06 2:50 
Generalsend the example website Pinmembertssureshkumarin22-Oct-05 20:44 
GeneralMemLeak Pinmemberdchris_med22-Oct-05 16:02 
GeneralProblems with wpcap PinmemberVasil Nikolov11-Aug-05 4:47 
GeneralCannot run TrafficWatcher PinmemberDavidNoon16-May-05 6:24 
QuestionWhy winpcap? PinmemberMsftone1-May-04 12:44 
Generalerror compiling under vc7(vs .net 2003) Pinmembersmn30-Jan-04 3:28 
GeneralError downloading the source and demo PinmemberMourad DEBBAH10-Jan-04 23:23 
GeneralRe: Error downloading the source and demo PinsitebuilderUwe Keim27-Jan-04 23:08 
Questioncan't compile the resource ?? Pinmembermaginn8-Jan-04 0:26 
GeneralDoes not work under Win-ME PinmemberStefan5-Jan-04 11:40 
GeneralIncoherent ramble PinmemberColin Angus Mackay5-Jan-04 12:33 
Questionis SDK needed to compile it under VC6? Pinmembersmn2-Dec-03 18:23 
AnswerRe: is SDK needed to compile it under VC6? PinmemberSteveKing3-Dec-03 5:13 
Generali read it before, but Pinmembersmn3-Dec-03 21:34 
GeneralRe: i read it before, but PinmemberSteveKing4-Dec-03 7:19 
GeneralGiving up Pinmemberpc414-Jun-03 1:36 
GeneralWorks if you remove old dlls Pinmemberjhaga3-Apr-03 11:51 
Generalntddndis.h Header File Missing Pinmemberrashvi9-Mar-03 0:23 
GeneralRe: ntddndis.h Header File Missing PinmemberSteveKing9-Mar-03 0:33 
Questionwhere is dsp? Pinmemberyangbit10-Feb-03 22:07 
AnswerRe: where is dsp? PinmemberFlorian Heidenreich11-Feb-03 0:49 
Questioncan we run this program in vc 6 Pinmembersakthibala18-Jan-03 19:29 
AnswerRe: can we run this program in vc 6 PinmemberSteveKing19-Jan-03 5:16 
QuestionAnybody successfully compiled it under VC6? PinmemberKant20-Nov-02 9:24 
AnswerRe: Anybody successfully compiled it under VC6? Pinmembergabmurillo20-Nov-02 14:26 
AnswerRe: Anybody successfully compiled it under VC6? Pinmemberxyf_sky22-Apr-03 21:25 
GeneralRe: Anybody successfully compiled it under VC6? PinmemberT Sandeep12-Mar-05 3:37 
GeneralErrors still happen Pinmemberhsieh19-Nov-02 23:36 
GeneralRe: Errors still happen PinmemberSteveKing20-Nov-02 6:41 
QuestionComplier Errors? PinmemberKant19-Nov-02 12:29 
AnswerRe: Complier Errors? Pinmembergabmurillo19-Nov-02 14:01 
GeneralRe: Complier Errors? PinmemberKant19-Nov-02 16:29 
GeneralRe: Complier Errors? Pinmembergabmurillo19-Nov-02 20:09 
AnswerRe: Complier Errors? Pinmemberjiang jianyu3-Mar-05 2:59 
GeneralDoes this work for anyone Pinmembergabmurillo19-Nov-02 11:13 
GeneralRe: Didn't worked for me on my Laptop PinmemberKant19-Nov-02 11:53 
GeneralRe: Does this work for anyone PinmemberPeter SJöström26-Nov-02 4:10 
GeneralRe: Does this work for anyone PinmemberSteveKing26-Nov-02 6:14 
GeneralRe: Does this work for anyone PinmemberPeter SJöström26-Nov-02 13:47 
GeneralRe: Does this work for anyone PinmemberSteveKing27-Nov-02 9:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 16 Nov 2002
Article Copyright 2002 by SteveKing
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid