Subject: Re: Why do some network connections get stuck forever?
To: None <tech-net@NetBSD.org>
From: Kentaro A. Kurahone <kurahone@sigusr1.org>
List: tech-net
Date: 10/26/2005 08:41:55
--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 25, 2005 at 04:52:50PM -0400, Greg A. Woods wrote:
> I'm not sure that these connections do have keep-alives enabled, and now
> I'm guessing that they don't, especially since I can't find any use of
> SO_KEEPALIVE in the source.  :-)
>=20
> But how does one discover the current state of the socket options in
> order to determine whether or not keep-alives are enabled or not?
> Are they included in the apparently invisible "socket flags field" that
> is not being shown by fstat(8) despite the manual mentioning it?
> (see attached)

Programatically?  getsockopt(2)

HTH, HAND,

--=20
Kentaro A. Kurahone
SIGUSR1 Research and Development

--r5Pyd7+fXNt84Ff3
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iQIVAwUBQ19BUWfp+SLSG+tuAQLQfA/9GELoHlj2KcWhFHJbx0FW05oNdeM6EWRT
2pFms149jKCWn39JP8p+0Br/gXCMRSuLMy2vKqhuxn7I8agCNXda66lmleRZ93+C
2X2DUElq/C0lsfS1eAJm14U6TH6cpgKQLfG20gYp+KQuaIiBcHbdVpolY0kfNPcE
3GVeZ+m8beyeqPLEc1gvSFm0EIP0yidxtv8ZDVQY7bl2eR1ohY4BVoYn8mtzl4tB
cZZINFrgeXIRU8XafG9eYwA2uTJ/RRLJr2ena/PhFlWaL2oQ+Tn4jSUOSDE9KWwZ
zSeJQilfuG/2Fh58Nj+T9kpzM0AMiQdkzWhtL5BQlXxqOSfVEws6ipcTqtwOa9q9
EYME460quUDeCBziV9fNtSmvMo3CN0lmf9NFqX+LgvMV3OgZXpPpcB/MiKYvN19M
J4xYviH5EZQn9hZl3Vq6CxRyxKBPA6WzARhy4TVleAE7rSG4JWlhd2k7iP8RtQql
tNtB9liX83vn4H1wPUjwxSHSLN01efopSfyvUv29x3xdRRYN2SWWvh9vJrixFyE4
5M73lijImYwwRHPnskHbmqeEStY1ZoEjbLTQXba+Qx/OF5IB7gvAWhVSbNVvmPfi
irdVaCpi0Z8ul6/SP+F0U+JvuMa6iSHpLcp3wLMUuE11d5RKFWRcN3UtllLn0rSl
vVdCNv/YLLs=
=rBZB
-----END PGP SIGNATURE-----

--r5Pyd7+fXNt84Ff3--