Is there a Linux library that will enable me to tell what IP sockets are owned by what processes? I guess I\'m looking for the programmatic equivalent of lsof -i
lsof -i
You could try running lsof with strace and see just which files in /proc it gets data from.