lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] UDP bind error due to address and port reuse


From: Noam Weissman
Subject: Re: [lwip-users] UDP bind error due to address and port reuse
Date: Thu, 8 Dec 2016 11:25:01 +0000

Dear Simon,

Please do not confuse me :-)

" you get the port of the remote application and use sendto() to respond"

The above is not what was questioned.

Application at embedded side sends the same message to several recipients from 
the same port. 

Depending on the recipient design that you have NO CONTROL of ... the recipient 
will send back something to the 
same port at the embedded side.

What I wrote was, that if you have no control over the recipients and you do 
not know if they use one port for send
and receive or two separate ports for send and receive. Or whatever else can go 
wrong...

So you cannot rely on recipient port in order to know where the reply came 
from. You can rely on some data, an ID,
or something else that will be embedded in the message that is sent back.

This is what I meant. Unless Suraya can give more info on the above issue.

BR,
Noam.


-----Original Message-----
From: lwip-users [mailto:address@hidden On Behalf Of Simon Goldschmidt
Sent: Thursday, December 08, 2016 12:14 PM
To: address@hidden
Subject: Re: [lwip-users] UDP bind error due to address and port reuse

Noam Weissman wrote:
> Dirk, if the application is creating a different port on every reply you 
> cannot rely on that.
> You must have control over the data

Rely on what? Using raw recv callback (like in Dirk's example) or socket-based 
recvfrom() you get the port of the remote application and use sendto() to 
respond.

Please don't confuse people ;-)


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]