June 11, 2011

billconan billconan
Lab Rat
38 posts

Possible to capture all the tcp packages sent from my computer?

 

Hello guys,

I am interested in writing a little tool to capture all the tcpip packages sent by my web browsers (multiple browsers). I heard that every request sent by a browser actually uses a different port. So is it possible to write a program using QT to listen to all the ports?

Suppose I have two applications that are listening to the same port. Can both of them respond to the tcpip request? Or the operating system will only give the package to one of the listeners?

I know a tool called TCPView for windows that does this. But since I am using a different operating system and there is no fun to use a readymade tool, I still want to write one myself.

Thanks,

2 replies

June 11, 2011

Andre Andre
Area 51 Engineer
6031 posts

This requires interacting with the network stack on a level that is not supported by Qt. Of course you can write the front end code using Qt, but for the actual hooking into the OS to do what you want, Qt can not help you.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

June 11, 2011

Scylla Scylla
Lab Rat
238 posts

For this you should take a look at the pcap lib and use Qt as frontend.

 
  ‹‹ How to disable qmake addition of -DUNICODE compiler flag      Some Question regarding Pointers and Destructors and safety... ››

You must log in to post a reply. Not a member yet? Register here!