Both "netstat -p" and "lsof -n -i -P" seems to readlinking all processes fd s, like stat /proc/*/fd/*
.
How to do it more efficiently?
My program wants to know what process is connecting to it. Traversing all processes again and again seems too ineffective.
Ways suggesting iptables things or kernel patches are welcome too.