Date: 10 Sep 1997 12:39:11 GMT
From: nnd@itfs.nsk.su
To: current@freebsd.org
Subject: PPP - why set CLOCAL for server ('-direct' mode) ?
Message-ID: <5v64df$gsa@news.itfs.nsk.su>
next in thread | raw e-mail | index | archive | help
I try to construct a 'dial-in-access-server'
from IBM PC-compatible with Cyclades' Cyclom-16YeP multiport
board, some cheap modems and FreeBSD-3.0.
I've discover that if I start '/usr/sbin/ppp' as:
/usr/sbin/ppp -direct user-label
(from small script setted as as user's shell)
then it sets 'CLOCAL' flag for modem and
as a result 'ppp' process does'nt received 'SIGHUP'
on modem's carrier drop.
What is the purpose of such ('CLOCAL') setting
in '-direct' mode ?
N.Dudorov
P.S. If this is just an oversight I append a patch for
/usr/src/usr.sbin/ppp/modem.c ;-)
--- modem.c.ORIG Wed Sep 10 13:54:34 1997
+++ modem.c Wed Sep 10 13:55:43 1997
@@ -566,10 +566,9 @@
}
tcgetattr(modem, &rstio);
cfmakeraw(&rstio);
+ if (!(mode & MODE_DIRECT)) rstio.c_cflag |= CLOCAL;
if (VarCtsRts)
- rstio.c_cflag |= CLOCAL | CCTS_OFLOW | CRTS_IFLOW;
- else
- rstio.c_cflag |= CLOCAL;
+ rstio.c_cflag |= CCTS_OFLOW | CRTS_IFLOW;
if (!(mode & MODE_DEDICATED))
rstio.c_cflag |= HUPCL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5v64df$gsa>
