lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Why is the whole ping.c surrounded by "#if LWIP_RAW" ?


From: Simon Goldschmidt
Subject: Re: [lwip-users] Why is the whole ping.c surrounded by "#if LWIP_RAW" ?
Date: Thu, 09 Jun 2022 17:33:04 +0200
User-agent: K-9 Mail for Android


Am 9. Juni 2022 11:07:15 MESZ schrieb Jonathan D <jdemeyer@hotmail.com>:
>Hello,
>
>I have a project with LwIP working for several services (both client and 
>server) and so far, I didn't need to enable LWIP_RAW.
>Now, I want to ping the gateway from my device and I included the "ping" app 
>from the contrib repository.
>
>I find it strange that the whole ping.c is surrounded by "#if LWIP_RAW" as 
>even the comment says:
>
>This is an example of a "ping" sender (with raw API and socket API).

There's a difference between "raw API" (vs socket API, here, "raw" means the 
callback API) and LWIP_RAW (where raw means "raw IP socket": as there is no 
ICMP socket type, you need to implement ICMP yourself on top of IP, which is 
what that file does.

> [..]
>Should I enable LWIP_RAW in order to use functions in ping.c ?

Yes

> Will this not create problems ?

No.

Regards,
Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]