From owner-freebsd-net Tue Sep 8 06:33:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA00285 for freebsd-net-outgoing; Tue, 8 Sep 1998 06:33:22 -0700 (PDT) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA00277 for ; Tue, 8 Sep 1998 06:33:15 -0700 (PDT) (envelope-from dag-erli@ifi.uio.no) Received: from hrotti.ifi.uio.no (2602@hrotti.ifi.uio.no [129.240.64.15]) by ifi.uio.no (8.8.8/8.8.7/ifi0.2) with ESMTP id PAA26480; Tue, 8 Sep 1998 15:32:59 +0200 (MET DST) Received: (from dag-erli@localhost) by hrotti.ifi.uio.no ; Tue, 8 Sep 1998 15:32:58 +0200 (MET DST) Mime-Version: 1.0 To: Ollivier Robert Cc: "FreeBSD-Net (FreeBSD.Org) List" Subject: Re: How to find which application is using a given UDP port References: <19980907235314.A25006@keltia.freenix.fr> Organization: University of Oslo, Department of Informatics X-url: http://www.stud.ifi.uio.no/~dag-erli/ X-other-addresses: 'finger dag-erli@ifi.uio.no' for a list X-disclaimer-1: The views expressed in this article are mine alone, and do X-disclaimer-2: not necessarily coincide with those of any organisation or X-disclaimer-3: company with which I am or have been affiliated. X-Stop-Spam: http://www.cauce.org/ From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) Date: 08 Sep 1998 15:32:57 +0200 In-Reply-To: Ollivier Robert's message of "Mon, 7 Sep 1998 23:53:14 +0200" Message-ID: Lines: 36 X-Mailer: Gnus v5.5/Emacs 19.34 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id GAA00278 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ollivier Robert writes: > According to Dag-Erling Coidan Smørgrav : > > It won't tell you *which* app holds the port. fstat(1) will tell you > > which processes have open TCP or UDP sockets, but not which port. The > > trick is to use 'fstat' and 'netstat -Aan' and compare addresses: > Better to use lsof (in ports/sysutils/lsof) which does that automatically. Yes... if only it would compile: gcc -O -DFREEBSDV=300 -DHASRPCV2H -DHASFDESCFS -DHASPROCFS -DHAS9660FS -DLSOF_VSTR=\"3.0-CURRENT\" -I/sys -c dmnt.c dmnt.c:53: `INITMOUNTNAMES' undeclared here (not in a function) dmnt.c: In function `readmnt': dmnt.c:88: `MOUNT_NONE' undeclared (first use this function) dmnt.c:88: (Each undeclared identifier is reported only once dmnt.c:88: for each function it appears in.) dmnt.c:88: `MOUNT_MAXTYPE' undeclared (first use this function) dmnt.c:147: `MOUNT_PROCFS' undeclared (first use this function) *** Error code 1 Stop. *** Error code 1 Stop. *** Error code 1 Stop. *** Error code 1 Stop. *** Error code 1 Stop. DES -- Dag-Erling Smørgrav - dag-erli@ifi.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message