summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/pap.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/pap.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/pap.c')
-rw-r--r--usr.sbin/ppp/pap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ppp/pap.c b/usr.sbin/ppp/pap.c
index a76fc31..7e7bdc6 100644
--- a/usr.sbin/ppp/pap.c
+++ b/usr.sbin/ppp/pap.c
@@ -18,7 +18,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: pap.c,v 1.3 1995/05/30 03:50:53 rgrimes Exp $
+ * $Id: pap.c,v 1.4 1996/01/30 11:08:45 dfr Exp $
*
* TODO:
*/
@@ -54,7 +54,7 @@ int papid;
#ifdef DEBUG
logprintf("namelen = %d, keylen = %d\n", namelen, keylen);
#endif
- LogPrintf(LOG_PHASE, "PAP: %s (%s)\n", VarAuthName, VarAuthKey);
+ LogPrintf(LOG_PHASE_BIT, "PAP: %s (%s)\n", VarAuthName, VarAuthKey);
lh.code = PAP_REQUEST;
lh.id = papid;
lh.length = htons(plen + sizeof(struct fsmheader));
@@ -91,7 +91,7 @@ int code;
cp = MBUF_CTOP(bp) + sizeof(struct fsmheader);
*cp++ = mlen;
bcopy(message, cp, mlen);
- LogPrintf(LOG_PHASE, "PapOutput: %s\n", papcodes[code]);
+ LogPrintf(LOG_PHASE_BIT, "PapOutput: %s\n", papcodes[code]);
HdlcOutput(PRI_LINK, PROTO_PAP, bp);
}
@@ -128,7 +128,7 @@ struct mbuf *bp;
if (len >= ntohs(php->length)) {
if (php->code < PAP_REQUEST || php->code > PAP_NAK)
php->code = 0;
- LogPrintf(LOG_PHASE, "PapInput: %s\n", papcodes[php->code]);
+ LogPrintf(LOG_PHASE_BIT, "PapInput: %s\n", papcodes[php->code]);
switch (php->code) {
case PAP_REQUEST:
@@ -148,7 +148,7 @@ struct mbuf *bp;
cp = (u_char *)(php + 1);
len = *cp++;
cp[len] = 0;
- LogPrintf(LOG_PHASE, "Received PAP_ACK (%s)\n", cp);
+ LogPrintf(LOG_PHASE_BIT, "Received PAP_ACK (%s)\n", cp);
if (lcp->auth_iwait == PROTO_PAP) {
lcp->auth_iwait = 0;
if (lcp->auth_ineed == 0)
@@ -160,7 +160,7 @@ struct mbuf *bp;
cp = (u_char *)(php + 1);
len = *cp++;
cp[len] = 0;
- LogPrintf(LOG_PHASE, "Received PAP_NAK (%s)\n", cp);
+ LogPrintf(LOG_PHASE_BIT, "Received PAP_NAK (%s)\n", cp);
LcpClose();
break;
}
OpenPOWER on IntegriCloud