diff --git a/src/netif/ppp/auth.c b/src/netif/ppp/auth.c index 614549d0..abf9d75f 100644 --- a/src/netif/ppp/auth.c +++ b/src/netif/ppp/auth.c @@ -80,16 +80,20 @@ #include #include #include +#if 0 #include #include +#endif #include #if defined(_PATH_LASTLOG) && defined(__linux__) #include #endif +#if 0 #include #include #include +#endif #ifdef HAS_SHADOW @@ -759,8 +763,6 @@ link_established(unit) int i; struct protent *protp; - printf("AUTH: link_established() called"); - /* * Tell higher-level protocols that LCP is up. */ @@ -1525,18 +1527,18 @@ auth_reset(unit) } #if PAP_SUPPORT - printf("neg_upap: %d\n", ao->neg_upap); + PPPDEBUG(LOG_DEBUG, ("neg_upap: %d\n", ao->neg_upap) ); #endif /* PAP_SUPPORT */ #if CHAP_SUPPORT - printf("neg_chap: %d\n", ao->neg_chap); - printf("neg_chap_md5: %d\n", !!(ao->chap_mdtype&MDTYPE_MD5) ); + PPPDEBUG(LOG_DEBUG, ("neg_chap: %d\n", ao->neg_chap) ); + PPPDEBUG(LOG_DEBUG, ("neg_chap_md5: %d\n", !!(ao->chap_mdtype&MDTYPE_MD5)) ); #if MSCHAP_SUPPORT - printf("neg_chap_ms: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT) ); - printf("neg_chap_ms2: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT_V2) ); + PPPDEBUG(LOG_DEBUG, ("neg_chap_ms: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT)) ); + PPPDEBUG(LOG_DEBUG, ("neg_chap_ms2: %d\n", !!(ao->chap_mdtype&MDTYPE_MICROSOFT_V2)) ); #endif /* MSCHAP_SUPPORT */ #endif /* CHAP_SUPPORT */ #if EAP_SUPPORT - printf("neg_eap: %d\n", ao->neg_eap); + PPPDEBUG(LOG_DEBUG, ("neg_eap: %d\n", ao->neg_eap) ); #endif /* EAP_SUPPORT */ #if 0 /* OLD CODE */ @@ -1987,10 +1989,6 @@ get_secret(unit, client, server, secret, secret_len, am_server) strlcpy(rname, ppp_settings.user, sizeof(rname)); strlcpy(secret, ppp_settings.passwd, sizeof(secret)); secret_len = strlen(secret); - - printf("CHAP USER = %s\n", ppp_settings.user); - printf("CHAP PASS = %s\n", ppp_settings.passwd); - printf("CHAP PASS LEN = %s\n", strlen(secret)); */ FILE *f; diff --git a/src/netif/ppp/fsm.c b/src/netif/ppp/fsm.c index fa94ea5f..f3c834e2 100644 --- a/src/netif/ppp/fsm.c +++ b/src/netif/ppp/fsm.c @@ -343,8 +343,6 @@ fsm_input(f, inpacket, l) u_char code, id; int len; - printf("fsm_input: l = %d\n", l); - /* * Parse header (code, id and length). * If packet too short, drop it. @@ -423,8 +421,6 @@ fsm_rconfreq(f, id, inp, len) { int code, reject_if_disagree; - printf("fsm_rconfreq() called, f->state = %d\n", f->state); - switch( f->state ){ case CLOSED: /* Go away, we're closed */ @@ -464,7 +460,6 @@ fsm_rconfreq(f, id, inp, len) /* send the Ack, Nak or Rej to the peer */ fsm_sdata(f, code, id, inp, len); - printf("fsm_rconfreq() code = %d, f->state = %d\n", code, f->state); if (code == CONFACK) { if (f->state == ACKRCVD) { UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ diff --git a/src/netif/ppp/ipcp.c b/src/netif/ppp/ipcp.c index 6d94ec30..0c53f887 100644 --- a/src/netif/ppp/ipcp.c +++ b/src/netif/ppp/ipcp.c @@ -51,12 +51,16 @@ #include #include #include +#if 0 #include +#endif #include #include +#if 0 #include #include #include +#endif #include "ppp.h" diff --git a/src/netif/ppp/lcp.c b/src/netif/ppp/lcp.c index 645da392..bf85bb8c 100644 --- a/src/netif/ppp/lcp.c +++ b/src/netif/ppp/lcp.c @@ -2199,8 +2199,6 @@ lcp_up(f) lcp_options *ao = &lcp_allowoptions[f->unit]; int mtu, mru; - printf("LCP IS UP !\n"); - if (!go->neg_magicnumber) go->magicnumber = 0; if (!ho->neg_magicnumber) diff --git a/src/netif/ppp/polarssl/des.c b/src/netif/ppp/polarssl/des.c index 76b10743..2e2a61c3 100644 --- a/src/netif/ppp/polarssl/des.c +++ b/src/netif/ppp/polarssl/des.c @@ -42,7 +42,7 @@ #include "lwip/opt.h" #if LWIP_INCLUDED_POLARSSL_DES -#include "polarssl/des.h" +#include "des.h" /* * 32-bit integer manipulation macros (big endian) diff --git a/src/netif/ppp/polarssl/md4.c b/src/netif/ppp/polarssl/md4.c index 5bbc1710..bf7f9347 100644 --- a/src/netif/ppp/polarssl/md4.c +++ b/src/netif/ppp/polarssl/md4.c @@ -42,7 +42,7 @@ #include "lwip/opt.h" #if LWIP_INCLUDED_POLARSSL_MD4 -#include "polarssl/md4.h" +#include "md4.h" /* * 32-bit integer manipulation macros (little endian) diff --git a/src/netif/ppp/polarssl/md5.c b/src/netif/ppp/polarssl/md5.c index bb124940..e2854a1b 100644 --- a/src/netif/ppp/polarssl/md5.c +++ b/src/netif/ppp/polarssl/md5.c @@ -41,7 +41,7 @@ #include "lwip/opt.h" #if LWIP_INCLUDED_POLARSSL_MD5 -#include "polarssl/md5.h" +#include "md5.h" /* * 32-bit integer manipulation macros (little endian) diff --git a/src/netif/ppp/polarssl/sha1.c b/src/netif/ppp/polarssl/sha1.c index 1fc51989..5d7a59c8 100644 --- a/src/netif/ppp/polarssl/sha1.c +++ b/src/netif/ppp/polarssl/sha1.c @@ -41,7 +41,7 @@ #include "lwip/opt.h" #if LWIP_INCLUDED_POLARSSL_SHA1 -#include "polarssl/sha1.h" +#include "sha1.h" /* * 32-bit integer manipulation macros (big endian) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 49476b24..2627c315 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -237,7 +237,6 @@ static void ppp_input(void *arg) { pd = ((struct pppInputHeader *)nb->payload)->unit; protocol = ((struct pppInputHeader *)nb->payload)->proto; - printf("ppp_input() called, pd = %d, protocol = 0x%x\n", pd, protocol); if(pbuf_header(nb, -(int)sizeof(struct pppInputHeader))) { LWIP_ASSERT("pbuf_header failed\n", 0); @@ -323,7 +322,6 @@ static void ppp_input(void *arg) { break; case PPP_IP: /* Internet Protocol */ - printf("IP packet received\n"); PPPDEBUG(LOG_INFO, ("pppInput[%d]: ip in pbuf len=%d\n", pd, nb->len)); if (pppControl[pd].netif.input) { pppControl[pd].netif.input(nb, &pppControl[pd].netif); @@ -717,7 +715,6 @@ void pppInProcOverEthernet(int pd, struct pbuf *pb) { } inProtocol = (((u8_t *)pb->payload)[0] << 8) | ((u8_t*)pb->payload)[1]; - printf("pppInProcOverEthernet() called, pd = %d, inprotocol = 0x%x\n", pd, inProtocol); /* make room for pppInputHeader - should not fail */ if (pbuf_header(pb, sizeof(*pih) - sizeof(inProtocol)) != 0) { @@ -759,7 +756,6 @@ void pppOverEthernetInitFailed(int pd) { } static void pppOverEthernetLinkStatusCB(int pd, int up) { - printf("pppOverEthernetLinkStatusCB: called, pd = %d, up = %d\n", pd, up); if(up) { PPPDEBUG(LOG_INFO, ("pppOverEthernetLinkStatusCB: unit %d: Connecting\n", pd)); pppStart(pd); @@ -982,8 +978,6 @@ int pppWriteOverEthernet(int pd, const u_char *s, int n) { PPPControl *pc = &pppControl[pd]; struct pbuf *pb; - printf("pppWriteOverEthernet() called\n"); - /* skip address & flags */ s += 2; n -= 2; diff --git a/src/netif/ppp/ppp.h b/src/netif/ppp/ppp.h index d5123724..331db515 100644 --- a/src/netif/ppp/ppp.h +++ b/src/netif/ppp/ppp.h @@ -15,8 +15,7 @@ #include "lwip/timers.h" #include "pppdebug.h" - -#include /* FIXME: merge linux/ppp_defs.h content here */ +#include "net/ppp_defs.h" /* FIXME: merge linux/ppp_defs.h content here */ #ifdef INET6 #include "eui64.h" diff --git a/src/netif/ppp/utils.c b/src/netif/ppp/utils.c index 4dc4080e..6d9966af 100644 --- a/src/netif/ppp/utils.c +++ b/src/netif/ppp/utils.c @@ -42,10 +42,12 @@ #include #if 0 #include -#endif #include +#endif #include +#if 0 #include +#endif #include #include #include @@ -53,8 +55,10 @@ #include #include #include +#if 0 #include #include +#endif #ifdef SVR4 #include #endif @@ -681,7 +685,7 @@ log_write(level, buf) { /* FIXME: replace this with a log callback */ /* if(level >= min_log_level) */ /* FIXME: add a minimum log level */ - printf("LOG: %s\n", buf); + PPPDEBUG(LOG_DEBUG, ("LOG: %s\n", buf) ); #if 0 if (log_to_fd >= 0 && (level != LOG_DEBUG || debug)) { int n = strlen(buf);