Re: [babel] About mandatory bits
Toke Høiland-Jørgensen <toke@toke.dk> Thu, 20 April 2017 09:05 UTC
Return-Path: <toke@toke.dk>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2380512EBAE for <babel@ietfa.amsl.com>; Thu, 20 Apr 2017 02:05:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=toke.dk
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 XE3x5_J5xLW6 for <babel@ietfa.amsl.com>; Thu, 20 Apr 2017 02:05:48 -0700 (PDT)
Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9105212EBAD for <babel@ietf.org>; Thu, 20 Apr 2017 02:05:48 -0700 (PDT)
From: Toke Høiland-Jørgensen <toke@toke.dk>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1492679145; bh=N/CQ0DmIUV09RllSjUQrhI0FVX2MRe37z2Yx5bf8AXs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cAfu++7zDH/myzqux5WgMKYNl6nHoOHGDLhPwSQTN9x1CegGTjlT3VFBaEbDZiibP 6sLD9kVFN+MT7qS33A5AunIVkFPU+PAJdJI4L8zzS6m2D90D2UC9ey+PFDOyJ6WO6w 4ZL8j32rPrrVQOWB0/DqYYcpY0lAz2YjCl6/spp8kwki3SLqEm3+a5DdhpjwbNBvnK aL9votF91+cPsD+kZXqPWIHGI3r6l7qks0QKlf7qLmAoJgySc7VkPYMjLdTx3Canyq HlH/iVmu3eMxxRSGKKueory64CeKk9okW/4kaC09naiocpcAiTM7fSC8rpSd1KWyEN UPjd85U3qmmPA==
To: Juliusz Chroboczek <jch@irif.fr>
Cc: babel@ietf.org
References: <87pogduqas.wl-jch@irif.fr> <87pogcmveu.fsf@alrua-x1> <87shl4k2kj.wl-jch@irif.fr> <87r30ok28z.fsf@alrua-kau> <7ivaq0bflk.wl-jch@irif.fr>
Date: Thu, 20 Apr 2017 11:05:43 +0200
In-Reply-To: <7ivaq0bflk.wl-jch@irif.fr> (Juliusz Chroboczek's message of "Wed, 19 Apr 2017 17:07:51 +0200")
X-Clacks-Overhead: GNU Terry Pratchett
Message-ID: <87r30n30uw.fsf@alrua-x1>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/AmJSnD9CbXx-hu9WMAW2SKtXJPQ>
Subject: Re: [babel] About mandatory bits
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Apr 2017 09:05:52 -0000
Juliusz Chroboczek <jch@irif.fr> writes: >> Shouldn't the mandatory bit just be a part of the allocation? I.e. >> "sub-tlv XX MUST be sent as mandatory", and setting the bit wrong should >> be considered a format error? That would be the most unambiguous, in my >> opinion. > > The way I think of it is > > TLV numbers 0-127 are non-mandatory; > TLV numbers 128-255 are mandatory. Ah, right. Gotcha. I was thinking of it basically like this: bool mandatory = tlv[0] & 0x80 u8 type = tlv[0] & 0x7f where the contents of type would be what was specified in the RFC. That would lead to two different "TLV type 2" being defined. But if it's defined in terms of ranges of TLV numbers I see no problem in assigning them separately :) -Toke
- [babel] About mandatory bits Juliusz Chroboczek
- Re: [babel] About mandatory bits Toke Høiland-Jørgensen
- Re: [babel] About mandatory bits Juliusz Chroboczek
- Re: [babel] About mandatory bits Dave Taht
- Re: [babel] About mandatory bits Toke Høiland-Jørgensen
- Re: [babel] About mandatory bits David Schinazi
- Re: [babel] About mandatory bits Matthieu Boutier
- Re: [babel] About mandatory bits Juliusz Chroboczek
- Re: [babel] About mandatory bits Toke Høiland-Jørgensen
- Re: [babel] About mandatory bits Juliusz Chroboczek
- Re: [babel] About mandatory bits Gabriel Kerneis
- Re: [babel] About mandatory bits David Schinazi
- Re: [babel] About mandatory bits Juliusz Chroboczek
- Re: [babel] About mandatory bits Toke Høiland-Jørgensen