[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE : [lwip-users] ping.c with NO_SYS
From: |
Frédéric BERNON |
Subject: |
RE : [lwip-users] ping.c with NO_SYS |
Date: |
Tue, 3 Jun 2008 12:05:43 +0200 |
>I am trying to get (outgoing) ping to work with the NO_SYS option
>specified. It seems like LWIP_SOCKET should be off for this situation.
Yes, LWIP_SOCKET=1 is not possible if NO_SYS=1 (same for LWIP_NETCONN)
>I am guessing the first thing to do would be to call ping_init(), but
>after that I am lost. ping_init calls raw_new() then raw_recv() then
>raw_bind().
In fact, the sample is design for NO_SYS=0 (since sys_timeout is used).
When LWIP_SOCKET=1, the code show how to use the raw api. The code need
to be changed to let you provide you a function you can call to do the send.
>I am guessing that ping_recv() would be called (as a call back) when the
>echo is received and that I need to define PING_RESULT() to do something
>useful.
Yes
>ping_send() for the NO_SYS case is defined as static, with no apparent way
>to invoke it. So I am not clear how to get the ping to be sent.
>ping_timeout() is also static, perhaps that would be what should be
>called, except that I have no sys_timeout() function as such.
In fact, the problem is I forgot to comment this sample only work with
NO_SYS=0 (the comment only say "This is an example of a ping sender (with
raw API and socket API)", and I don't put a !NO_SYS with "#if LWIP_RAW &&
LWIP_ICMP").
>Has anyone been using the ping code with NO_SYS? And if so, how do you
>make it work for you?
Sorry, I think you are the first one to report this problem. I attach modified
ping files.
You just have to call ping_init, and each time you want, call the new
"ping_send_now". I
can't test it now, so, tell me if it's help you...
--
Best Regards,
Robert
Fighting SPAM with Active Spam Filter, see: http://a-s-k.sourceforge.net/
_______________________________________________
lwip-users mailing list
address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users
Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf
ping.h
Description: ping.h
ping.c
Description: ping.c
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE : [lwip-users] ping.c with NO_SYS,
Frédéric BERNON <=