From 5033e0e7529744a24031537ebea2d7a202009aa4 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 23 Jun 2012 01:44:52 +0200 Subject: [PATCH] display IPV6CP packets --- src/netif/ppp/ppp.c | 10 +++++++--- src/netif/ppp/utils.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 0a107ed7..0e741ef3 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -187,9 +187,9 @@ struct protent *protocols[] = { static void ppp_start(ppp_pcb *pcb); /** Initiate LCP open request */ -#if PPPOS_SUPPORT +#if PPPOS_SUPPORT && PPP_INPROC_OWNTHREAD static void ppp_receive_wakeup(ppp_pcb *pcb); -#endif /* #if PPPOS_SUPPORT */ +#endif /* #if PPPOS_SUPPORT && PPP_INPROC_OWNTHREAD */ static void ppp_stop(ppp_pcb *pcb); static void ppp_hup(ppp_pcb *pcb); @@ -200,7 +200,9 @@ static void ppp_input_thread(void *arg); #endif /* PPP_INPROC_OWNTHREAD */ static void ppp_drop(ppp_pcb_rx *pcrx); static void pppos_input_proc(ppp_pcb_rx *pcrx, u_char *s, int l); +#if PPP_INPROC_MULTITHREADED static void pppos_input_callback(void *arg); +#endif /* PPP_INPROC_MULTITHREADED */ static void ppp_free_current_input_packet(ppp_pcb_rx *pcrx); #endif /* PPPOS_SUPPORT */ @@ -1356,7 +1358,7 @@ ppp_drop(ppp_pcb_rx *pcrx) void pppos_input(ppp_pcb *pcb, u_char* data, int len) { - pppos_input_proc(pcb->rx, data, len); + pppos_input_proc(&pcb->rx, data, len); } #endif @@ -1573,6 +1575,7 @@ pppos_input_proc(ppp_pcb_rx *pcrx, u_char *s, int l) magic_randomize(); } +#if PPP_INPROC_MULTITHREADED /* PPPoS input callback using one input pointer * *arg is a pbuf chain of two chained pbuf, the first contains * a pointer to the PPP PCB structure, the second contains the @@ -1600,6 +1603,7 @@ drop: pbuf_free(pl); return; } +#endif /* PPP_INPROC_MULTITHREADED */ #endif /* PPPOS_SUPPORT */ /* merge a pbuf chain into one pbuf */ diff --git a/src/netif/ppp/utils.c b/src/netif/ppp/utils.c index 19abdbdd..9f94ca4e 100644 --- a/src/netif/ppp/utils.c +++ b/src/netif/ppp/utils.c @@ -721,7 +721,7 @@ void dump_packet(const char *tag, unsigned char *p, int len) { if (proto == PPP_IP) return; #if PPP_IPV6_SUPPORT - if (proto == PPP_IPV6 || proto == PPP_IPV6CP) + if (proto == PPP_IPV6) return; #endif