Possible Duplicate:
Get connecting IP from specified ports that using by other program.
If a port is used by a program, is there any way I can listen that port and get the connected IP on that port?
Possible Duplicate:
Get connecting IP from specified ports that using by other program.
If a port is used by a program, is there any way I can listen that port and get the connected IP on that port?
netstat
).If this doesn't answer your question, you should try to give more information what you're trying to achieve.
I'm not sure how exactly you'd do it in code, but the information is available by running netstat -b
.
You can also sniff whole network interface, and filter your related ports of interest.