Eyla
Eyla

Reputation: 5861

Network programming with C#

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!

Upvotes: 2

Views: 836

Answers (3)

brickner
brickner

Reputation: 6585

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.

Upvotes: 2

Matthew Flaschen
Matthew Flaschen

Reputation: 285027

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

Upvotes: 4

BobbyShaftoe
BobbyShaftoe

Reputation: 28499

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.

Upvotes: 4

Related Questions