From owner-freebsd-hackers Sat Oct 10 14:57:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA07171 for freebsd-hackers-outgoing; Sat, 10 Oct 1998 14:57:46 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from hotjobs.com (fs3.ny.genx.net [206.64.4.82]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id OAA07166 for ; Sat, 10 Oct 1998 14:57:43 -0700 (PDT) (envelope-from perlsta@hotjobs.com) Received: (qmail 5220 invoked by uid 1288); 10 Oct 1998 21:55:52 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 10 Oct 1998 21:55:52 -0000 Date: Sat, 10 Oct 1998 17:55:52 -0400 (EDT) From: Alfred X-Sender: perlsta@fs3.ny.genx.net To: hackers@FreeBSD.ORG Subject: need "no kludge" solution for socket->uid mapping Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG i'm trying to code a threaded ident server (yes i know one already exists) however i'm finding the way that socket->uid mappings are done to be VERY UGLY(tm) unless i cheat :) then it gets worse when i try to find what port the socket is actually bound to. looking at the code to netstat it seems i can use sysctlbyname() to extract an array of xsocket structures as defined in however i'm really confused as to how to access data in the pointers that are exposed by this sysctl, obviously they are not returned. this causes a problem in the fact that i tried to avoid KVM, but i think i will have to use it anyhow. or am i just missing a simple and elegant solution that's right under my nose? thanks, -Alfred (hint: we need a more verbose /proc or even a /proc/net, this shouldn't have to be a black art) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message