[mif] A question about API

Stjepan Groš <stjepan.gros@fer.hr> Sat, 26 September 2015 17:30 UTC

Return-Path: <stjepan.gros@fer.hr>
X-Original-To: mif@ietfa.amsl.com
Delivered-To: mif@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B7D31A0423 for <mif@ietfa.amsl.com>; Sat, 26 Sep 2015 10:30:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 3.579
X-Spam-Level: ***
X-Spam-Status: No, score=3.579 tagged_above=-999 required=5 tests=[FRT_STOCK2=3.988, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-0.7, T_RP_MATCHES_RCVD=-0.01] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tz7x_XpDNFl5 for <mif@ietfa.amsl.com>; Sat, 26 Sep 2015 10:30:00 -0700 (PDT)
Received: from mail.zemris.fer.hr (gandalf.zemris.fer.hr [161.53.65.11]) by ietfa.amsl.com (Postfix) with ESMTP id 724731A0406 for <mif@ietf.org>; Sat, 26 Sep 2015 10:29:59 -0700 (PDT)
Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.zemris.fer.hr (Postfix) with ESMTP id 7BFED3B7C05D; Sat, 26 Sep 2015 19:29:57 +0200 (CEST)
X-Virus-Scanned: amavisd-new at zemris.fer.hr
Received: from mail.zemris.fer.hr ([127.0.0.1]) by localhost (mail.zemris.fer.hr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qbSRUkS7rH+n; Sat, 26 Sep 2015 19:29:56 +0200 (CEST)
Received: from w540.sistemnet.local (93-143-174-74.adsl.net.t-com.hr [93.143.174.74]) by mail.zemris.fer.hr (Postfix) with ESMTPSA id 5405A3B7C05B; Sat, 26 Sep 2015 19:29:56 +0200 (CEST)
To: mif@ietf.org
From: Stjepan Groš <stjepan.gros@fer.hr>
Organization: UNIZG - FER
Message-ID: <5606D60E.2000901@fer.hr>
Date: Sat, 26 Sep 2015 19:29:50 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="6ROP36tEBun1Vfu9BAQTOKR3CA9QxT9x2"
Archived-At: <http://mailarchive.ietf.org/arch/msg/mif/u3s7mmdAEM5O-G9muWfsiHNdnCY>
Subject: [mif] A question about API
X-BeenThere: mif@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Multiple Interface Discussion List <mif.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mif>, <mailto:mif-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mif/>
List-Post: <mailto:mif@ietf.org>
List-Help: <mailto:mif-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mif>, <mailto:mif-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 26 Sep 2015 17:30:02 -0000

Hi all!

We've been working on implementation of MIF on Linux/Fedora as we
announced and one thing that pops up now and then is the question of API
design. Looking at the existing proposals there were two approaches so
far (with some notes/comments):

1. Abstract description of API functionality (draft-ietf-mif-api-extension)
=> specifies functionality to be provided by MIF implementation
=> uses concepts of message passing for communication
=> doesn't touch on socket API
=> changes socket API by introducing certain messages, e.g. "Connect to
Address From Address", "Connect to Address".
=> certain messages are oriented towards power aware devices

2. socket API changes (draft-liu-mif-socket-api)
=> missing "accept" call in typical server scenario
=> proposed changes to setsockopt() and getaddrinfo() break backwards
compatibility
=> setsockopt() is a kernel function and modifying this function implies
kernel being aware of PvDs

The questions we have are:

1. Is it really necessary to change socket API?

2. Is it really necessary to make kernel PvD aware?

I think that the answer to both questions is No.  Here is why:

1. socket API and MIP API can be orthogonal, e.g. when PvD aware
application wants to use certain PvD for some connection, it should do
something like:

pvd_select(pvdID)
s = socket(...)

and thats it. Non-PvD aware applications, on the other hand, can be
placed within certain PvD (which is implementation dependent) and when
they call socket() function, selected PvD will be used.

2. Certain support from kernel is necessary, but since not everything
can be done within a kernel (DNS lookups) and performance doesn't seem
an issue, it follows that as much as possible should go into the user space.

What are you comments/thoughts about all this?

SG