Re: sockets APIs extensions for Host Identity Protocol

Miika Komu <miika@iki.fi> Thu, 10 May 2007 18:48 UTC

Return-path: <discuss-bounces@apps.ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1HmDgo-0007Zo-EE; Thu, 10 May 2007 14:48:34 -0400
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1HlY3X-0005X7-Kv for discuss-confirm+ok@megatron.ietf.org; Tue, 08 May 2007 18:21:15 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1HlY3X-0005Wz-BV for discuss@apps.ietf.org; Tue, 08 May 2007 18:21:15 -0400
Received: from twilight.cs.hut.fi ([130.233.40.5]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1HlY3U-0002pT-Ph for discuss@apps.ietf.org; Tue, 08 May 2007 18:21:15 -0400
Received: by twilight.cs.hut.fi (Postfix, from userid 60001) id 15A612C66; Wed, 9 May 2007 01:21:08 +0300 (EEST)
X-Spam-Checker-Version: SpamAssassin 3.2.0-niksula20070322 (2007-05-01) on twilight.cs.hut.fi
X-Spam-Level:
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.0-niksula20070322
X-Spam-Niksula: No
Received: from kekkonen.cs.hut.fi (kekkonen.cs.hut.fi [130.233.41.50]) by twilight.cs.hut.fi (Postfix) with ESMTP id 813362C41; Wed, 9 May 2007 01:21:07 +0300 (EEST)
Date: Wed, 09 May 2007 01:21:07 +0300
From: Miika Komu <miika@iki.fi>
X-X-Sender: mkomu@kekkonen.cs.hut.fi
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
Subject: Re: sockets APIs extensions for Host Identity Protocol
In-Reply-To: <200705072216.SAA06179@Sparkle.Rodents.Montreal.QC.CA>
Message-ID: <Pine.SOL.4.64.0705090046320.18946@kekkonen.cs.hut.fi>
References: <Pine.SOL.4.64.0705041801060.14418@kekkonen.cs.hut.fi> <31BC7A8C1A51004A84E08DEF@[10.1.110.5]> <200705072216.SAA06179@Sparkle.Rodents.Montreal.QC.CA>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"; format="flowed"
X-Spam-Score: 0.0 (/)
X-Scan-Signature: e8a67952aa972b528dd04570d58ad8fe
X-Mailman-Approved-At: Thu, 10 May 2007 14:48:33 -0400
Cc: discuss@apps.ietf.org
X-BeenThere: discuss@apps.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: general discussion of application-layer protocols <discuss.apps.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=unsubscribe>
List-Post: <mailto:discuss@apps.ietf.org>
List-Help: <mailto:discuss-request@apps.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=subscribe>
Errors-To: discuss-bounces@apps.ietf.org

On Mon, 7 May 2007, der Mouse wrote:

Hi and thanks for you comments,

>> Application software wants to work with strings.  [...]
>
>> If I change my "connectbyname" code again, I will change it once more
>> to use a new OS API that hides all the v4 vs. v6 vs. HIP vs. whatever
>> junk, preferably to something much simpler than the code today.
>
> Something wrong with getaddrinfo()?  It certainly could use something
> HIPish under the hood, if some implementor decided to.

Yes, I think the changes in the native HIP API draft are not visible at 
all to higher-level "connectbyname" callers. However, the C-based sockets 
API is used by all of the higher-level libraries and languages...

>>> A potential benefit of the handles is that it would make the API
>>> future-proof againts changes to the HIT size.
>
> getaddrinfo() already is...or at least, it is when used correctly, and
> in this respect it's easier to use it correctly than incorrecetly
> (which is about all you can expect).  It's a slightly broken API, true,
> but the problems with it are not in areas that any putative HIP/HIT
> stuff would fix.

I am curious. Even though this is irrelevant for the discussion, can be 
more specific on what is broken with getaddrinfo?

>>> Similarly, one might argue that the IPv6 transition would have been
>>> a lot easier for applications if the concept of endpoint descriptor
>>> were already available for the past twenty years;
>
> That concept *has* been available for the past twenty years; it's
> called a "socket".  What hasn't been available is a socket
> implementation that doesn't expose the underlying addressing details to
> the application.  This could be - and arguably should be - fixed
> entirely under the socket-layer hood, not by inventing new protocols
> and exposing *them* to the application.  I speculate that the major
> reason this hasn't been done is tradition - sockets have traditionally
> been a fairly direct interface into the kernel, and preserving that
> while presenting this kind of socket interface is relatively hard.

Yes, I agree that the socket would do the trick and would provide enough 
indirection. As you said, the problem is with the tradition of exposing 
the addresses directly to the application. To solve this problem properly, 
we need a "clean slate" approach for the APIs. However, I am not sure if 
the sockets API level is proper place to do this. The draft tries to 
preserve backwards compability while extending the current sockets API to 
its limits. The backwards compatibility is handy when porting old sockets 
API based applications to use the API. The limits are reached by hiding 
the presentation of identifiers and port numbers behind endpoint 
descriptors.

I am not sure what you meant with protocol, but here I assume you meant 
PF_SHIM. The new PF_SHIM family was "invented" as a consequence of 
introducing a new socket address structure for endpoint descriptors. This 
way, the correct size of the socket structure can be determined. It also 
makes more sense to have a separate socket handler for endpoint 
descriptors rather than to mix with IPv4 or IPv6 sockets handlers.

-- 
Miika Komu                                       http://www.iki.fi/miika/