Add process information to the streams window
Issue #18
new
i.e. pid and process name. seems lsof|grep IPv4 can show this with normal user privileges.
Can also show ports which are listening, could be a useful feature for a separate window.
Comments (2)
-
reporter -
reporter https://opensource.apple.com/source/network_cmds/network_cmds-543/netstat.tproj/inet.c.auto.html shows how to get the pid and socket info, use sysctlbyname with mib net.inet.tcp.pcblist_n, net.inet.udp.pcblist_n, net.inet.raw.pcblist_n. Parse kind XSO_SOCKET to get struct xsocket_n which contains so_last_pid and so_last_pid, see https://github.com/aosm/xnu/blob/master/bsd/sys/socketvar.h.
- Log in to comment
Might be better as a separate window? Otherwise you could only show this info during a live capture, unless the info is saved to file somehow. Could store it in a packet but that is pretty hacky.