lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] lwip socket for ICMP messages


From: Kieran Mansley
Subject: Re: [lwip-devel] lwip socket for ICMP messages
Date: Tue, 08 Mar 2005 10:18:44 +0000

On Thu, 2005-02-10 at 14:03 -0500, Vinay Purohit wrote:
> 
> Hello,
> 
> I have a question about using sockets in LWIP for dealing with ICMP
> messages.
> 
> We want an OS task to send ICMP ECHO REQUEST messages using a socket (which
> can be dedicated for ICMP if required) and then receive the corresponding
> ICMP ECHO REPLY message back on that same socket. We would like to use a
> combination of select() and recvfrom() to retrieve ICMP response messages.
> Is it possible with LWIP for an OS task to initiate and receive specific
> ICMP messages? If so, what type of a socket (what arguments to
> lwip_socket()) would one need to open?
> 
> How does the LWIP stack know that ICMP messages it receives should be passed
> on to an OS task as opposed to being processed internally given that ICMP
> does not have the notion of a port number as is found in UDP/TCP?

It's not currently supported by lwIP, but it's something that has been
requested in the past, so someone may have implemented something that
you could use: you'll probably get more luck asking on lwip-users if you
haven't already.

The functionality is called "raw sockets" and rather than specifying
SOCK_STREAM or SOCK_DGRAM as the socket type when you call socket(), you
would use SOCK_RAW to get access to this kind of socket.

The missing code in lwIP is a fairly thin wrapper around lower layers,
so should be a minimal and straightforward change if you feel like
getting involved and implementing it yourself.

Thanks

Kieran





reply via email to

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