Remove `show timeout'' and
show auth'' and add
`show bundle''.
Mention ``show timer'' in the man page.
This commit is contained in:
parent
99294c8bfa
commit
c08717df31
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bundle.c,v 1.1.2.43 1998/04/07 23:45:41 brian Exp $
|
||||
* $Id: bundle.c,v 1.1.2.44 1998/04/10 13:19:01 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -850,6 +850,29 @@ bundle_ShowLinks(struct cmdargs const *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
bundle_ShowStatus(struct cmdargs const *arg)
|
||||
{
|
||||
int remaining;
|
||||
|
||||
prompt_Printf(arg->prompt, "Phase %s\n", bundle_PhaseName(arg->bundle));
|
||||
prompt_Printf(arg->prompt, " Interface: %s\n", arg->bundle->dev);
|
||||
|
||||
prompt_Printf(arg->prompt, "\nDefaults:\n");
|
||||
prompt_Printf(arg->prompt, " Auth name: %s\n", arg->bundle->cfg.auth.name);
|
||||
prompt_Printf(arg->prompt, " Idle Timer: ");
|
||||
if (arg->bundle->cfg.idle_timeout) {
|
||||
prompt_Printf(arg->prompt, "%ds", arg->bundle->cfg.idle_timeout);
|
||||
remaining = bundle_RemainingIdleTime(arg->bundle);
|
||||
if (remaining != -1)
|
||||
prompt_Printf(arg->prompt, " (%ds remaining)", remaining);
|
||||
prompt_Printf(arg->prompt, "\n");
|
||||
} else
|
||||
prompt_Printf(arg->prompt, "disabled\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
bundle_IdleTimeout(void *v)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bundle.h,v 1.1.2.26 1998/04/05 22:48:02 brian Exp $
|
||||
* $Id: bundle.h,v 1.1.2.27 1998/04/10 13:19:01 brian Exp $
|
||||
*/
|
||||
|
||||
#define PHASE_DEAD 0 /* Link is dead */
|
||||
@ -103,6 +103,7 @@ extern void bundle_LinkClosed(struct bundle *, struct datalink *);
|
||||
|
||||
extern int bundle_FillQueues(struct bundle *);
|
||||
extern int bundle_ShowLinks(struct cmdargs const *);
|
||||
extern int bundle_ShowStatus(struct cmdargs const *);
|
||||
extern void bundle_StartIdleTimer(struct bundle *);
|
||||
extern void bundle_SetIdleTimer(struct bundle *, int);
|
||||
extern void bundle_StopIdleTimer(struct bundle *);
|
||||
|
@ -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.131.2.57 1998/04/10 13:19:03 brian Exp $
|
||||
* $Id: command.c,v 1.131.2.58 1998/04/10 23:51:27 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
@ -81,8 +81,6 @@
|
||||
#include "chap.h"
|
||||
#include "datalink.h"
|
||||
|
||||
static const char *HIDDEN = "********";
|
||||
|
||||
static int ShowCommand(struct cmdargs const *);
|
||||
static int TerminalCommand(struct cmdargs const *);
|
||||
static int QuitCommand(struct cmdargs const *);
|
||||
@ -431,23 +429,6 @@ ShowEscape(struct cmdargs const *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ShowTimeout(struct cmdargs const *arg)
|
||||
{
|
||||
int remaining;
|
||||
|
||||
prompt_Printf(arg->prompt, "Idle Timer: ");
|
||||
if (arg->bundle->cfg.idle_timeout) {
|
||||
prompt_Printf(arg->prompt, "%ds\n", arg->bundle->cfg.idle_timeout);
|
||||
remaining = bundle_RemainingIdleTime(arg->bundle);
|
||||
if (remaining != -1)
|
||||
prompt_Printf(arg->prompt, "Remaining: %ds\n", remaining);
|
||||
} else
|
||||
prompt_Printf(arg->prompt, "disabled\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ShowTimerList(struct cmdargs const *arg)
|
||||
{
|
||||
@ -477,19 +458,11 @@ ShowStopped(struct cmdargs const *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ShowAuthKey(struct cmdargs const *arg)
|
||||
{
|
||||
prompt_Printf(arg->prompt, "AuthName = %s\n", arg->bundle->cfg.auth.name);
|
||||
prompt_Printf(arg->prompt, "AuthKey = %s\n", HIDDEN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ShowVersion(struct cmdargs const *arg)
|
||||
{
|
||||
static char VarVersion[] = "PPP Version 2.0-beta";
|
||||
static char VarLocalVersion[] = "$Date: 1998/04/10 13:19:03 $";
|
||||
static char VarLocalVersion[] = "$Date: 1998/04/10 23:51:27 $";
|
||||
|
||||
prompt_Printf(arg->prompt, "%s - %s \n", VarVersion, VarLocalVersion);
|
||||
return 0;
|
||||
@ -526,8 +499,8 @@ ShowMSExt(struct cmdargs const *arg)
|
||||
#endif
|
||||
|
||||
static struct cmdtab const ShowCommands[] = {
|
||||
{"auth", NULL, ShowAuthKey, LOCAL_AUTH,
|
||||
"Show auth details", "show auth"},
|
||||
{"bundle", NULL, bundle_ShowStatus, LOCAL_AUTH,
|
||||
"Show bundle details", "show bundle"},
|
||||
{"ccp", NULL, ccp_ReportStatus, LOCAL_AUTH | LOCAL_CX_OPT,
|
||||
"Show CCP status", "show cpp"},
|
||||
{"compress", NULL, ReportCompress, LOCAL_AUTH,
|
||||
@ -560,8 +533,6 @@ static struct cmdtab const ShowCommands[] = {
|
||||
"Show routing table", "show route"},
|
||||
{"stopped", NULL, ShowStopped, LOCAL_AUTH | LOCAL_CX,
|
||||
"Show STOPPED timeout", "show stopped"},
|
||||
{"timeout", NULL, ShowTimeout, LOCAL_AUTH,
|
||||
"Show Idle timeout", "show timeout"},
|
||||
{"timers", NULL, ShowTimerList, LOCAL_AUTH,
|
||||
"Show alarm timers", "show timers"},
|
||||
{"version", NULL, ShowVersion, LOCAL_NO_AUTH | LOCAL_AUTH,
|
||||
@ -706,7 +677,7 @@ RunCommand(struct bundle *bundle, int argc, char const *const *argv,
|
||||
if (n < sizeof buf - 1 && f)
|
||||
buf[n++] = ' ';
|
||||
if (arghidden(argc, argv, f))
|
||||
strncpy(buf+n, HIDDEN, sizeof buf - n - 1);
|
||||
strncpy(buf+n, "********", sizeof buf - n - 1);
|
||||
else
|
||||
strncpy(buf+n, argv[f], sizeof buf - n - 1);
|
||||
n += strlen(buf+n);
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id: ppp.8,v 1.97.2.13 1998/04/05 22:48:25 brian Exp $
|
||||
.\" $Id: ppp.8,v 1.97.2.14 1998/04/10 13:19:17 brian Exp $
|
||||
.Dd 20 September 1995
|
||||
.Os FreeBSD
|
||||
.Dt PPP 8
|
||||
@ -989,7 +989,7 @@ See
|
||||
.Pa /etc/ppp/ppp.conf.example .
|
||||
.Sh SETTING THE IDLE TIMER
|
||||
To check/set the idle timer, use the
|
||||
.Dq show timeout
|
||||
.Dq show bundle
|
||||
and
|
||||
.Dq set timeout
|
||||
commands:
|
||||
@ -2600,8 +2600,8 @@ command if you wish processing to happen in the background.
|
||||
.It show Ar var
|
||||
This command allows the user to examine the following:
|
||||
.Bl -tag -width 20
|
||||
.It show auth
|
||||
Show the current authname.
|
||||
.It show bundle
|
||||
Show the current bundle settings.
|
||||
.It show ccp
|
||||
Show the current CCP compression statistics.
|
||||
.It show compress
|
||||
@ -2636,8 +2636,8 @@ Show current protocol totals.
|
||||
Show the current routing tables.
|
||||
.It show stopped
|
||||
Show the current stopped timeouts.
|
||||
.It show timeout
|
||||
Show the current idle timeout value.
|
||||
.It show timer
|
||||
Show the active alarm timers.
|
||||
.It show version
|
||||
Show the current version number of
|
||||
.Nm ppp .
|
||||
|
Loading…
x
Reference in New Issue
Block a user