Re: [lwip-users] Force PPP TermReq (Lwip 2.0.0 RC2)
From:
Greg Smith
Subject:
Re: [lwip-users] Force PPP TermReq (Lwip 2.0.0 RC2)
Date:
Wed, 10 Aug 2016 15:56:43 +0000
Hi, Sylvain.
> From: lwip-users
> On Behalf Of Sylvain Rochet
> Sent: Tuesday, 09 August 2016 17:22
> On Tue, Aug 09, 2016 at 04:21:43PM +0000, Greg Smith wrote:
> >
> > I totally agree this would be nice to have a data trace. I do already
> > have a facility to output printf() data to a console or Telnet
> > session. However, when I turned on all those options (PRINTPKT_SUPPORT
> > was the only one I didn't already have on), I don't see it outputting
> > any packet data during LCP. Should I be seeing payload bytes during
> > this phase?
>
> Yes, all packets are dumped except IP and IPv6 packets. Are you sure lwIP
> debugging trace works at all ?
I get a lot of other good Lwip debugging messages. Here's my current debug settings:
#define LWIP_DEBUG LWIP_DBG_ON
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#define ICMP_DEBUG LWIP_DBG_ON
#define MEM_DEBUG LWIP_DBG_ON
#define MEMP_DEBUG LWIP_DBG_ON
#define NETIF_DEBUG LWIP_DBG_OFF
#define PBUF_DEBUG LWIP_DBG_OFF
#define PPP_DEBUG LWIP_DBG_ON
#define SOCKETS_DEBUG LWIP_DBG_ON
#define SYS_DEBUG LWIP_DBG_ON
#define TCP_DEBUG LWIP_DBG_OFF
#define TCP_CWND_DEBUG LWIP_DBG_OFF
#define TCP_FR_DEBUG LWIP_DBG_OFF
#define TCP_INPUT_DEBUG LWIP_DBG_OFF
#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
#define TCP_QLEN_DEBUG LWIP_DBG_OFF
#define TCP_RTO_DEBUG LWIP_DBG_ON
#define TCP_RST_DEBUG LWIP_DBG_ON
#define TCPIP_DEBUG LWIP_DBG_OFF
#define TIMERS_DEUBG LWIP_DBG_ON
#define UDP_DEBUG LWIP_DBG_OFF
#define PRINTPKT_SUPPORT 1
#define PPP_PROTOCOLNAME 1
At the very bottom is a clip with some sample output I get during connecting and reception of a couple TCP keepalive packets. (The keepalive seems to print the packet data.) But I don't see any lines showing raw data going out (or, generally, coming in, either).
(Ignore the missing data at the end of the line with TCP_KEEPINTV; that's a function of my output capture.)
>
> > I am running an RS485 bus, so I could hook another device in to
> > "listen" to all the traffic. Unfortunately, that's going to get me a
> > lot of bytes, but minimal decoding. Do you know of any good tools
> > where I could dump raw bytes and get packet decoding back out? (Or
> > even a tool to hang on the serial line and decode live?)
>
> If you can hook on the serial line the easiest way is to use pppd and
> you'll have exactly the same output as lwIP PPP trace, or even better
> lwIP itself using the unix port. If you ask I almost never try lwIP PPP
> support on real hardware, I hate waiting the flash time.
How do you get pppd to print out packets? I've turned on pppd 'debug', but that doesn't give me packet data, either. I see the sent and rcvd LCP packet high level information, but not actual packet data for any further transmissions (i.e. the TCP keepalive, for instance).
And when I get into the state where pppd seems to being ignore LCP packets, I do not get anything from pppd.