From owner-freebsd-hackers Fri Feb 16 14:01:08 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA11474 for hackers-outgoing; Fri, 16 Feb 1996 14:01:08 -0800 (PST) Received: from jolt.eng.umd.edu (jolt.eng.umd.edu [129.2.102.5]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id OAA11458 Fri, 16 Feb 1996 14:01:03 -0800 (PST) Received: from gilligan.eng.umd.edu (gilligan.eng.umd.edu [129.2.98.205]) by jolt.eng.umd.edu (8.7.3/8.7) with ESMTP id RAA29121; Fri, 16 Feb 1996 17:00:57 -0500 (EST) Received: (from chuckr@localhost) by gilligan.eng.umd.edu (8.7/8.7) id RAA10767; Fri, 16 Feb 1996 17:00:56 -0500 (EST) Date: Fri, 16 Feb 1996 17:00:53 -0500 (EST) From: Chuck Robey X-Sender: chuckr@gilligan.eng.umd.edu To: Jerry Kendall cc: FreeBSD Questions , Wes Santee , FreeBSD Hackers Subject: Re: Solution: Telling if User PPP is up or down In-Reply-To: <96Feb16.133227est.20481-1@janus.border.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org Precedence: bulk On Fri, 16 Feb 1996, Jerry Kendall wrote: > > > Hey all. > > Sounds to me like mayby it is the time to modify the ppp program > to create a file that has the times that the link was established > and when it was last broken. If the broken down time is, say perhaps > a string 'FUTURE', in the future, then as far as the system is > concerned, the link is active. When the link is broken, it puts the > date and time it was dropped.. Maybe even something as simple as > the creation of '/tmp/ppp.up' when the link is created and deleted > when the link is broken... The second option is easier to implement, > but, the first option allows for more fexibility. > > I have cc'd the hackers to get feed back from them... I could do the > changes if it generaly excepted as the 'best' possible solution... > > Hey all you hackers: what do you think???? Jerry, I looked at the code, and if a SIGHUP was received (meaning the modem had hung up) then Hangup() is called, which calls Cleanup(). This should (and seems to) ifconfig the interface down. Isn't this what you want it to do; can't you detect if the interface is up or down via a call to ifconfig, then? I checked this on current. Are you guys talking about current? > > > On Fri, 16 Feb 1996, Wes Santee wrote: > > > > > Whoops. I read that as posing the question "isn't there a lockfile > > that can be checked first?". At any rate, I've had people e-mail me > > to say that even doing that doesn't always work. Looks like it's > > back to the drawing board. > > > > Cheers, > > -- > > -------------------------------------------------------------------------------- > > Any comments or opinions in this message are my own and may or may not reflect > the comments or opinions of my present or previous employers. > > Jerry Kendall Border Network Technologies Inc. > System Software Engineer Tel +1-416-368-7157 ext 303 > jerry@border.com Fax +1-416-368-7178 > > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and n3lxx, both FreeBSD (301) 220-2114 | version 2.2 current -- and great FUN! ----------------------------+-----------------------------------------------