[ network dev. in C-UNIX ]
I'm writing an app to monitor TCP/IP connections on my computer.
( Linux RH 5.2 kern 2.0.36 )
Now I have the TCP port number of a connection. How can I get
(very quickly) the name of the program (executable file) using that
I think It'll be okay if I get the PID of the process using that
I found some tables but none which gives the PID with the port number.
Is there someone who can help me ?
bonus : - Is it possible for multiple process to use the same port number
for multiple connections (what about setsockopt SO_REUSEADDR) ?
If so, what else do I need to find the right process ? And how
can I do that ?
Thank you for any help,