How to sniff local outgoing network traffic in .NET without using PCap?

Hendrik Wiese picture Hendrik Wiese · Jun 1, 2010 · Viewed 20.9k times · Source

I'd like to somehow hook into the local system's network stack to capture outgoing network packets without using Winpcap. Unfortunately it tends to crash my system every now and then.

Is there a way to "sniff" outgoing traffic of the local system from a user space process written in a .NET language?

Answer

Mike Atlas picture Mike Atlas · Jun 1, 2010

What you want is the Network Monitor API. More here and here.