Jonathan Larmour wrote:
Marcin Prusinski wrote:
Hey !
I was looking for example that will help me send some icmp echo
requests. I only found post of Larry Piggins who wrote exactly
something i need, but i couldn't find the code.
You need to make a raw socket, i.e. NETCONN_RAW, ensuring LWIP_RAW is on
in your configuration.
I'm using standalone version of LWIP.
I'm just a begginer and I can't figure out how to compute ICMP ECHO
checksum.
Here's some code obtained from elsewhere:
[snip]
Actually, you could also directly use lwip's own checksumming routines if
you like. If you #include "lwip/inet.h" you can get this function from there:
u16_t inet_chksum(void *dataptr, u16_t len);
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
Company legal info, address and number: http://www.ecoscentric.com/legal
------["The best things in life aren't things."]------ Opinions==mine
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users