Date: Fri, 28 Jun 2002 12:01:36 -0700 (PDT) From: John Newlin <jnewlin@tsoft.com> To: freebsd-questions@freebsd.org Subject: programming question (finding process that created a socket) Message-ID: <200206281901.MAA20428@shell.tsoft.com>
next in thread | raw e-mail | index | archive | help
Hello, Not sure if this the right list, but seemed a good place to start. I'm mostly just monkeying around learing stuff so bear with me. I was trying to make some changes to the netstat code to add the ability to see which process is associated with each active Socket. It looked like I found the place this was stored, and it was in the xt_socket struct. However, the so_pgid field of this xt_socket structure is valid for a few sockets, but 0 for many of them. Anyone know why it is valid some of the time? Anyone know a more reliable way to find the process associated with a socket? Is there a better list to send this to? Thanks, -John Newlin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206281901.MAA20428>