[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-members] UDP_FLAGS_CONNECTED in udp.c or socket layer?
From: |
Jani Monoses |
Subject: |
Re: [lwip-members] UDP_FLAGS_CONNECTED in udp.c or socket layer? |
Date: |
Mon, 3 Feb 2003 16:38:52 +0200 |
Hi Leon
I added that at the UDP level because it was udp_input that used to
discard packets not addressed to the current remote_ip.
So while connectedness is definitely a socket thing, a flag in UDP is a hint
for the UDP layer about this.I can't think of another method for this except
allowing packets regardless of their IP in udp_input and filtering them in the
upper layer.
How does that sound to you?
> 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.
This is the purpose of the new AF_UNSPEC.A socket user must use a connect
with such an address to disconnect if already connected.
A non -socket UDP will not be connected so there's no danger in that case.
>
> 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.
What is the full accept/connect behaviour? I only looked at the bind and connect
manpages for the BSD socket API.
Jani.