From owner-freebsd-current Wed Sep 10 21:35:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA25516 for current-outgoing; Wed, 10 Sep 1997 21:35:18 -0700 (PDT) Received: from sendero-ppp.i-connect.net (sendero-ppp.i-Connect.Net [206.190.143.100]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id VAA25510 for ; Wed, 10 Sep 1997 21:35:14 -0700 (PDT) Received: (qmail 8233 invoked by uid 1000); 11 Sep 1997 04:35:23 -0000 Message-ID: X-Mailer: XFMail 1.2-alpha [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199709110238.TAA23795@usr05.primenet.com> Date: Wed, 10 Sep 1997 21:35:23 -0700 (PDT) Organization: Atlas Telecom From: Simon Shapiro To: Terry Lambert Subject: Re: PPP - why set CLOCAL for server ('-direct' mode) ? Cc: current@FreeBSD.ORG, nnd@itfs.nsk.su Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi Terry Lambert; On 11-Sep-97 you wrote: ... > Without correct use of the partial open hack, and a driver that > supports it, without CLOCAL set, the lack of DCD prevents the > process from communicating with the modem in order to configure > it, since the open hangs until the DCD goes high. I find it highly entertaining that we still have this issue. According to the original CCITT spec, DCD is NOT supposed to go true unless the modem on the other side has handshaked. This is what DCD is (Data Carrier Detect). The solution is very simple; Upon open, you open anyway, ignoring but remembering DCD. If you get a change of state from inactive to active, you change the state, but ignore it. However, if the state transitions from ACTIVE to INACTIVE, you terminate the connection, close the port and generate SIGHUP. This is the simplest and most correct way to handle it. Before you remind me that oh, so many devices know how to fake DCD, I will tell you that I know that. This bug in RS-232C handling is older than some of us. Modem vendors have to connect to Unix boxes, hence, the kludge. --- Sincerely Yours, (Sent on 10-Sep-97, 21:07:16 by XF-Mail) Simon Shapiro Atlas Telecom Senior Architect 14355 SW Allen Blvd., Suite 130 Beaverton OR 97005 Shimon@i-Connect.Net Voice: 503.643.5559, Emergency: 503.799.2313