[Top][All Lists]

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

[lwip-users] Loopback

From: Fabian Koch
Subject: [lwip-users] Loopback
Date: Wed, 29 Jul 2009 15:04:36 +0200

Hey guys,

I'm starting to use the Loopback connection at the moment and am running into what appears to be race conditions.
(Still using 1.3.0 and in the process of looking at 1.3.1)

Now in 1.3.0 in loopif.c it is said that loopif_output() copies the pbuf and calls netif->input() with it. And netif->input() is supposed to put the pbuf in a mbox to get out of reentering functions.
How would that input() function look like? I looked for examples and didn't find any.
Until now my netif_add() for loopback looked like this:

        netif_add(&sLoopback, (ip_addr *)&loopIP, (ip_addr *)&loopNet, NULL, NULL, loopif_init, tcpip_input);

Now in 1.3.1 you just seem to schedule a call to netif_poll(), the same function that the user of raw API is supposed to call periodically himself (which was also similar in 1.3.0).
Does this mean for 1.3.1, my netif_add() can just use NULL as input function? Will that get me around the race condition?

Please provide some example on using loopback in the wiki.

reply via email to

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