[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tcpm] TCP, multiple addresses and soft errors when connecting
Fernando Gont wrote:
FYI, SCTP has this same problem. So sctp_connectx() was added in the
API draft to allow an app to pass in an array of addresses.
Is there any reason for which an array of IP addresses is passed,
instead of, say, a domain name?
If the argument is a domain name, it will limit the usage of the
call. For example, a caller may just want to use a subset of peer
addresses to try to connect to it for whatever reason. We
should have an API which allows that. Your suggestion on using
a domain name is more suitable for a higher level API.
IMHO, it's a better approach than just having connect() fail when ICMP
errors are received.
However, unless there's a reason for it (as I asked above), I think it's
still a low-level API.
For example, if I want to get the document at
http://www.example.com/index.html , why should I care about whether the
webeserver is IPv4-only, IPv6-only or dual/stack?
Does an application programmer really need to know the IP addresses the
domain "www.example.com" map to?
Actually, should an application programmer be supposed to be
knowledgeable on network addressing?
Yes, sctp_connectx() or connectx() is supposed to be a "low" level
API, as the other socket calls. The API you mentioned above is
more like a library built on top of the socket call layer.
The issue in this discussion thread is that we may need help from an
even lower level than the socket call layer. Or we can have transport
layer socket option on when a connect() attempt should fail (e.g.
getting an ICMPv6 error) so that the app can respond to it quickly.
Anyway, this is more like an implementation issue than a topic on
TCP maintenances and extensions.
--
K. Poon.
kacheong.poon@sun.com