summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/physical.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-11-26 22:44:33 +0000
committerbrian <brian@FreeBSD.org>1999-11-26 22:44:33 +0000
commitf0003f34563b650e7d94531962fc8f09b2a5f5ec (patch)
tree32e3392d0d02f834be36bca1b87a8e39b935837e /usr.sbin/ppp/physical.c
parent9e78c04cff601ba0a8897f3dc1b3740190596105 (diff)
downloadFreeBSD-src-f0003f34563b650e7d94531962fc8f09b2a5f5ec.zip
FreeBSD-src-f0003f34563b650e7d94531962fc8f09b2a5f5ec.tar.gz
Change ``set cd'' so that its default value is device specific. The
default is still 1 second for ttys, but is now 6 seconds for i4b (ISDN) devices and 5 seconds for ethernet (PPPoE) devices.
Diffstat (limited to 'usr.sbin/ppp/physical.c')
-rw-r--r--usr.sbin/ppp/physical.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c
index f8915c9..e402633 100644
--- a/usr.sbin/ppp/physical.c
+++ b/usr.sbin/ppp/physical.c
@@ -188,8 +188,8 @@ physical_Create(struct datalink *dl, int type)
p->cfg.parity = CS8;
memcpy(p->cfg.devlist, MODEM_LIST, sizeof MODEM_LIST);
p->cfg.ndev = NMODEMS;
- p->cfg.cd.necessity = CD_VARIABLE;
- p->cfg.cd.delay = DEF_CDDELAY;
+ p->cfg.cd.necessity = CD_DEFAULT;
+ p->cfg.cd.delay = 0; /* reconfigured or device specific default */
lcp_Init(&p->link.lcp, dl->bundle, &p->link, &dl->fsmp);
ccp_Init(&p->link.ccp, dl->bundle, &p->link, &dl->fsmp);
@@ -411,6 +411,7 @@ int
physical_ShowStatus(struct cmdargs const *arg)
{
struct physical *p = arg->cx->physical;
+ struct cd *cd;
const char *dev;
int n;
@@ -476,9 +477,12 @@ physical_ShowStatus(struct cmdargs const *arg)
prompt_Printf(arg->prompt, ", CTS/RTS %s\n", (p->cfg.rts_cts ? "on" : "off"));
prompt_Printf(arg->prompt, " CD check delay: ");
- if (p->cfg.cd.necessity == CD_NOTREQUIRED)
+ cd = p->handler ? &p->handler->cd : &p->cfg.cd;
+ if (cd->necessity == CD_NOTREQUIRED)
prompt_Printf(arg->prompt, "no cd");
- else {
+ else if (p->cfg.cd.necessity == CD_DEFAULT) {
+ prompt_Printf(arg->prompt, "device specific");
+ } else {
prompt_Printf(arg->prompt, "%d second%s", p->cfg.cd.delay,
p->cfg.cd.delay == 1 ? "" : "s");
if (p->cfg.cd.necessity == CD_REQUIRED)
OpenPOWER on IntegriCloud