Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This question already has an answer here:

I'm a Unix programmer and I need to write a (hopefully simple) program for Windows that does the following:

(1) Installs from a USB drive (2) Somehow integrates with the OS at a low-level in such a way that it can filter/shape all network traffic in/out of the machine (a la IPSec)

I can write in C, asm, Python, Java, but I have no idea about Windows' methods for doing this sort of thing, nor where to start learning. (I could easily do the above with Linux using a kernel module.)

share|improve this question

marked as duplicate by gnat, Jalayn, MichaelT, Martijn Pieters, GlenH7 Apr 11 '13 at 21:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Far from simple as a rule, have a look at the Wireshark codebase. –  Orbling Mar 23 '11 at 0:55
    
Your best bet of achieving this would be C++/CLI or C# –  Mahmoud Hossam Mar 23 '11 at 0:55
    
@Orbling: Thanks for the pointer, but my understanding is that Wireshark is based on WinPCap which is a sniffer, not a filter (ie, it cannot shape traffic, only collect statistics and log traffic). I will edit my question to make it clearer what my needs are. –  Fixee Mar 23 '11 at 1:04
1  
In which case, I would suggest having a look at the PeerBlock code. –  Orbling Mar 23 '11 at 1:08

1 Answer 1

up vote 3 down vote accepted

You going to need to come up to speed on how to write an NDIS filter driver. Kernel-mode work is usually performed using the Microsoft C compiler and the remote kernel debugger WinDbg.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.