Date: 11 Sep 1997 04:30:18 GMT
From: nnd@itfs.nsk.su
To: current@freebsd.org
Subject: Re: PPP - why set CLOCAL for server ('-direct' mode) ?
Message-ID: <5v7s4q$4ne@news.itfs.nsk.su>
References: <199709110238.TAA23795@usr05.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert <tlambert@primenet.com> wrote:
> > (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 ?
> 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.
> An alternative implementation would have a host open succeed with
> an O_NDELAY flag on the open, but not put the fd in async mode.
So the problem (with me) is in (my) interpretation
of '-direct' mode - I suppose (as mentioned - but not defined - in
ppp manual) that in this case 'ppp' works with 'stdin' and 'stdout'
and it is not ppp's task to talk with 'modem' (there can be no
modem at all on the 'stdin/stdout' ?).
But then I must ask myself - if this are general
'stdin/stdout' files - what the hell does 'CLOCAL' means
for them ?
Now I use a compromise - I've patched my 'ppp' and
after that it's behavior is more suitable for my purposes
(at least ppp process on my - server - side of a link
sees the CD drop and exits).
N.Dudorov
P.S. Although I have no patches and therefore no rights to
criticize - but (;-)
man ppp
gives no formal definitions for (listed at synopsis line)
flags. They are only explained in the appropriate 'usage'
sections of manual.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5v7s4q$4ne>
