lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] raw UDP pcb issue(s)


From: Laurent BIERGE
Subject: Re: [lwip-users] raw UDP pcb issue(s)
Date: Tue, 19 Jul 2016 11:25:38 +0200 (CEST)

Sergio: I tried IP_ADDR_ANY, it didn't change anything, and i check return 
codes.
        Anyway, thank you for your concern :)

Simon: 
mmmmm ok, i understand.
i'll just explain my problem a bit further to be sure that it comes from me.

I "drew" (with printf) two ways for UDP incoming datagrams in LWIP. 
One is good,we'll call it "G", and is like this: 
ethernet message recieved --  ip message recieved -- UDP message recieved -- 
input UDP started -- found pcb match -- callback called -- end input UDP
"ethernet/ip message recieved" are in the beggining of ethernet_input and 
ip_input, "UDP message recieved" is just before calling udp_input in ip_input, 
rest is in udp_input.
  
One is the bad way, we'll call it "B":
ethernet message recieved --  ip message recieved -- UDP message recieved -- 
input UDP started -- don't found pcb match -- end input UDP.

Let's take my previous example:

send: 1 ------->  "B"*3 (or sometimes i just get "ethernet message recieved --")
rcv:...

send: 2 -------> same
...
...

send: 7 -------> same + "G" *7 approximatively 

So to be sure, is there absolutly no way that lwip could trigger ethernet_input 
with some king of delay ?

If there is not, then it must be my netif driver. My remote client is on my 
computer, I tested it with a local UDP server many times and it was working 
perfectly.

Laurent

----- Mail original -----
De: "Simon Goldschmidt" <address@hidden>
À: "lwip-users" <address@hidden>
Envoyé: Mardi 19 Juillet 2016 08:49:22
Objet: Re: [lwip-users] raw UDP pcb issue(s)

Laurent BIERGE wrote:
> So like i said, most of the time udp_input() don't find matching pcb, but the 
> message is stored.
> So when udp_input() manage to match with a local pcb, it calls the callback 
> with the good pcb but with the first pbuf stored.
> [..]
> ///// miracle ! udp_input() find a match, it empty all the buffers stored 
> with this pcb starting with 1.
> (my programme isn't designed to rcv several messages at once but i know for 
> sure that udp_input calls
> the callback as many times as it has pbufs stored for this pcb)

You're getting something totally wrong here. There's nothing in lwIP or the udp 
part that stores unreceived frames. UDP datagrams are either passed to a 
matching pcb's recv callback directly or dropped.

I suspect a bug in your netif driver or in the remote client.


Simon

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



reply via email to

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