[47860] in Cypherpunks

home help back first fref pref prev next nref lref last post

Associating Local Port Number to PID

daemon@ATHENA.MIT.EDU (Karl A. Siil)
Wed Jan 24 11:54:11 1996

Date: Wed, 24 Jan 1996 11:49:13 -0500
To: cypherpunks@toad.com
From: "Karl A. Siil" <karl@cosmos.cosmos.att.com>

Folks,

I'm working on a program for UNIX (SVR4, Solaris 2.4) systems that needs to
associate PID with local TCP/IP port number, so as to pass session keys
accordingly to already running processes. This sounds like such an obviously
needed association that someone must have done it already.

Pointers to code would be best, but any references would be helpful (e.g.,
the appropriate /dev/kmem data structure(s), offset(s), etc.). If necessary,
the program is allowed to be in any group (e.g., "sys" to get at /dev/kmem)
and may even run as root, as a last resort. I see no reason for the latter,
however. Running set-gid to "sys" is sufficient for netstat(1) and ps(1) and
I think is the upper bound for process privilege that I would need.

Thanks in advance.

                                        Karl


home help back first fref pref prev next nref lref last post