Cosmetic: Merge the show vj' command into show ipcp'

and make it prettier.
This commit is contained in:
Brian Somers 1998-02-02 19:32:31 +00:00
parent 7a6f872047
commit 42e91bc7b3
3 changed files with 15 additions and 25 deletions

View File

@ -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},

View File

@ -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,26 +144,30 @@ 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, " My Address: %s/%d\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",
fprintf(VarTerm, " His Address: %s/%d\n",
inet_ntoa(IpcpInfo.DefHisAddress.ipaddr),
IpcpInfo.DefHisAddress.width);
if (IpcpInfo.HaveTriggerAddress)
fprintf(VarTerm, " Negotiation(trigger): %s\n",
fprintf(VarTerm, " Negotiation(trigger): %s\n",
inet_ntoa(IpcpInfo.TriggerAddress));
else
fprintf(VarTerm, " Negotiation(trigger): MYADDR\n");
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)
{

View File

@ -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);