Advertisement

Monitor Traffic IN/OUT of my PC

Started by August 21, 2003 09:03 PM
3 comments, last by Fletch 21 years, 5 months ago
I want to write a simple little app that just logs some of the traffic in and out of my computer, but am not sure about where to start looking to tackle this problem. How do I capture outgoing data from my computer? Are there any API functions that would simplify this? Thanks in advance!
Just use a packet sniffer like Ethereal.
Darkhaven Beta-test stage coming soon.
Advertisement
I think they might be trying to do something like finding out which ports are in use by which programs. I don''t think ethereal tells you directly which programs are actually using which ports.
netstat -ao tells you which ports are in use by which processes, the -o switch that lists the PIDs isn''t on win98 but seems to be on NT/XP/etc. based systems. I''m not sure what API or driver calls would be used to do this, however.
Use raw sockets. An excellent api to do this is the pcap library. It''s pretty much the standard way to create a sniffer. Of course you would use WinPCap on windows...

This topic is closed to new replies.

Advertisement