diff options
| author | Brian Somers <brian@FreeBSD.org> | 1998-07-29 18:21:17 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 1998-07-29 18:21:17 +0000 |
| commit | ba23f3976a2c4e3258939afde586d659a7c99dc3 (patch) | |
| tree | 0bdb7b2704ec781a9146b0eb54dc97824ac29beb /usr.sbin/ppp/command.c | |
| parent | 50fa554e425f8f56a0c27853ea4072f93923748e (diff) | |
Notes
Diffstat (limited to 'usr.sbin/ppp/command.c')
| -rw-r--r-- | usr.sbin/ppp/command.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 69e5365320ea..d78c7430f434 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.155 1998/07/12 00:30:18 brian Exp $ + * $Id: command.c,v 1.156 1998/07/28 21:54:52 brian Exp $ * */ #include <sys/types.h> @@ -122,7 +122,7 @@ #define NEG_DNS 50 const char Version[] = "2.0"; -const char VersionDate[] = "$Date: 1998/07/12 00:30:18 $"; +const char VersionDate[] = "$Date: 1998/07/28 21:54:52 $"; static int ShowCommand(struct cmdargs const *); static int TerminalCommand(struct cmdargs const *); @@ -306,7 +306,8 @@ DialCommand(struct cmdargs const *arg) if (arg->argc > arg->argn && (res = LoadCommand(arg)) != 0) return res; - bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL); + bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, + arg->cmd->args ? 1 : 0); return 0; } @@ -456,7 +457,11 @@ static struct cmdtab const Commands[] = { {"deny", NULL, NegotiateCommand, LOCAL_AUTH | LOCAL_CX_OPT, "Deny option request", "deny option .."}, {"dial", "call", DialCommand, LOCAL_AUTH | LOCAL_CX_OPT, - "Dial and login", "dial|call [remote]"}, + "Dial and login", "dial|call [remote]", NULL}, + {NULL, "dial!", DialCommand, LOCAL_AUTH | LOCAL_CX_OPT, + "Dial and login", "dial! [remote]", (void *)1}, + {NULL, "call!", DialCommand, LOCAL_AUTH | LOCAL_CX_OPT, + "Dial and login", "call! [remote]", (void *)1}, {"disable", NULL, NegotiateCommand, LOCAL_AUTH | LOCAL_CX_OPT, "Disable option", "disable option .."}, {"down", NULL, DownCommand, LOCAL_AUTH | LOCAL_CX_OPT, @@ -468,7 +473,9 @@ static struct cmdtab const Commands[] = { {"load", NULL, LoadCommand, LOCAL_AUTH | LOCAL_CX_OPT, "Load settings", "load [remote]"}, {"open", NULL, OpenCommand, LOCAL_AUTH | LOCAL_CX_OPT, - "Open an FSM", "open [lcp|ccp|ipcp]"}, + "Open an FSM", "open [lcp|ccp|ipcp]", NULL}, + {NULL, "open!", OpenCommand, LOCAL_AUTH | LOCAL_CX_OPT, + "Open an FSM", "open! [lcp|ccp|ipcp]", (void *)1}, {"passwd", NULL, PasswdCommand, LOCAL_NO_AUTH, "Password for manipulation", "passwd LocalPassword"}, {"quit", "bye", QuitCommand, LOCAL_AUTH | LOCAL_NO_AUTH, @@ -834,7 +841,8 @@ static int OpenCommand(struct cmdargs const *arg) { if (arg->argc == arg->argn) - bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL); + bundle_Open(arg->bundle, arg->cx ? arg->cx->name : NULL, PHYS_ALL, + arg->cmd->args ? 1 : 0); else if (arg->argc == arg->argn + 1) { if (!strcasecmp(arg->argv[arg->argn], "lcp")) { struct datalink *cx = arg->cx ? @@ -843,7 +851,8 @@ OpenCommand(struct cmdargs const *arg) if (cx->physical->link.lcp.fsm.state == ST_OPENED) fsm_Reopen(&cx->physical->link.lcp.fsm); else - bundle_Open(arg->bundle, cx->name, PHYS_ALL); + bundle_Open(arg->bundle, cx->name, PHYS_ALL, + arg->cmd->args ? 1 : 0); } else log_Printf(LogWARN, "open lcp: You must specify a link\n"); } else if (!strcasecmp(arg->argv[arg->argn], "ccp")) { @@ -870,7 +879,7 @@ OpenCommand(struct cmdargs const *arg) if (arg->bundle->ncp.ipcp.fsm.state == ST_OPENED) fsm_Reopen(&arg->bundle->ncp.ipcp.fsm); else - bundle_Open(arg->bundle, NULL, PHYS_ALL); + bundle_Open(arg->bundle, NULL, PHYS_ALL, arg->cmd->args ? 1 : 0); } else return -1; } else |
