From owner-freebsd-hackers Wed May 20 13:40:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA20703 for freebsd-hackers-outgoing; Wed, 20 May 1998 13:40:09 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from rrz.Hanse.DE (rrz.Hanse.DE [193.174.9.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA20517 for ; Wed, 20 May 1998 13:39:06 -0700 (PDT) (envelope-from stb@transit.hanse.de) Received: from daemon.Hanse.DE (daemon.Hanse.DE [193.174.9.17]) by rrz.Hanse.DE (8.8.8/8.8.8) with ESMTP id WAA09062 for ; Wed, 20 May 1998 22:38:32 +0200 (CEST) (envelope-from stb@transit.hanse.de) Received: from transit.hanse.de (transit.Hanse.DE [193.174.9.161]) by daemon.Hanse.DE (8.8.8/8.8.8) with ESMTP id WAA28717 for ; Wed, 20 May 1998 22:38:38 +0200 (CEST) (envelope-from stb@transit.hanse.de) Received: (from stb@localhost) by transit.hanse.de (8.8.8/8.8.8) id WAA21664; Wed, 20 May 1998 22:42:02 +0200 (MET DST) Date: Wed, 20 May 1998 22:42:01 +0200 (MET DST) From: Stefan Bethke To: hackers@FreeBSD.ORG Subject: Wiring down ppp if Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Because I like to associate a given tty with a particular ppp (multiple leased lines together with ipfw and accounting), I wonder how complicated this could be achieved. The current method (in sys/net/ppp_tty.c and if_ppp.c) is: - pppd sets PPPDISC - ppp_tty.c:pppopen() calls pppalloc() - pppalloc selects first free unit (if available). I would propose to modify this to: - pppd sets PPPDISC then either - pppd does an ioctl(PPPIOCGUNIT) - ppp_tty.c:pppopen() calls pppalloc(p->pid, -1) - pppalloc selects first free unit (if available). - ioctl returns unit or - pppd does an ioctl(PPPIOSUNIT) - ppp_tty.c:pppopen() calls pppalloc(p->pid, unit) - pppalloc assigns requested unit, if available - ioctl returns unit Additionally, pppd would need to know about a config parameter, say "unit", or "interface". Is there anything this change would break? Stefan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message