Subject: Re: [tcpm] TCP, multiple addresses and soft errors when connecting

From: Kacheong Poon <[email-masked]>
Date: Mon, 05 Apr 2004 12:50:47 -0700

Fernando Gont wrote:

> So why not implement such a "higher-level" connect(), and handle all the 
> relevant issues inside the API?

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.  How does
the stack handle this is implementation dependent.  One way may be to
have a policy on the priority of addresses to try and when to switch
to another one.  If connectx() is implemented as a general call for
other protocols, a policy for TCP may be that TCP will try another
address if it gets an ICMPv6 message following the suggestion in
draft-ietf-v6ops-v6onbydefault-01.txt,

Check section 8.9 in draft-ietf-tsvwg-sctpsocket-08.txt on
sctp_connectx().

-- 

						K. Poon.
						[email-masked]

_______________________________________________
tcpm mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/tcpm

---

From: Fernando Gont <[email-masked]>
Date: Mon, 05 Apr 2004 23:12:23 -0300

At 12:50 05/04/2004 -0700, Kacheong Poon wrote:

>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?

>How does

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?

Best Regards,

--
Fernando Gont
e-mail: [email-masked] || [email-masked]

---

From: Kacheong Poon <[email-masked]>
Date: Tue, 06 Apr 2004 13:13:09 -0700

Fernando Gont wrote:

> 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.

> 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.
						[email-masked]