Question

Is there a way to intercept TCP and UDP traffic that is inside localhost on Windows in C#? For example an app running on localhost sending messages through TCP and/or UDP on localhost... I need to intercept these to determine the efficiency of data of the program, for this I'm building an utility tool in C# (need a self build solution no product)

Was it helpful?

Solution

Usually you have to use program like wireshark to capture loopback (127.0.0.1) traffic, but it's impossible for libpcap on Windows. (read this note)

You have to use Raw Cap if you want to sniff the loopback interface

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top