[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-members] UDP_FLAGS_CONNECTED in udp.c or socket layer?
From: |
leon . woestenberg |
Subject: |
[lwip-members] UDP_FLAGS_CONNECTED in udp.c or socket layer? |
Date: |
Mon, 3 Feb 2003 15:23:25 +0100 |
Hello all,
Jani, regarding the latest changes in udp.c:
Your changes are adding a connect flag in the udp structures:
/* unconnected? */
if(((pcb->flags & UDP_FLAGS_CONNECTED) == 0) &&
I am not sure udp.c is the right place to do this... The notion of a
connected "UDP" socket is really a socket thing, not a PCB
thing.
For example, what happens if someone calls
udp_connect(IP_ADDR_ANY, 0);
The UDP PCB connection is not really connected anymore, but
the UDP_FLAGS_CONNECTED flag will be set.
The UDP PCB will become dead, as no exact match will occur,
but neither will a half-exact match work, because of this check in
udp.c/udp_input():
/* unconnected? */
if(((pcb->flags & UDP_FLAGS_CONNECTED) == 0) &&
Either we implement the full "connect"/"accept" like behaviour
in UDP, or we implement these at the socket layer. I hope to
get some feedback on this.
Regards,
Leon Woestenberg
Axon Digital Design
Phone: +31 13 511 6666
Fax: +31 13 511 4151
web: www.axon.tv
- [lwip-members] UDP_FLAGS_CONNECTED in udp.c or socket layer?,
leon . woestenberg <=