lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] How do I get incoming packets using netconn API?


From: Simon Goldschmidt
Subject: Re: [lwip-users] How do I get incoming packets using netconn API?
Date: Thu, 18 Feb 2010 07:20:23 +0100

Joe Dupre wrote:
> I've created a netconn with a callback, but it appears nothing in the
> tcpip_thread does anything to check the interface for them.  The tcpip_thread
> only waits for a TCPIP_MSG_INPKT message.  I see that I can use
> tcpip_input() to pass an incomming pbuf to the tcpip_thread.  But how am I 
> supposed to
> create a task that checks for incomming packets and creates a pbuf without
> using the raw API?

I'm afraid I don't understand your question.

> If I create a task that calls ethernetif_input(), that calls many of the
> pbuf handling functions.  Is it thread-safe to call the pbuf functions???

Yes, they are. The netif driver should allocate PBUF_POOL pbufs (even allowed 
from interrupt), fill them and pass them to it's netif->input function (the 
function is set when calling netif_add). This will get the pbufs into the 
tcpip_thread.

Simon
-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser




reply via email to

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