lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] ping out?


From: Adam Dunkels
Subject: Re: [lwip-users] ping out?
Date: 19 Jun 2003 18:14:37 +0200

Hi!

On Thu, 2003-06-19 at 16:36, Kieran Mansley wrote:
> On Thu, 19 Jun 2003, Ed Sutter wrote:
> > 2. I would like the ability to "ping out", so bring it on!
>
> So, what do other people think?
> 
> On one side we have SOCK_RAW:
>  - comprehensive
>  - standard interface
>  - useful for other things?
>  - more code, more complex
>  - needs someone to do it!
> 
> On the other side we have the callback method done by Larry:
>  - just does ECHO_REQUEST
>  - simple, lightweight
>  - less code (I'm guessing)
>  - non-standard interface
>  - has already been done!
> 
> Maybe we should go for the later now, but aim for the former in the long
> term?  Opinions?

How about adding a generic function for sending out an ICMP packet with
any type, something like icmp_send(u8_t type, u8_t code, u8_t *data,
16_t len), where "data" would be copied into the ICMP header starting
after the checksum? The ICMP ECHO_REPLY callback could even be
generalized to supporting any kind of ICMP input, so that an application
could listen to all incoming ICMP packets (without adding to
complexity).

It would be somewhere inbetween the simple ICMP ECHO_REPLY listener, but
slightly less complex than a full SOCK_RAW.

I think that ICMP is special enough in many ways to warrant a special
way to interact with it, but I'm not sure that it is worth a lot (or how
much) of extras... Would it be possible to have a SOCK_RAW with
callbacks, or would it require the socket interface layer?

Cheers,

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam/





reply via email to

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