From owner-freebsd-hackers Wed May 15 11:02:47 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA09827 for hackers-outgoing; Wed, 15 May 1996 11:02:47 -0700 (PDT) Received: from rocky.sri.MT.net (rocky.sri.MT.net [204.182.243.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA09813 for ; Wed, 15 May 1996 11:02:41 -0700 (PDT) Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id MAA19630; Wed, 15 May 1996 12:02:27 -0600 Date: Wed, 15 May 1996 12:02:27 -0600 From: Nate Williams Message-Id: <199605151802.MAA19630@rocky.sri.MT.net> To: Gary Aitken Cc: freebsd-hackers@freebsd.org Subject: Re: user ppp with dedicated line In-Reply-To: <3199FF85.21E7@ics.com> References: <3199FF85.21E7@ics.com> Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 2. In order to get ppp to work on my dedicated line, I needed > to make the following mods to force packet mode: > > *** /cdrom/usr/src/usr.sbin/ppp/main.c Thu Oct 5 14:24:42 1995 > --- main_new.c Wed May 1 07:46:56 1996 > *************** > *** 599,604 **** > --- 599,610 ---- > } else if (mode & MODE_DEDICATED) { > if (!modem) > modem = OpenModem(mode); > + /* > + * garya@dreamchaser.org > + * Force packet mode as for a direct connection > + */ > + PacketMode(); > } I really didn't have time to look at this, but I was intrigued enough to do it. Apparently, in 'dedicated' mode PPP waits for the remote site to initiate the connection. main.c, starting at 796 if (LcpFsm.state <= ST_CLOSED) { /* * In dedicated mode, we just discard input until LCP is started. */ if (!(mode & MODE_DEDICATED)) { cp = HdlcDetect(rbuff, n); if (cp) { /* * LCP packet is detected. Turn ourselves into packet mode. */ if (cp != rbuff) { write(1, rbuff, cp - rbuff); write(1, "\r\n", 2); } PacketMode(); By starting packet mode earlier with your patch I think are essentially 'forcing' the remote site to respond to you. If it's necessary to get working then it's an acceptable hack, but I don't think it's generically applicable. > 3. I'm having trouble getting ppp.linkup to be read when used with a > dedicated line. It appears to be totally ignored when ppp is > started as follows, with the above mods: I think it might be ignored because of the above hack. PPP.LINKUP is called by OsLinkup in IpcpLayerUp, but I'd have to take more time to figure out when that is called. Nate