Is it possible to use kstat to get information about which processes have which ports open? I've looked into how lsof does it and apparently they read volatile kernel memory, which kstat seems to give access to (please correct me if I'm wrong).
I was just wondering if anyone knows how to filter kstat to display information about which processes a port has open. Perhaps which module should I look at?