aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/ccp.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-04-03 19:24:07 +0000
committerBrian Somers <brian@FreeBSD.org>1998-04-03 19:24:07 +0000
commitcd9647a100862f877a4459adffd24751a7026122 (patch)
tree3ebadb7aae17c2b023f39ca17d20387995f0146f /usr.sbin/ppp/ccp.c
parent3b0f8d2ed641ceeded11c0d3f253b0cacbf00880 (diff)
downloadsrc-cd9647a100862f877a4459adffd24751a7026122.tar.gz
src-cd9647a100862f877a4459adffd24751a7026122.zip
o Move default MRU, MTU, ACCMAP and OPENMODE config values into
struct lcp and display them in `show lcp'. o Remove `show mru' and `show mtu' and make the data part of `show lcp'. Also merge `set m[tr]u' and `set openmode' implementations into the SetVariable function. o `set timeout' only accepts the idle timer value as an argument. o Move our lqr period into struct lcp, and create a `set lqrperiod' command. Display it in `show lcp'. o Remove VarRetryTimeout, and implement it at the LCP, PAP, CHAP, CCP and IPCP levels, creating individual `set XXXretry' commands for each. They must be separate because they have different context requirements in multilink mode. o Display default config values in `show ccp'. o Tart the man page up a bit (wrt PPP/TCP, compression and LQR) and explain the new commands.
Notes
Notes: svn path=/cvs2svn/branches/MP/; revision=35010
Diffstat (limited to 'usr.sbin/ppp/ccp.c')
-rw-r--r--usr.sbin/ppp/ccp.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 059071f4f5e5..dc7f44f95f27 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ccp.c,v 1.30.2.28 1998/03/24 18:46:37 brian Exp $
+ * $Id: ccp.c,v 1.30.2.29 1998/04/03 19:21:08 brian Exp $
*
* TODO:
* o Support other compression protocols
@@ -135,15 +135,22 @@ static const struct ccp_algorithm *algorithm[] = {
int
ccp_ReportStatus(struct cmdargs const *arg)
{
- struct ccp *ccp = &ChooseLink(arg)->ccp;
+ struct link *l = ChooseLink(arg);
+ struct ccp *ccp = &l->ccp;
- prompt_Printf(&prompt, "%s [%s]\n", ccp->fsm.name,
+ prompt_Printf(&prompt, "%s: %s [%s]\n", l->name, ccp->fsm.name,
State2Nam(ccp->fsm.state));
- prompt_Printf(&prompt, "My protocol = %s, His protocol = %s\n",
+ prompt_Printf(&prompt, " My protocol = %s, His protocol = %s\n",
protoname(ccp->my_proto), protoname(ccp->his_proto));
- prompt_Printf(&prompt, "Output: %ld --> %ld, Input: %ld --> %ld\n",
+ prompt_Printf(&prompt, " Output: %ld --> %ld, Input: %ld --> %ld\n",
ccp->uncompout, ccp->compout,
ccp->compin, ccp->uncompin);
+
+ prompt_Printf(&prompt, "\n Defaults: ");
+ prompt_Printf(&prompt, "deflate windows: ");
+ prompt_Printf(&prompt, "incoming = %d, ", ccp->cfg.deflate.in.winsize);
+ prompt_Printf(&prompt, "outgoing = %d\n", ccp->cfg.deflate.out.winsize);
+ prompt_Printf(&prompt, " FSM retry = %us\n", ccp->cfg.fsmretry);
return 0;
}
@@ -157,8 +164,11 @@ ccp_Init(struct ccp *ccp, struct bundle *bundle, struct link *l,
fsm_Init(&ccp->fsm, "CCP", PROTO_CCP, 1, CCP_MAXCODE, 10, LogCCP,
bundle, l, parent, &ccp_Callbacks, timer_names);
+
ccp->cfg.deflate.in.winsize = 0;
ccp->cfg.deflate.out.winsize = 15;
+ ccp->cfg.fsmretry = DEF_FSMRETRY;
+
ccp_Setup(ccp);
}
@@ -183,7 +193,9 @@ static void
CcpInitRestartCounter(struct fsm *fp)
{
/* Set fsm timer load */
- fp->FsmTimer.load = VarRetryTimeout * SECTICKS;
+ struct ccp *ccp = fsm2ccp(fp);
+
+ fp->FsmTimer.load = ccp->cfg.fsmretry * SECTICKS;
fp->restart = 5;
}