Making a simple packet analyser program

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Hi everyone,

I'd quite like to create a small application that could listen on a
port and take a copy of any communications going in or out.
The end goal is to be able to offer statistics and stuff regarding the
packets, and also to join them up and allow for easy reading of the
packets and headers etc.

The question is, how is it done?

I know how to communicate across a port but I'm thinking, if the port
is already open then the program wouldnt work. Is there any way I can
listen in on the communications and take a copy.

Many thanks to anyone who can share their wisdom!

Thanks
Simon
 
If you want to capture whole packets including for example ethernet header
you will have to use low level packet capturing library. The most famous is
WinPCAP (winpcap.polito.it)
 
Back
Top