summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/phase.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/phase.c')
-rw-r--r--usr.sbin/ppp/phase.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/usr.sbin/ppp/phase.c b/usr.sbin/ppp/phase.c
index 63695f7..4b6d175 100644
--- a/usr.sbin/ppp/phase.c
+++ b/usr.sbin/ppp/phase.c
@@ -1,5 +1,5 @@
/*
- * $Id: phase.c,v 1.2 1997/10/29 01:19:50 brian Exp $
+ * $Id: phase.c,v 1.3 1997/11/22 03:37:43 brian Exp $
*/
#include <sys/param.h>
@@ -30,6 +30,20 @@ static const char *PhaseNames[] = {
"Dead", "Establish", "Authenticate", "Network", "Terminate"
};
+static const char *
+Auth2Nam(u_short auth)
+{
+ switch (auth) {
+ case PROTO_PAP:
+ return "PAP";
+ case PROTO_CHAP:
+ return "CHAP";
+ case 0:
+ return "none";
+ }
+ return "unknown";
+}
+
void
NewPhase(int new)
{
@@ -42,7 +56,8 @@ NewPhase(int new)
lcp->auth_ineed = lcp->want_auth;
lcp->auth_iwait = lcp->his_auth;
if (lcp->his_auth || lcp->want_auth) {
- LogPrintf(LogPHASE, " his = %x, mine = %x\n", lcp->his_auth, lcp->want_auth);
+ LogPrintf(LogPHASE, " his = %s, mine = %s\n",
+ Auth2Nam(lcp->his_auth), Auth2Nam(lcp->want_auth));
if (lcp->his_auth == PROTO_PAP)
StartAuthChallenge(&AuthPapInfo);
if (lcp->want_auth == PROTO_CHAP)
OpenPOWER on IntegriCloud