lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #6370] Sending to myself


From: Luca Ceresoli
Subject: [lwip-devel] [patch #6370] Sending to myself
Date: Tue, 08 Apr 2008 14:44:33 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Follow-up Comment #16, patch #6370 (project lwip):

I'll recap what this patch is, so hopefully we may reach a final merge/reject
decision.

This patch moves most of the code from loopif.c into netif.c to give _all_
interfaces the "loopback" feature: an _outgoing_ IP packet destined to the IP
address of a netif is looped back up the stack and received again on that
netif.

This feature is found on "heavyweight" stacks, but many lwIP users won't need
it, so it's off by default.

The code implementing the loopback feature is activated when
(LWIP_HAVE_LOOPIF || LWIP_NETIF_LOOPBACK). This maintains backward
compatibility with current loopif.c.

The decision is taken in ip_output_if(): if a packet's destination IP address
is equal to the netif->ip_addr it's looped back, otherwise nefit->output() is
called as usual.

As inherited from loopif.c, this feature works both with and without
multithreading. In the latter case packets to be looped back are enqueued and
sent back up the stack when the netif_poll() function is called.

Additional features proposed by Simon in comment #9, that we kind of agreed
to implement in a second step:
* poll function for one specific netif, in addition to netif_poll() which
checks all
* a better check for multithreading (assert if input is ip_input? what else
can be done to make this safe?) _(I'll need support on this, since my
environment does not support multithreading)_
* this is new, even for loopif: limit the packets on such a queue to prevent
using all pbufs for loopback communication (could be turned off)


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6370>

_______________________________________________
  Messaggio inviato con/da Savannah
  http://savannah.nongnu.org/





reply via email to

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