[318] in linux-net channel archive
Re: diagnosing spammed connections
daemon@ATHENA.MIT.EDU (Zygo Blaxell)
Sat May 13 20:34:16 1995
From: Zygo Blaxell <zblaxell@miranda.uwaterloo.ca>
To: longyear@netcom.com (Al Longyear)
Date: Sat, 13 May 1995 19:34:59 -0400 (EDT)
Cc: rdr@legislate.com, linux-net@vger.rutgers.edu
In-Reply-To: <199505121558.IAA03185@maddawg.sii.com> from "Al Longyear" at May 12, 95 08:58:12 am
Quoted from Al Longyear:
> At 06:27 PM 5/11/95 GMT, Raul Miller wrote:
> >How do you map from a tcp connection to local process numbers?
>
> The easiest method is what pidentd does. It looks in /proc/net/tcp
> for the information.
>
> The entries in that 'file' have the local and remote addresses and the
> current state of the connection. Given the remote information, you may find
> the local values.
The stuff in /proc/net/tcp is of the form:
sl local_address rem_address st tx_queue rx_queue tr tm->when uid
0: 00000000:0200 00000000:0000 0A C41CE929:00000000 00:00000000 079EE4F4 0 0
The top line doesn't seem to match up to the fields in the data, and
(for the part relevant to the original question) I can't see the process
ID's in there anywhere (not that I'm expecting them, since many
processes may have a copy of an open socket descriptor).
--
Zygo Blaxell, Math student at the University of Waterloo. Software/Hardware
guru for the Computer Science Club, sysadmin for miranda.uwaterloo.ca. 10th
place team, ACM International Finals Programming Contest 1994. Will administer
Unix (esp. Linux, maybe Solaris if I have to) for food, money, or T-shirts.