Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Oct 1998 17:55:52 -0400 (EDT)
From:      Alfred <perlsta@hotjobs.com>
To:        hackers@FreeBSD.ORG
Subject:   need "no kludge" solution for socket->uid mapping
Message-ID:  <Pine.SOL.4.00.9810101748360.4767-100000@fs3.ny.genx.net>

next in thread | raw e-mail | index | archive | help
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 <sys/socketvar.h>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.00.9810101748360.4767-100000>