[ Date Index ][
Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
On Wed, 2002-07-10 at 15:30, Steve Marvell wrote:
On Wed, Jul 10, 2002 at 03:18:21PM +0100, John Horne wrote:A quick question: does anyone know how I can test from within a c program whether a given socket is still open or not, without sending anything down it? Our big brother monitoring system opens a socket to a system using (say) port 23 for telnet. The system has inetd configured for telnet but has tcp wrappers around it and disallows any telnet access. In that respect the socket gets closed by the remote system, but big brother doesn't see this. Hence it reports that telnet is available on that system, when in fact it isn't.If you select() on the socket and it's not available for write, then it's dead dude.
Nope, select doesn't seem to work with wrapped services. Checking for a writeable socket it always returns 'true' regardless of whether the service is TCP wrapped or not. John. -- John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: jhorne@xxxxxxxxxxxxxx PGP key available from public key servers -- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.