From Sebastien.Roy@sun.com Fri May 18 15:25:45 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l4IMPjWa007243
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 18 May 2007 15:25:45 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l4IMOaP0027886
	for <@sunmail3mpk.sfbay.sun.com:psarc-ext@sun.com>; Fri, 18 May 2007 15:24:36 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JI900M0JCX0U700@nwk-avmta-2.sfbay.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Fri, 18 May 2007 15:24:36 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JI9008KICWZDRE0@nwk-avmta-2.sfbay.sun.com> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Fri,
 18 May 2007 15:24:36 -0700 (PDT)
Received: from fe-amer-09.sun.com ([192.18.108.183])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l4IMOZJx012890	for
 <psarc-ext@sun.com>; Fri, 18 May 2007 22:24:35 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JI900E01CSMWL00@mail-amer.sun.com>
 (original mail from Sebastien.Roy@Sun.COM)
 for psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Fri,
 18 May 2007 16:24:35 -0600 (MDT)
Received: from [129.148.19.4] by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JI900MELCWY2BG0@mail-amer.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Fri, 18 May 2007 16:24:35 -0600 (MDT)
Date: Fri, 18 May 2007 18:21:11 -0400
From: Sebastien Roy <Sebastien.Roy@sun.com>
Subject: 2007/282 DLPI MAC-Type Mapping Functions
Sender: Sebastien.Roy@sun.com
To: psarc-ext@sun.com
Cc: clearview-discuss <clearview-discuss@opensolaris.org>
Message-id: <464E26D7.5020905@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
User-Agent: Thunderbird 2.0.0.0 (X11/20070423)
Status: RO
Content-Length: 2340

I'm sponsoring this open fast-track for Sagun Shakya.  The timer expires 
on 05/25/2007.

Files in the materials directory:

- spec.txt (specification, also included below)
- libdlpi-arch.txt (libdlpi architecture document modified to include
	these two new functions)
- libdlpi-api_mapping.txt (man pages for the two new functions)
- libdlpi-api_updated.txt (all libdlpi man pages including those for 		 
these two new functions)


DLPI MAC-Type Mapping Functions
-------------------------------

libdlpi will provide functions that will map a DLPI MAC-Type value to
either a BSD sockets interface type value or an ARP hardware type value
(which are defined in <net/if_types.h> and <netinet/arp.h>
respectively).  The functions to be provided are dlpi_iftype() and
dlpi_arptype() and the interface classification for these functions will
be Committed.

Although, these types represent the same media type, they are defined in
separate public namespaces with a different numbering scheme. The types
defined in <net/if_types.h> represent the link types for BSD sockets
interface types.  Similarly, the types in <netinet/arp.h> represent the
hardware types in the ARP protocol. The DHCPv6 client has multiple
places where the mapping of DLPI MAC-Type to ARP hardware type is needed
and therefore it has its own mapping function (dlpi_to_arp()) placed in
libdhcputil. Currently, there are no consumers of the dlpi_iftype()
interface. One potential use of this function could be with the socket
interfaces. The mapped link types can be used when dealing with AF_LINK
sockets in the BSD sockets API (for example, when setting the sdl_type
field in struct sockaddr_dl). Thus, rather than applications writing
their own mapping functions, libdlpi will provide such interfaces. If in
the future a new media type is introduced, having one common routine
will also allow us to add the new type easily.

Note that it can be reasonably argued that a reverse function that maps
ARP types and BSD sockets interface types to DLPI MAC-Types should also
be provided.  In that case, libdlpi can provide such functions as well.

The libdlpi architectural document and the manpages in the case
materials directory have been updated to include these mapping routines
and are marked with '|' to show the changes. See section 1.7.d in the
architectural document.

From Sebastien.Roy@sun.com Fri May 25 13:36:03 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l4PKa2PM005585
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 25 May 2007 13:36:02 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l4PKYT3m008951
	for <@newsunmail1brm.central.sun.com:psarc-ext@sun.com>; Fri, 25 May 2007 21:34:45 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JIM00C056HWEW00@brm-avmta-1.central.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Fri, 25 May 2007 14:34:44 -0600 (MDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JIM009LV6HVSX10@brm-avmta-1.central.sun.com> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Fri,
 25 May 2007 14:34:43 -0600 (MDT)
Received: from fe-amer-01.sun.com ([192.18.108.175])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l4PKYgHW009115	for
 <psarc-ext@sun.com>; Fri, 25 May 2007 20:34:42 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JIM00D0162X3500@mail-amer.sun.com>
 (original mail from Sebastien.Roy@Sun.COM)
 for psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Fri,
 25 May 2007 14:34:42 -0600 (MDT)
Received: from [129.148.19.4] by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JIM00ID66HTT9E1@mail-amer.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Fri, 25 May 2007 14:34:42 -0600 (MDT)
Date: Fri, 25 May 2007 16:33:54 -0400
From: Sebastien Roy <Sebastien.Roy@sun.com>
Subject: 2007/282 DLPI MAC-Type Mapping Functions
Sender: Sebastien.Roy@sun.com
To: psarc-ext@sun.com
Cc: clearview-discuss <clearview-discuss@opensolaris.org>
Message-id: <46574832.5070608@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
User-Agent: Thunderbird 2.0.0.0 (X11/20070423)
Status: RO
Content-Length: 57

This case was approved during this week's PSARC meeting.

