summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lqr.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-05-11 20:48:42 +0000
committerphk <phk@FreeBSD.org>1996-05-11 20:48:42 +0000
commit324cb686d3d54b8549afe3d7b81a3727b677b86f (patch)
tree2eb51c7c6b624bca2272b302022a11fdd68760c6 /usr.sbin/ppp/lqr.c
parent3683fd396bd99a9421c45c0f109d8430e49a7e4c (diff)
downloadFreeBSD-src-324cb686d3d54b8549afe3d7b81a3727b677b86f.zip
FreeBSD-src-324cb686d3d54b8549afe3d7b81a3727b677b86f.tar.gz
Here is a diff of /usr/src/usr.sbin/ppp against current. The diffs
add some logging functionality which I find very useful. 'set debug link' will record just link up/down and address assignments. 'set debug connect' will record the entire chat dialog 'set debug carrier' will record just chat lines including 'CARRIER' (so that I can be sure I'm getting a 28.8 line). There was a global change required to permit LogPrintf to take a bit mask instead of a bit position value (to permit logging some events on either of two flags, so that no change in 'set debug lcp' would result from the code supporting 'link'. Thus the diffs are rather long for such a small change. The man page is also touched. Oh, and there was a slight syntax problem in route.c Reviewed by: phk Submitted by: Tony Kimball <alk@Think.COM>
Diffstat (limited to 'usr.sbin/ppp/lqr.c')
-rw-r--r--usr.sbin/ppp/lqr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c
index da8a798..f71f76e 100644
--- a/usr.sbin/ppp/lqr.c
+++ b/usr.sbin/ppp/lqr.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lqr.c,v 1.5 1996/01/11 17:48:52 phk Exp $
+ * $Id: lqr.c,v 1.6 1996/01/30 11:08:37 dfr Exp $
*
* o LQR based on RFC1333
*
@@ -60,7 +60,7 @@ SendEchoReq()
lqr = &lqrdata;
lqr->magic = htonl(LcpInfo.want_magic);
lqr->signature = htonl(SIGNATURE);
- LogPrintf(LOG_LQM, "Send echo LQR [%d]\n", echoseq);
+ LogPrintf(LOG_LQM_BIT, "Send echo LQR [%d]\n", echoseq);
lqr->sequence = htonl(echoseq++);
FsmOutput(fp, CODE_ECHOREQ, fp->reqid++,
(u_char *)lqr, sizeof(struct echolqr));
@@ -78,7 +78,7 @@ struct mbuf *bp;
lqr = (struct echolqr *)MBUF_CTOP(bp);
if (htonl(lqr->signature) == SIGNATURE) {
seq = ntohl(lqr->sequence);
- LogPrintf(LOG_LQM, "Got echo LQR [%d]\n", ntohl(lqr->sequence));
+ LogPrintf(LOG_LQM_BIT, "Got echo LQR [%d]\n", ntohl(lqr->sequence));
gotseq = seq;
}
}
@@ -108,7 +108,7 @@ SendLqrReport()
/*
* XXX: Should implement LQM strategy
*/
- LogPrintf(LOG_PHASE, "** 1 Too many ECHO packets are lost. **\n");
+ LogPrintf(LOG_PHASE_BIT, "** 1 Too many ECHO packets are lost. **\n");
lqmmethod = 0; /* Prevent rcursion via LcpClose() */
LcpClose();
} else {
@@ -118,7 +118,7 @@ SendLqrReport()
}
} else if (lqmmethod & LQM_ECHO) {
if (echoseq - gotseq > 5) {
- LogPrintf(LOG_PHASE, "** 2 Too many ECHO packets are lost. **\n");
+ LogPrintf(LOG_PHASE_BIT, "** 2 Too many ECHO packets are lost. **\n");
lqmmethod = 0; /* Prevent rcursion via LcpClose() */
LcpClose();
} else
@@ -193,7 +193,7 @@ StartLqm()
if (Enabled(ConfLqr))
lqmmethod |= LQM_LQR;
StopTimer(&LqrTimer);
- LogPrintf(LOG_LQM, "LQM method = %d\n", lqmmethod);
+ LogPrintf(LOG_LQM_BIT, "LQM method = %d\n", lqmmethod);
if (lcp->his_lqrperiod || lcp->want_lqrperiod) {
/*
@@ -206,10 +206,10 @@ StartLqm()
LqrTimer.func = SendLqrReport;
SendLqrReport();
StartTimer(&LqrTimer);
- LogPrintf(LOG_LQM, "Will send LQR every %d.%d secs\n",
+ LogPrintf(LOG_LQM_BIT, "Will send LQR every %d.%d secs\n",
period/100, period % 100);
} else {
- LogPrintf(LOG_LQM, "LQR is not activated.\n");
+ LogPrintf(LOG_LQM_BIT, "LQR is not activated.\n");
}
}
@@ -223,12 +223,12 @@ void
StopLqr(method)
int method;
{
- LogPrintf(LOG_LQM, "StopLqr method = %x\n", method);
+ LogPrintf(LOG_LQM_BIT, "StopLqr method = %x\n", method);
if (method == LQM_LQR)
- LogPrintf(LOG_LQM, "Stop sending LQR, Use LCP ECHO instead.\n");
+ LogPrintf(LOG_LQM_BIT, "Stop sending LQR, Use LCP ECHO instead.\n");
if (method == LQM_ECHO)
- LogPrintf(LOG_LQM, "Stop sending LCP ECHO.\n");
+ LogPrintf(LOG_LQM_BIT, "Stop sending LCP ECHO.\n");
lqmmethod &= ~method;
if (lqmmethod)
SendLqrReport();
OpenPOWER on IntegriCloud