diff options
| author | Brian Somers <brian@FreeBSD.org> | 1999-02-16 00:16:56 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 1999-02-16 00:16:56 +0000 |
| commit | 6b4286e0f546e248c78cebda8bb680bf51b26ca0 (patch) | |
| tree | fba30bbd229822f0ba4b836946ccec4ae3676ada /usr.sbin/ppp/command.c | |
| parent | fe7627280b1277f80fe58f179023c5f13ecbf321 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/ppp/command.c')
| -rw-r--r-- | usr.sbin/ppp/command.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 00486af68625..e53ab98a1516 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.179 1999/01/28 09:40:15 brian Exp $ + * $Id: command.c,v 1.180 1999/02/11 10:14:07 brian Exp $ * */ #include <sys/param.h> @@ -119,6 +119,7 @@ #define VAR_SENDPIPE 27 #define VAR_RECVPIPE 28 #define VAR_RADIUS 29 +#define VAR_CD 30 /* ``accept|deny|disable|enable'' masks */ #define NEG_HISMASK (1) @@ -137,8 +138,8 @@ #define NEG_VJCOMP 49 #define NEG_DNS 50 -const char Version[] = "2.1"; -const char VersionDate[] = "$Date: 1999/01/28 09:40:15 $"; +const char Version[] = "2.11"; +const char VersionDate[] = "$Date: 1999/02/11 10:14:07 $"; static int ShowCommand(struct cmdargs const *); static int TerminalCommand(struct cmdargs const *); @@ -1711,6 +1712,19 @@ SetVariable(struct cmdargs const *arg) } break; #endif + + case VAR_CD: + if (*argp) { + long_val = atol(argp); + if (long_val < 0) + long_val = 0; + cx->physical->cfg.cd.delay = long_val; + cx->physical->cfg.cd.required = argp[strlen(argp)-1] == '!'; + } else { + cx->physical->cfg.cd.delay = DEF_CDDELAY; + cx->physical->cfg.cd.required = 0; + } + break; } return err ? 1 : 0; @@ -1749,6 +1763,8 @@ static struct cmdtab const SetCommands[] = { (const void *)VAR_CBCP}, {"ccpretry", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX_OPT, "FSM retry period", "set ccpretry value", (const void *)VAR_CCPRETRY}, + {"cd", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, "Carrier delay requirement", + "set cd value[!]", (const void *)VAR_CD}, {"chapretry", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, "CHAP retry period", "set chapretry value", (const void *)VAR_CHAPRETRY}, {"choked", NULL, SetVariable, LOCAL_AUTH, |
