From owner-freebsd-net@FreeBSD.ORG Fri Jul 20 16:51:49 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18FDF16A419 for ; Fri, 20 Jul 2007 16:51:49 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.freebsd.org (Postfix) with ESMTP id 8132C13C468 for ; Fri, 20 Jul 2007 16:51:48 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost.int.ru [127.0.0.1] (may be forged)) by mp2.macomnet.net (8.13.7/8.13.8) with ESMTP id l6KGJ6Ep053445; Fri, 20 Jul 2007 20:19:07 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Fri, 20 Jul 2007 20:19:06 +0400 (MSD) From: Maxim Konovalov To: "Brian A. Seklecki" In-Reply-To: <20070720113322.Q62485@arbitor.digitalfreaks.org> Message-ID: <20070720201507.Y20123@mp2.macomnet.net> References: <20070720113322.Q62485@arbitor.digitalfreaks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-net@freebsd.org Subject: Re: checking SO_ACCEPTFILTER with netstat(1)/sockstat(1) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2007 16:51:49 -0000 On Fri, 20 Jul 2007, 11:37-0400, Brian A. Seklecki wrote: > > Neither appear to support extracting the setsockopt(2) list. lsof(8) to the > rescue: > > $ sudo lsof -T f | grep -i ACCEPTF | more > > httpd 38396 root 3u IPv6 0xc2824378 0t0 TCP *:http > (SO=ACCEPTCONN,ACCEPTFILTER,KEEPALIVE,PQLEN=0,QLEN=0,QLIM= > ^^^^^^^^ > 128,RCVBUF=262144,REUSEADDR,SNDBUF=262144 > TF=MSS=1024,NODELAY,REQ_SCALE,REQ_TSTMP) > > A little bit more definitive than "Oh hey apache stopped complaining." > > > Any other way? > I think lsof(8) just parses net.inet.tcp.pcblist OID. You could look at struct xtcpcb definition and extract xtcpcb.xt_socket.so_options from the above sysctl. HTH. -- Maxim Konovalov