Cosmetic: Merge the show vj' command into
show ipcp'
and make it prettier.
This commit is contained in:
parent
7a6f872047
commit
42e91bc7b3
@ -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.4 1998/01/31 02:48:16 brian Exp $
|
||||
* $Id: command.c,v 1.131.2.5 1998/02/02 19:32:04 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
@ -654,8 +654,6 @@ static struct cmdtab const ShowCommands[] = {
|
||||
"Show STOPPED timeout", "show stopped"},
|
||||
{"version", NULL, ShowVersion, LOCAL_NO_AUTH | LOCAL_AUTH,
|
||||
"Show version string", "show version"},
|
||||
{"vj", NULL, ShowInitVJ, LOCAL_AUTH,
|
||||
"Show VJ values", "show vj"},
|
||||
{"help", "?", HelpCommand, LOCAL_NO_AUTH | LOCAL_AUTH,
|
||||
"Display this message", "show help|? [command]", ShowCommands},
|
||||
{NULL, NULL, NULL},
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ipcp.c,v 1.50.2.4 1998/01/31 02:48:20 brian Exp $
|
||||
* $Id: ipcp.c,v 1.50.2.5 1998/02/02 19:32:08 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o More RFC1772 backwoard compatibility
|
||||
@ -144,17 +144,18 @@ ReportIpcpStatus(struct cmdargs const *arg)
|
||||
fprintf(VarTerm, "%s [%s]\n", IpcpInfo.fsm.name,
|
||||
StateNames[IpcpInfo.fsm.state]);
|
||||
if (IpcpInfo.fsm.state == ST_OPENED) {
|
||||
fprintf(VarTerm, " his side: %s, %s\n",
|
||||
fprintf(VarTerm, " His side: %s, %s\n",
|
||||
inet_ntoa(IpcpInfo.his_ipaddr), vj2asc(IpcpInfo.his_compproto));
|
||||
fprintf(VarTerm, " my side: %s, %s\n",
|
||||
fprintf(VarTerm, " My side: %s, %s\n",
|
||||
inet_ntoa(IpcpInfo.want_ipaddr), vj2asc(IpcpInfo.want_compproto));
|
||||
}
|
||||
|
||||
fprintf(VarTerm, "Defaults:\n");
|
||||
fprintf(VarTerm, "\nDefaults:\n");
|
||||
fprintf(VarTerm, " My Address: %s/%d\n",
|
||||
inet_ntoa(IpcpInfo.DefMyAddress.ipaddr), IpcpInfo.DefMyAddress.width);
|
||||
if (iplist_isvalid(&IpcpInfo.DefHisChoice))
|
||||
fprintf(VarTerm, " His Address: %s\n", IpcpInfo.DefHisChoice.src);
|
||||
fprintf(VarTerm, " His Address: %s\n",
|
||||
IpcpInfo.DefHisChoice.src);
|
||||
else
|
||||
fprintf(VarTerm, " His Address: %s/%d\n",
|
||||
inet_ntoa(IpcpInfo.DefHisAddress.ipaddr),
|
||||
@ -164,6 +165,9 @@ ReportIpcpStatus(struct cmdargs const *arg)
|
||||
inet_ntoa(IpcpInfo.TriggerAddress));
|
||||
else
|
||||
fprintf(VarTerm, " Negotiation(trigger): MYADDR\n");
|
||||
fprintf(VarTerm, " Initial VJ slots: %d\n", IpcpInfo.VJInitSlots);
|
||||
fprintf(VarTerm, " Initial VJ compression: %s\n",
|
||||
IpcpInfo.VJInitComp ? "on" : "off");
|
||||
|
||||
fprintf(VarTerm, "\n");
|
||||
throughput_disp(&IpcpInfo.throughput, VarTerm);
|
||||
@ -213,17 +217,6 @@ SetInitVJ(struct cmdargs const *args)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
ShowInitVJ(struct cmdargs const *args)
|
||||
{
|
||||
if (VarTerm) {
|
||||
fprintf(VarTerm, "Initial slots: %d\n", IpcpInfo.VJInitSlots);
|
||||
fprintf(VarTerm, "Initial compression: %s\n",
|
||||
IpcpInfo.VJInitComp ? "on" : "off");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
IpcpInit(struct bundle *bundle, struct link *l)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ipcp.h,v 1.18.2.6 1998/01/31 02:48:21 brian Exp $
|
||||
* $Id: ipcp.h,v 1.18.2.7 1998/02/02 19:32:08 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -84,5 +84,4 @@ extern void IpcpAddInOctets(int);
|
||||
extern void IpcpAddOutOctets(int);
|
||||
extern int UseHisaddr(struct bundle *, const char *, int);
|
||||
extern int SetInitVJ(struct cmdargs const *);
|
||||
extern int ShowInitVJ(struct cmdargs const *);
|
||||
extern void IpcpDown(void);
|
||||
|
Loading…
Reference in New Issue
Block a user