By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,679 Members | 1,500 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,679 IT Pros & Developers. It's quick & easy.

Making a simple packet analyser program

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
This is about all I can offer, I don't know much else but this might help
http://www.codeproject.com/dotnet/dotnetwinpcap.asp
"Simon" <sh******@hotmail.com> wrote in message
news:a6*************************@posting.google.co m...
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

Nov 15 '05 #2

P: n/a
http://www.c-sharpcorner.com/Network...fferInCSLM.asp is interesting.
He also shows a novel way to parse the byte array into a struct using unsafe
code that solved a problem for me before.

--
William Stacey, DNS MVP

"Simon" <sh******@hotmail.com> wrote in message
news:a6*************************@posting.google.co m...
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

Nov 15 '05 #3

P: n/a
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)
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

Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.