From owner-freebsd-questions Fri Jun 28 12: 1:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8135837B400 for ; Fri, 28 Jun 2002 12:01:37 -0700 (PDT) Received: from shell.tsoft.com (shell.tsoft.com [198.144.192.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31D7D43E06 for ; Fri, 28 Jun 2002 12:01:37 -0700 (PDT) (envelope-from jnewlin@shell.tsoft.com) Received: (from jnewlin@localhost) by shell.tsoft.com (8.8.7/8.8.7) id MAA20428 for freebsd-questions@freebsd.org; Fri, 28 Jun 2002 12:01:37 -0700 (PDT) From: John Newlin Message-Id: <200206281901.MAA20428@shell.tsoft.com> Subject: programming question (finding process that created a socket) To: freebsd-questions@freebsd.org Date: Fri, 28 Jun 2002 12:01:36 -0700 (PDT) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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