views:

400

answers:

2

I am wanting to write a C# service which runs on my server and monitors network traffic and writes it to a database for analysis. I have used Wireshark, but I think that Microsoft Network Monitor may have a better C# .NET interface for programming against. Is this true?

Can you point me to some good code samples for using Microsoft Network Monitor?

+1  A: 

Wireshark uses the pcap (or possibly winpcap) library to capture network packets. Although they are written in C/C++ there are various .net wrappers available for them including WinPcapNet, SharpPcap and Pcap.net. I haven't used any of these so I can't comment on their usability.

I'm posting this from my phone so it's an absolute pain adding links, if you go to the Wikipedia page for pcap you should find the links you need there.

Amos
A: 

I ended up using SharpPcap, it is a great utility.

BrokeMyLegBiking