From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 28 09:52:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20D3316A4CE for ; Sat, 28 Feb 2004 09:52:10 -0800 (PST) Received: from jam.adverticum.net (jam.adverticum.net [195.228.75.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72CD443D1F for ; Sat, 28 Feb 2004 09:52:09 -0800 (PST) (envelope-from grinder@pro.hu) Received: from wakumbi.prim.hu (wakumbi.prim.hu [195.228.75.115]) by jam.adverticum.net (Postfix) with ESMTP id 6C9DBAB878 for ; Sat, 28 Feb 2004 18:52:07 +0100 (CET) Received: from www-data by wakumbi.prim.hu with local (Exim 3.35 #1 (Debian)) id 1Ax8dD-0004z8-00 for ; Sat, 28 Feb 2004 18:52:07 +0100 Received: from gprs4.vodafone.hu [80.244.96.196] by www-data with webmail (PrimPosta); Sat, Feb 28 18:52:07 2004 +0100 (CET) From: grinder To: freebsd-hackers@freebsd.org Errors-To: grinder@pro.hu X-Sender: grinder@pro.hu MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit X-Mailer: PrimPosta Sender: grinder@pro.hu Message-Id: Date: Sat, 28 Feb 2004 18:52:07 +0100 X-Mailman-Approved-At: Sun, 29 Feb 2004 05:57:40 -0800 Subject: Sockets and the owner process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: grinder List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2004 17:52:10 -0000 I want to create a small kernel module which logs the socket operations. So in my module i have a socket structure, and i want to know which process (thread) owns it. But the socket structure isn't contains any reference to the process structure. If i walk through the vnode table i can find my socket by the so_gencnt "unique id", but the vnode structure isn't have any variables back to the proc structure. Is it possible to get the owner proc structure for a socket? Thanks, Tibor Kiss