Filter function on DDK level

Posted on 2003-03-29
Medium Priority
Last Modified: 2012-05-04

I want to write a program that monitors which processes are using the internet (much like ZoneAlarm) and preferably how much bandwidth they are using. Ive been researching different ways to do this, and for a long time i thought i could do it with a hook procedure which turned out to be unfitted. I got an expert advice saying that it could only be possible by writing some kind of "filter function on a DDK level". I searched about MSDN library for some good information to get me started, without luck. I consider myself to be a fairly experienced programmer in certain fields, however i fear that this task may be a bit too advanced for me. Is this the only way to write the program? What is the scope and difficulty of doing it this way? Where can I get started/Are there any sample code i can download that will help me?

Thanks in advance,
Sigurd Teigen
Question by:superflie99
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

bkrahmer earned 150 total points
ID: 8231649
IMO, solving this problem will be very difficult.  I believe what you'll end up with is two drivers.  You'll need something like a miniport driver (the DDK 'filter' sample is a simple miniport driver, IIRC) to monitor the packets coming to and fro the system.  I believe at that level, you'll only have port information, so you'll need another driver to monitor the port creation so you can track what which processes own each network endpoint.  The only way that I know of to do this is to use the same method that sysinternal's tdimon does.  The problem is, they don't publish source, and I believe they use some undocumented method to do what they do.  

Again, solving the first problem is well defined, and not terribly difficult.  I'm not sure of the proper way to solve the second problem.


Expert Comment

ID: 8236977
why not only simply the win socket dll?

Expert Comment

ID: 8243016
BeyondWu, I challenge you to show us this very elegant solution, if it is so easy.  :)


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question