From owner-freebsd-hackers Sun Sep 7 05:25:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA15755 for hackers-outgoing; Sun, 7 Sep 1997 05:25:47 -0700 (PDT) Received: from panda.hilink.com.au (panda.hilink.com.au [203.8.15.25]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA15747 for ; Sun, 7 Sep 1997 05:25:43 -0700 (PDT) Received: (from danny@localhost) by panda.hilink.com.au (8.8.5/8.8.5) id WAA07186; Sun, 7 Sep 1997 22:25:33 +1000 (EST) Date: Sun, 7 Sep 1997 22:25:32 +1000 (EST) From: "Daniel O'Callaghan" To: doconnor@ist.flinders.edu.au cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Divert sockets.. In-Reply-To: <199709070853.SAA03149@holly.rd.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 7 Sep 1997, Daniel J. O'Connor wrote: > Hi, > 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). I know ijppp can do this, but I have problems with ijppp =) > 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 :) You could do it with divert(4) - divert an incoming packet, rather than an outgoing packet, and only put it back into the kernel if the link is up. /* Daniel O'Callaghan */ /* HiLink Internet danny@hilink.com.au */ /* FreeBSD - works hard, plays hard... danny@freebsd.org */