Valhalla Legends Forums Archive | .NET Platform | [c#] tcp/ip packet sniffing

AuthorMessageTime
Laff
for now i've given up on making a full-on wc3 bot in c# because, well, school just started and i don't have time.  so i want to do something that MIGHT be simpler.

i just want to sniff tcp packets coming in on the port (6112) and dump them into some data structure i'll create.  my only experience with doing this sort of thing was last year in my networking class using a c library known as winpcap.  i don't know if winpcap exists in c# but i also would like to steer clear of using it.

anyone wanna point me in the right direction and give me some classes to research and be on my way?
September 27, 2004, 7:00 PM
drivehappy
I've used this library layer for winpcap and it works well: http://www.codeproject.com/dotnet/dotnetwinpcap.asp
September 27, 2004, 7:02 PM
Myndfyr
Generally speaking you will not be able to "sniff" packets in the manner that you suggest without using a kernel-mode driver such as Winpcap.  You most likely will not be able to write a kernel-mode driver in C#.  I suppose you could, using a mix of real and managed C++.
September 27, 2004, 8:13 PM

Search