From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b0b3eac1e6bb760b X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-02-25 20:17:52 PST Path: gmd.de!newsserver.jvnc.net!darwin.sura.net!howland.reston.ans.net!cs.utexas.edu!asuvax!names.maricopa.edu!not-for-mail From: zagar@names.maricopa.edu (Chris Zagar) Newsgroups: comp.unix.osf.osf1 Subject: Re: Associating a userid with a network connection Date: 24 Feb 1994 21:55:43 -0700 Organization: Maricopa Community Colleges Message-ID: <2kk0cf$47f@names.maricopa.edu> References: <2kimdq$nqs@netnews.upenn.edu> NNTP-Posting-Host: names.maricopa.edu >If netstat shows me the existence of a network connection, how do I >find out what process/userid is using that connection? For an example of some code that does this, ftp to "ftp.lysator.liu.se" and download a package called pidentd. This program is normally used to augment auditing of TCP connections. It includes some logic in a subdirectory called kernel in a file called "other.c" which shows how to access kernel structures that hold information on connections. I think if you activate the software with certain extended features turned on, it can also be used to query the local system regarding connections, so you wouldn't have to write any code to be able to find the info you want. --------------------------------------------------------------------------- /\ /\ Chris Zagar Maricopa Community Colleges / \ / \ Asst. Prog. Mgr./Networking 2411 West 14th Street / /\// /\ \ Bitnet: ZAGAR@MARICOPA Tempe, AZ 85281 \/ \/ \/ Internet: zagar@names.maricopa.edu (602) 731-8838