*BSD News Article 73597


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!newsgate.duke.edu!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: inactivity timeout for pppd
Date: 13 Jul 1996 11:36:35 GMT
Organization: Private BSD site, Dresden
Lines: 32
Message-ID: <4s81o3$n33@uriah.heep.sax.de>
References: <4s310c$139@natasha.rmii.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

tjacobs@vaultbbs.com (Thomas R. Jacobs, Jr.) wrote:

> We've recently started to switch our users to PPP from SLIP.  We had
> modified sliplogin to add an inactivity disconnect based on an amount
> in the slip.hosts file.  To do this, we just captured the idle time
> displayed in finger.  The problem is that this method will not work
> with pppd.  Is there another way to have some type of idle timeout
> while using pppd?

I wonder how it used to work with sliplogin.  Are you sure that you
haven't kicked your clients after that amount of *connection* time?
(I usually use the idle time as displayed by fingering my ISP's
machine as the time i've been connected there.)

Well, you should really encode this into pppd.  Since all packets pass
through the kernel interface, integrating a small timeout hook and an
ioctl to set it should not be a big deal.

*Don't* call one untimeout()/timeout() pair on each packet however. :)
I once did this when implementing the screensaver in pcvt, not knowing
what i'm doing.  The overhead of walking the timer queue is immense,
and it's not necessary to do this on a per-packet base.  I then
decided to do it once per second, by recording the kernel time of the
last timeout() in a local variable, and only calling untimeout()/
timeout() after the kernel time differed again from this value.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)