lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] using loopback


From: Ben Bobbitt
Subject: RE: [lwip-users] using loopback
Date: Sat, 7 Jun 2008 18:09:49 -0500

This timeout sounds like a great solution.. except I can't find any reference 
to it anywhere in the code.   The netconn object doesn't have a recv_timeout 
member that I can see.  What version was that functionality added?   I'm using 
the software framework from atmel (1.30) which I believe uses lwIP 1.20


-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of address@hidden
Sent: Friday, June 06, 2008 12:43 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] using loopback

You could just use netconn receive timeout to see whether the system 
still works and call receive again after triggering the watchdog.
To use the timeout, set the LWIP_SO_RCVTIMEO define to 1 and set 
conn->recv_timeout to a millisecond value of your choice (it is 
initialized with 0 which means wait forever).

The downside is of course that you only know the netconn thread is still 
running, you don't know anything about the tcpip_thread or a potential 
ethernetif_input_thread. But I think these are best monitored on their 
own (e.g. check the tcpip_thread by using a sys_timeout()).

Simon

Ben Bobbitt schrieb:
> Yes, It would be more accurate to say that I need to check that a thread is 
> running. It sounds like there is no current capability to use the loopback to 
> do that. The thread that I want to monitor this way will be blocked on a 
> netconn read call using a netif that is not a loopif type. 
>
> Ben Bobbitt
> ESR
>
>
> On Jun 6, 2008, at 9:46 AM, "address@hidden" <address@hidden> wrote:
>
> I don't think I fully understand what you want to achieve: do you want to 
> check if your an ethernet interface is up or if a thread is running? If you 
> want to check the ethernet interface, loopif.c won't help you much: it is 
> designed to be an additional lwip netif that passes packets to/from 
> 127.0.0.1. However, there is some work going on to get loopif functionality 
> into _all_ netifs, but that is not supported in 1.3.0 and it might take a 
> while until it is finished in CVS.
>
> Simon
>
> Ben Bobbitt schrieb:
>
> I’m trying to use a loopback mechanism on a periodic basis as a way of 
> checking that an interface is still up and running. 
>
> It appears that loopback capability is included in the loopif.c module with 
> the LWIP_HAVE_LOOPIF option in opt.h set... however,  I’m not clear on how 
> one would actually use that.  Does the netif that you want to periodically 
> test with a loopback message have to be initialized under a new model?   
>
> I’m using the netconn api, and I simply want to have another thread 
> periodically send a ping to the port that another thread is listening to – 
> but since it’s a blocking read, I can’t really test that the thread is still 
> up unless he receives data.  Hopefully that makes sense. 
>
> Thanks.
>
>
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.24.6/1484 - Release Date: 6/4/2008 
> 4:40 PM
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.100 / Virus Database: 269.24.5/1479 - Release Date: 02.06.2008 
> 19:02
>   



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 270.0.0/1489 - Release Date: 6/7/2008 11:17 
AM
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 270.0.0/1489 - Release Date: 6/7/2008 11:17 
AM
 






reply via email to

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