Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2007 20:19:06 +0400 (MSD)
From:      Maxim Konovalov <maxim@macomnet.ru>
To:        "Brian A. Seklecki" <lavalamp@spiritual-machines.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: checking SO_ACCEPTFILTER with netstat(1)/sockstat(1)
Message-ID:  <20070720201507.Y20123@mp2.macomnet.net>
In-Reply-To: <20070720113322.Q62485@arbitor.digitalfreaks.org>
References:  <20070720113322.Q62485@arbitor.digitalfreaks.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070720201507.Y20123>