Re: [dtn-interest] Re(2): [dtn-dev] discussion draft

Scott Burleigh <Scott.Burleigh@jpl.nasa.gov> Fri, 30 March 2007 21:18 UTC

Received: from nmta3.jpl.nasa.gov (nmta.jpl.nasa.gov [137.78.160.108]) by webbie.berkeley.intel-research.net (8.11.6/8.11.6) with ESMTP id l2ULIWY25490 for <dtn-interest@mailman.dtnrg.org>; Fri, 30 Mar 2007 13:18:32 -0800
Received: from xmta1.jpl.nasa.gov (xmta1.jpl.nasa.gov [137.78.160.144]) by nmta3.jpl.nasa.gov (Switch-3.1.9/Switch-3.1.9) with ESMTP id l2ULIQ05021219 for <dtn-interest@mailman.dtnrg.org>; Fri, 30 Mar 2007 14:18:26 -0700
Received: from [127.0.0.1] (dhcp-79-22-247.jpl.nasa.gov [137.79.22.247]) by xmta1.jpl.nasa.gov (Switch-3.1.9/Switch-3.1.9) with ESMTP id l2ULIOJi027612 for <dtn-interest@mailman.dtnrg.org>; Fri, 30 Mar 2007 14:18:26 -0700
Message-ID: <460D7EA0.9080705@jpl.nasa.gov>
Date: Fri, 30 Mar 2007 14:18:24 -0700
From: Scott Burleigh <Scott.Burleigh@jpl.nasa.gov>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
To: dtn interest <dtn-interest@mailman.dtnrg.org>
Subject: Re: [dtn-interest] Re(2): [dtn-dev] discussion draft
References: <20070328174140.299881629@127.0.0.1> <460D6779.5090408@jpl.nasa.gov> <20070330203409.1848455294@127.0.0.1> <20070330205621.GE23819@grc.nasa.gov>
In-Reply-To: <20070330205621.GE23819@grc.nasa.gov>
Content-Type: multipart/alternative; boundary="------------020301070900080000010704"
X-Source-IP: dhcp-79-22-247.jpl.nasa.gov [137.79.22.247]
X-Source-Sender: Scott.Burleigh@jpl.nasa.gov
X-AUTH: Authorized
Sender: dtn-interest-admin@mailman.dtnrg.org
Errors-To: dtn-interest-admin@mailman.dtnrg.org
X-BeenThere: dtn-interest@mailman.dtnrg.org
X-Mailman-Version: 2.0.13
Precedence: bulk
List-Unsubscribe: <http://mailman.dtnrg.org/mailman/listinfo/dtn-interest>, <mailto:dtn-interest-request@mailman.dtnrg.org?subject=unsubscribe>
List-Id: Delay Tolerant Networking Interest List <dtn-interest.mailman.dtnrg.org>
List-Post: <mailto:dtn-interest@mailman.dtnrg.org>
List-Help: <mailto:dtn-interest-request@mailman.dtnrg.org?subject=help>
List-Subscribe: <http://mailman.dtnrg.org/mailman/listinfo/dtn-interest>, <mailto:dtn-interest-request@mailman.dtnrg.org?subject=subscribe>
List-Archive: <http://mailman.dtnrg.org/pipermail/dtn-interest/>

Wesley Eddy wrote:
> On Fri, Mar 30, 2007 at 04:34:09PM -0400, Peter Lovell wrote:
>   
>> SDNVs themselves are limited to 64 bits for reliable operation
>>     
> Did you mean "SDNVs" or "the values within SDNVs"?  I think it should be
> the values within them, which means the encoded SDNVs would be limited
> to 9 bytes.  This is how I've capped them in our code when bignum
> support isn't available or expected to be needed.
You're right, Wes, it's the values that are limited.  Section 3.1 of the 
BP spec says"Implementations of the Bundle Protocol may handle as an 
invalid numeric value any SDNV that encodes an integer that is larger 
than (2^64 -- 1)."

Where not otherwise limited, as by this clause in the BP spec, an SDNV 
can in theory contain any non-negative integer value whatsoever.

[Practically speaking, your 9-byte limit is fine.  Technically, though, 
the limit in the BP spec means "any number that can be encoded in 64 
bits", and in order to encode a 64-bit integer in an SDNV I think you 
actually need 10 bytes.  You can put up to 7 significant bits in each 
octet, which means you can get a 63-bit integer into (63 / 7) = 9 
octets, but for a 64-bit integer you need the low-order bit of one 
additional octet.]

Scott