Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 1997 16:06:20 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        mike@smith.net.au (Mike Smith)
Cc:        doconnor@Ist.flinders.edu.au, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Divert sockets..
Message-ID:  <199709082306.QAA05241@bubba.whistle.com>
In-Reply-To: <199709080045.KAA00615@word.smith.net.au> from Mike Smith at "Sep 8, 97 10:45:18 am"

next in thread | previous in thread | raw e-mail | index | archive | help

> > I was wondering if its possible to write a program which would do
> > 'dial on demand', by grabbing packets, and seeing if they are destined
> > to go out of the system, and if so, run a script(which would cause a
> > dialup).
> 
> You could hang something off a divert socket to do this.

IMHO, the proper way to do this is to let the PPP daemon handle it
by installing a route first (so you let the routing code determine
whether packets are supposed to go over the WAN link or not, as it
should) and then checking each outgoing packet for suitability as
"demand" (not all are, e.g., NTP packets). When "demand" is seen,
it should start dialing, etc. The same "demand" test can also apply 
to idle timeout calculations. This is how mpd does it, anyway.

> > I know ijppp can do this, but I have problems with ijppp =)
> 
> Fix your problems. 8)

Or use mpd instead :-)

> > The only problem I can see is that since a default route wouldn't be
> > established yet(since you aren't dialed up), the packets would be
> > killed off before they pass through a divert socket.(I don't know much
> > about how that stuff works :)

This problem goes away if you do as described above.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



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