Re: [port-srv-reg] "xmp" service type and the unified IANA Service Name and Port Number Registry

Stuart Cheshire <cheshire@apple.com> Wed, 24 August 2011 05:40 UTC

Return-Path: <cheshire@apple.com>
X-Original-To: port-srv-reg@ietfa.amsl.com
Delivered-To: port-srv-reg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8E53521F8BFB for <port-srv-reg@ietfa.amsl.com>; Tue, 23 Aug 2011 22:40:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.499
X-Spam-Level:
X-Spam-Status: No, score=-106.499 tagged_above=-999 required=5 tests=[AWL=0.100, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0sflVhjEjhKB for <port-srv-reg@ietfa.amsl.com>; Tue, 23 Aug 2011 22:40:22 -0700 (PDT)
Received: from mail-out.apple.com (bramley.apple.com [17.151.62.49]) by ietfa.amsl.com (Postfix) with ESMTP id 2C60221F8BF4 for <port-srv-reg@ietf.org>; Tue, 23 Aug 2011 22:40:22 -0700 (PDT)
MIME-version: 1.0
Content-transfer-encoding: 7bit
Content-type: text/plain; CHARSET="US-ASCII"
Received: from relay14.apple.com ([17.128.113.52]) by mail-out.apple.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPS id <0LQF00FB03T3L7M2@mail-out.apple.com> for port-srv-reg@ietf.org; Tue, 23 Aug 2011 22:41:30 -0700 (PDT)
X-AuditID: 11807134-b7c71ae0000014d0-de-4e548d692db5
Received: from koseret (koseret.apple.com [17.151.62.39]) (using TLS with cipher RC4-MD5 (RC4-MD5/128 bits)) (Client did not present a certificate) by relay14.apple.com (Apple SCV relay) with SMTP id EE.59.05328.96D845E4; Tue, 23 Aug 2011 22:34:33 -0700 (PDT)
Received: from [17.153.30.37] (unknown [17.153.30.37]) by koseret.apple.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LQF00I703T5NX40@koseret.apple.com> for port-srv-reg@ietf.org; Tue, 23 Aug 2011 22:41:30 -0700 (PDT)
From: Stuart Cheshire <cheshire@apple.com>
In-reply-to: <20110824024614.GF29306@uncasville.krupczak.org>
Date: Tue, 23 Aug 2011 22:41:29 -0700
Message-id: <6128495A-A51C-4259-A3B6-C8933B4BE564@apple.com>
References: <6BA107CB-7E6F-4720-ABDF-7B0D0733D607@apple.com> <4E53BF1F.5040708@krupczak.org> <9A7A3E75-3F30-4A39-8D35-94D3C2C9381B@apple.com> <20110824024614.GF29306@uncasville.krupczak.org>
To: Bobby Krupczak <rdk@krupczak.org>
X-Mailer: Apple Mail (2.1084)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMLMWRmVeSWpSXmKPExsUiON1OXTezN8TP4MRbbouub0IOjB5Llvxk CmCM4rJJSc3JLEst0rdL4Mr4fXspU0GPTsWWLR8ZGxhfKHcxcnJICJhI/Ljaww5hi0lcuLee rYuRi0NIoJNJor3lECNIgldAUOLH5HssXYwcHMwC8hIHz8uChJkFtCS+P2plgaifzyRx994c sEHCAjESG2YeYQWx2YCKXny+wgbSyylgK9F2LgYkzCKgKjF380EWiDmSEqdXXWaHWGUj8eDa Q3aImUcYJa6tXcEMkhABali85SsryBwJAVmJpmUZExgFZiG5bhbCdbOQXLeAkXkVo2BRak5i paGJXmJBQU6qXnJ+7iZGUNA1FJrsYDz4k/8QowAHoxIPr+aZYD8h1sSy4srcQ4wSHMxKIryR pSF+QrwpiZVVqUX58UWlOanFhxilOViUxHn/Xw3yExJITyxJzU5NLUgtgskycXBKNTDOn/NR Z8NJtcP+S+375S8rsvY9CluSvktppuZEpnNq/itjhaXXV2zpFCh5k7f7o2LztRPZZmv7f871 uLvl7Ow8xsPXN+R+TFywVW2Jhu6v8tdlm3am7l4TWtm7fcpud4V8a4mDu17e5SrLMX2pff1n KGNRD2tykrRtlfTzn67ybE9O3HmyRvOZEktxRqKhFnNRcSIA6FiZXDYCAAA=
Cc: port-srv-reg@ietf.org
Subject: Re: [port-srv-reg] "xmp" service type and the unified IANA Service Name and Port Number Registry
X-BeenThere: port-srv-reg@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of updates to service name and transport protocol port registry <port-srv-reg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/port-srv-reg>, <mailto:port-srv-reg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/port-srv-reg>
List-Post: <mailto:port-srv-reg@ietf.org>
List-Help: <mailto:port-srv-reg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/port-srv-reg>, <mailto:port-srv-reg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Aug 2011 05:40:23 -0000

On 23 Aug 2011, at 19:46, Bobby Krupczak wrote:

> When did the other party "register" and with whom did they register?

Begin forwarded message:

> From: Henric Bergh <henric@bergh.nu>
> Date: Wed, 24 Jan 2007 14:14:52 -0700
> To: <srv_type_request@dns-sd.org>
> Conversation: Service Type Request
> Subject: Service Type Request
> 
> Hello
> 
> I want to request the following service type.
> 
> Service Type: xmp
> Description: Xperientia Mobile Protocol
> Responsible person: Henric Bergh henric.bergh@xperientia.com
> Protocol description: Proprietary right now, will soon be public.
> Primary transport protocol: "_tcp" and "_udp"
> Defined TXT keys: txtvers, user, system, nodeid, desc

On 23 Aug 2011, at 19:46, Bobby Krupczak wrote:

> What is the other xmp's product, etc?  Did you do any verification of
> their claims.  When I chose xmp, I googled all over the net to look
> for name clashes and *never* saw anything but xmpp which is distinct.

A Google search for "srv type xmp" finds the DNS SRV Service Types list as the first hit:

<http://www.google.com/search?q=srv+type+xmp>

> So, I'm kind of wondering just how widely deployed and ubiquitous it
> really is.

Begin forwarded message:

> From: Henric Bergh <henric@bergh.nu>
> Date: 18 August 2011 10:43:24 PDT
> To: Stuart Cheshire <cheshire@apple.com>
> Subject: Re: "xmp" service type and the unified IANA Service Name and Port Number Registry
> 
> Stuart,
> 
> The XMP service and protocol is in use in these products:
> 
> Xperientia conXt
> A system used to document and report your regular workday. The system automatically synchronizes the data in the local client database with other clients and servers in the system. The discovery of other peers is done by DNS Service Discovery (DNS-SD) of the service type XMP.
> The system also contains other devices such as a GPS equipped device used in vehicles to track its location. The communication between the device and the contXt client is done by discovery of the service XMP. Mobile phones are also used to track GPS locations, and document user notes with pictures taken by the camera. The communication between the phone and the contXt client is done by discovery of the service XMP.
> 
> Company web site: http://xperientia.com/
> Product web site: https://store.xperientia.com/products/contxt/
> 
> Infospread MobiTime
> The protocol XMP is also used in the product MobiTime by Infospread Euro AB. The service discovery is not currently used but is planned in the future. The product has over 50 000 active users in Sweden.
> 
> Company web site: http://www.infospread.se/eng/
> Product web site: http://www.infospread.se/eng/?page=mobitime.aspx
> 
> The protocol - XMP
> The protocol XMP has no static assigned port number because of the dynamic port discovery features in DNS Service Discovery (DNS-SD).
> 
> Hence, the XMP service and protocol is in use and we need it in our products.
> 
> Regards,
> Henric

The additional factor here is that because Xperientia registered *only* a service name, they don't have an assigned port to go with it. Therefore, by definition they must be using the name, because that's all they have. Their servers bind to a dynamically-allocated port and their clients discover the dynamically-allocated port via DNS-SD queries, thereby conserving the limited remaining assigned port space, which is beneficial for the future of the Internet, and is virtuous behavior we'd like to encourage.

> I use the name in getservbyname()

My personal view is that getservbyname() is a flawed API with very limited usefulness. It simply consults the local /etc/services table on Unix, and, in your case, should always return the fixed constant 5270. So calling getservbyname("xmp", "tcp") is just a less-efficient way of writing "htons(5270)".

If a user were to modify their /etc/services table to change the value to 5271 then your client wouldn't work, because your servers running on unmodified machines will still be listening on 5270. So calling getservbyname("xmp", "tcp") is just a less-reliable way of writing "htons(5270)".

To use the example of HTTP, if someone were to write a web browser that used getservbyname("http", "tcp"), and some user were to change their /etc/services http value to 81, then that web browser wouldn't be able to access most web pages, and people would complain, and a smart web browser developer would stop using getservbyname because it's just a way to make their web browser not work reliably.

And, getting back to your "xmp" example, "xmp" isn't even in the /etc/services table on OS X, so if you do use getservbyname then your application won't even work on Macs and other Apple devices:

grep ^xmp /etc/services
xmpcr-interface 3877/tcp    # XMPCR Interface Port
xmpcr-interface 3877/udp    # XMPCR Interface Port
xmpv7           7430/udp    # OpenView DM xmpv7 api pipe
xmpv7           7430/tcp    # OpenView DM xmpv7 api pipe

The same will be true on older Linux and BSD distributions too. So using getservbyname("xmp", "tcp") will limit your software to a pretty small customer base where that call actually works.

> I use the string xmp in my wire
> protocol, I use the string in loads of configuration, and the
> protocol/service has been incorporated into the OpenNMS project.

In your protocol where you use the string "xmp", what other strings are valid for that protocol field? What purpose does this field have in your protocol?

Stuart Cheshire <cheshire@apple.com>
* Wizard Without Portfolio, Apple Inc.
* www.stuartcheshire.org