[Dime] Diameter Guidelines: additional info on alternative to the use of Enumerated
<lionel.morand@orange.com> Tue, 03 December 2013 17:52 UTC
Return-Path: <lionel.morand@orange.com>
X-Original-To: dime@ietfa.amsl.com
Delivered-To: dime@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 65EBB1AE151 for <dime@ietfa.amsl.com>; Tue, 3 Dec 2013 09:52:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham
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 C6Bf_IumH6nG for <dime@ietfa.amsl.com>; Tue, 3 Dec 2013 09:52:38 -0800 (PST)
Received: from relais-inet.francetelecom.com (relais-ias245.francetelecom.com [80.12.204.245]) by ietfa.amsl.com (Postfix) with ESMTP id 2ECC51AC3DD for <dime@ietf.org>; Tue, 3 Dec 2013 09:52:38 -0800 (PST)
Received: from omfeda08.si.francetelecom.fr (unknown [xx.xx.xx.201]) by omfeda10.si.francetelecom.fr (ESMTP service) with ESMTP id F31293744AF for <dime@ietf.org>; Tue, 3 Dec 2013 18:52:34 +0100 (CET)
Received: from Exchangemail-eme1.itn.ftgroup (unknown [10.114.1.183]) by omfeda08.si.francetelecom.fr (ESMTP service) with ESMTP id DD0EB384057 for <dime@ietf.org>; Tue, 3 Dec 2013 18:52:34 +0100 (CET)
Received: from PEXCVZYM13.corporate.adroot.infra.ftgroup ([fe80::cc7e:e40b:42ef:164e]) by PEXCVZYH02.corporate.adroot.infra.ftgroup ([::1]) with mapi id 14.03.0158.001; Tue, 3 Dec 2013 18:52:34 +0100
From: lionel.morand@orange.com
To: "dime@ietf.org" <dime@ietf.org>
Thread-Topic: Diameter Guidelines: additional info on alternative to the use of Enumerated
Thread-Index: Ac7wUHEP29W63MqjRTmivdiSFEco5g==
Date: Tue, 03 Dec 2013 17:52:33 +0000
Message-ID: <4328_1386093154_529E1A62_4328_16367_1_6B7134B31289DC4FAF731D844122B36E313BEA@PEXCVZYM13.corporate.adroot.infra.ftgroup>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.197.38.5]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-PMX-Version: 6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.12.2.94815
Subject: [Dime] Diameter Guidelines: additional info on alternative to the use of Enumerated
X-BeenThere: dime@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Diameter Maintanence and Extentions Working Group <dime.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dime>, <mailto:dime-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dime/>
List-Post: <mailto:dime@ietf.org>
List-Help: <mailto:dime-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dime>, <mailto:dime-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 17:52:40 -0000
Hi, A late comment made me realize that one guideline was missing in http://tools.ietf.org/html/draft-ietf-dime-app-design-guide-20 about the possible alternative to Enumerated values when additional values might be defined after the definition of the AVP. As discussed, one alternative is to use Unsigned32/Unsigned64 AVP instead and to define specific values. I will update the section 5.6 accordingly. Regards, Lionel PS: for information, the proposed text is described below. ************************************ 5.6. Use of Enumerated Type AVPs The type Enumerated was initially defined to provide a list of valid values for an AVP with their respective interpretation described in the specification. For instance, AVPs of type Enumerated can be used to provide further information on the reason for the termination of a session or a specific action to perform upon the reception of the request. As described in the section 4.4.2 above, defining an AVP of type Enumerated presents some limitations in term of extensibility and reusability. Indeed, the finite set of valid values defined at the definition of the AVP of type Enumerated cannot be modified in practice without causing backward compatibility issues with existing implementations. As a consequence, AVPs of Type Enumerated cannot be extended by adding new values to support new capabilities. Diameter protocol designers are then strongly advised to carefully consider before defining an Enumerated AVP whether the set of values will remain unchanged or new values may be required in a near future. If such extension is foreseen or cannot be avoided, it is recommended to rather define AVPs of type Unsigned32 or Unsigned64 in which the data field would contain an address space representing "values" that would have the same use of Enumerated values. For instance, an AVP describing possible access networks would be defined as follow: Access-Network-Type AVP (XXX) is of type Unsigned32 and contains an 32-bit address space representing types of access networks. This application defines the following classes of access networks, all identified by the thousands digit in the decimal notation: o 1xxx (Mobile Access Networks) o 2xxx (Fixed Access Network) o 3xxx (Wireless Access Networks) Values that fall within the Mobile Access Networks category are used to inform a peer that a request has been sent for a user attached to a mobile access networks. The following values are defined in this application: 1001: 3GPP-GERAN TBD. 1002: 3GPP-UTRAN-FDD TBD. Unlike Enumerated AVP, any new value can be added in the address space defined by this Unsigned32 AVP without modifying the definition of the AVP. There is therefore no risk of backward compatibility issue, especially when intermediate nodes may be present between Diameter endpoints. In the same line, AVPs of type Enumerated are too often used as a simple Boolean flag, indicating for instance a specific permission or capability, and therefore only two values are defined, e.g., TRUE/ FALSE, AUTORIZED/UNAUTHORIZED or SUPPORTED/UNSUPPORTED. This is a sub-optimal design since it limits the extensibility of the application: any new capability/permission would have to be supported by a new AVP or new Enumerated value of the already defined AVP, with the backward compatibility issues described above. Instead of using an Enumerated AVP for a Boolean flag, protocol designers are again encouraged to use AVPs of type Unsigned32 or Unsigned64 AVP in which the data field would be defined as bit mask whose bit settings are described in the relevant Diameter application specification. Such AVPs can be reused and extended without major impact on the Diameter application. The bit mask should leave room for future additions. Examples of AVPs that use bit masks are the Session- Binding AVP defined in [RFC6733] and the MIP6-Feature-Vector AVP defined in [RFC5447]. _________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.
- [Dime] Diameter Guidelines: additional info on al… lionel.morand