Passive listening on a port using raw sockets

Hello,

I want to be able to passively listen to a port on my computer which is already in use by a program.
I'm not allowed to interfear with the traffic going on the port, but I want to see all incomming traffic on the port.

It has to be "real time". I can't afford to miss any information coming in on the port.

gaboroneAsked:
Who is Participating?
 
sunnycoderConnect With a Mentor Commented:
and if you still want to do it programatically, look into the winpcap library
http://winpcap.polito.it/
0
 
fim32Commented:
what operating system?

you just want a sniffer.  any sniffer will do.

if you're using a unix variant, they usually come with one, like 'snoop' for solaris or 'tcpdump' on linux/bsd...
0
 
sunnycoderCommented:
using a sniffer such as tcpdump or ethereal is one option and if you wish to do it programatically on your own then
1. either add your code to the network stack and get a packet there
2. If you are on linux or similar machine, use libipq to get packets which you want ... I am not sure if windows has such a thing to offer
0
 
gaboroneAuthor Commented:
Unfortunately I'm on a windows machine, so I have to go from there.

I need to parse the data for information as well, so i can't use an existing program if i can't modify it.
0
 
sunnycoderCommented:
this should do it
http://windump.polito.it/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.