[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] ping w/o LWIP_TIMERS
From: |
chrysn |
Subject: |
[lwip-users] ping w/o LWIP_TIMERS |
Date: |
Mon, 21 Jan 2013 20:55:12 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
hello lwip users,
i found another problem in the ping example, this time with master lwip
and master -contrib branch: when running NO_SYS=1 && NO_SYS_NO_TIMERS=1,
the ping example does not build any more. it does include components
that would rely on sys_timeout, but when there are no timeouts, it's
usable nevertheless.
attached patch ifdefs the appropriate sections out if not LWIP_TIMERS.
moreover, in order to successfully receive a response, something in the
ip version handling has to be adjusted. pbuf_header is called in
ping_recv with -PBUF_IP_HLEN -- but on dual-stack systems, this is -40
bytes. as a result, the iecho struct points 20 byte deep into the ping
data. i worked around it by explicitly stating pbuf_header(p, -20) and
pbuf_header(20) when restoring -- i don't know which constant should
rather be used there (something like PBUF_IP4_HLEN?).
best regards
chrysn
--
To use raw power is to make yourself infinitely vulnerable to greater powers.
-- Bene Gesserit axiom
ping-wo-lwiptimers.patch
Description: Text Data
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] ping w/o LWIP_TIMERS,
chrysn <=