Subject: iSCSI - decimal coded binary strings - a proposed resolution

From: "Julian Satran" <[email-masked]>
Date: Mon, 8 Jul 2002 09:01:54 +0300

Considering the widespread use of decimal encoding and the perceived 
difficulty of mapping them to a binary  string
- mainly due to the difficulty of matching lengths I suggest the 
following:

Decimal encoding for binary strings will be used only where the length of 
the binary string is explicitly defined (by a constant or a rule that does 
not use the encoding itself)

The definition for decimal constant becomes:

decimal-constant: an unsigned decimal number - the digit 0 or a string of 
1 or more digits starting with a non-zero digit. This encoding is not used 
for numerical values equal or greater than 2**64. Decimal-constants are 
used to encode numerical values or binary strings. Decimal constants can 
be used to encode binary strings only if the stringlength is explicitly 
specified. There is no implicit length for deci-mal strings.
Julo

---

From: Bill Studenmund <[email-masked]>
Date: Mon, 8 Jul 2002 11:03:43 -0700 (PDT)

> not use the encoding itself)

This sounds like a good resolution of the problem. You've cleaned up the
part I despised about using decimal numbers for binary strings - the fact
that we want to derive the length from the number, which isn't so easy for
them. :-)

> specified. There is no implicit length for deci-mal strings.

I think that'll be fine.

Take care,

Bill

---

From: Paul Koning <[email-masked]>
Date: Mon, 8 Jul 2002 15:36:10 -0400

>>>>> "Julian" == Julian Satran <[email-masked]> writes:

 Julian> Considering the widespread use of decimal encoding and the
 Julian> perceived difficulty of mapping them to a binary string -
 Julian> mainly due to the difficulty of matching lengths I suggest
 Julian> the following:

 Julian> Decimal encoding for binary strings will be used only where
 Julian> the length of the binary string is explicitly defined (by a
 Julian> constant or a rule that does not use the encoding itself)

 Julian> The definition for decimal constant becomes:

 Julian> decimal-constant: an unsigned decimal number - the digit 0 or
 Julian> a string of 1 or more digits starting with a non-zero
 Julian> digit. This encoding is not used for numerical values equal
 Julian> or greater than 2**64. Decimal-constants are used to encode
 Julian> numerical values or binary strings. Decimal constants can be
 Julian> used to encode binary strings only if the stringlength is
 Julian> explicitly specified. There is no implicit length for
 Julian> deci-mal strings.

The point about "no implicitic length" certainly helps.

I like David's suggestion (DLB's comments T.12) to disallow decimal
for data items that are capable of being larger than 2**64 -- rather
than tying it to whether the particular value being encoded happens to
be bigger or smaller than 2*64.  That way it essentially becomes a
property of the data type, which seems like a logical way to go.

Text to do that would be something like "This encoding is not used for
parameters that may have a value >= 2**64" or alternatively "This
encoding is used only with parameters whose largest permitted value is
less than 2**64".

	 paul