2

I have a project to do which is packet monitoring. I want to capture each packet receive by specified network interface.

I want to know what I should start with to do my project .... should I learn socket programming first or what? should I learn how to use winpcap under C# or just do my own function.

please advice me from where I should start!!!

I know there are many code in C# out there in the internet for this but I want to learn it by myself but I do not know from where to star!

1
  • Any packet capturing framework will make you specify the interface that's being sniffed to that's taken care of. Then download wireshark and get a feel for what types of traffic are send across the net and how to filter them to narrow your results. Socket programming is generally for writing point-to-point application-level communications applications. Commented Nov 10, 2010 at 8:19

3 Answers 3

4

You sould definitely learn the basics of socket programming first so you understand a little bit about what's going on. Next, I would look into programming using WinPCap, which is a packet capturing library. It's not built directly for .NET but there are, I believe, .NET wrappers or if nothing else you could call the functions by using COM Interop.

Sign up to request clarification or add additional context in comments.

Comments

4

I agree using WinPcap is probably a good idea. Specifically, look at SharpPcap. it is actively maintained. In fact, there was a release today.

1 Comment

+1 for SharpPcap. I've used it, developed it, and like it a lot.
2

I recommend using Pcap.Net.

It is a very active .NET wrapper for WinPcap wrapper with a vast packet interpretation library. It has great quality and performance.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.