[Top][All Lists]

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

Re: [lwip-devel] Receive a UDP packet on multiple PCBs ? (same port)

From: address@hidden
Subject: Re: [lwip-devel] Receive a UDP packet on multiple PCBs ? (same port)
Date: Tue, 11 May 2010 21:44:04 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv: Gecko/20100317 Thunderbird/3.0.4

I took that mail as a starter to work on the REUSEADDR code for 1.4.0 and digging out an explanation of this option, I found that on other systems (which is what we want to be like, hehe), the incoming data is only duplicated if it was sent to a multi- or broadcast address. So if you are trying to receive unicast traffic on multiple PCBs, I don't think that's going to work with lwIP even if REUSEADDR is fully implemented.


St├ęphane Lesage wrote:

My LwIP device can decode 2 UDP streams (mp3, speex) to 2 audio outputs.
This is working.
But I meet a new case where we want to decode the same stream on both
(2 independent amplifiers).

Currently, only the last PCB (socket) receives the packets. (there's no
bind() problem)

In udp.c, this is clear:
     /* Iterate through the UDP pcb list for a matching pcb.
      * 'Perfect match' pcbs (connected to the remote port&  ip address) are
      * preferred. If no perfect match is found, the first unconnected
pcb that
      * matches the local port and ip address gets the datagram. */

I don't know how an IP stack is supposed to behave in this case...
Is it possible to change that and copy+send the datagram to all
matchings PCBs ?

reply via email to

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