|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: iSCSI: Text/Operational keys: booleans and rangesLuben, For the booleans - 1 and 0 are also integers. The parsing of strings is already mandated (for keys and string values) so no harm in letting them be text. For ranges - I think you have a good point and if I don't hear anything against it I will introduce it in 12 (I would suggest a colon or a double-colon instead of dash). Regards, Julo
1. Is it possible to make all Boolean Text/Operational keys's value range be ``0'' and ``1'', rather than the current ``Yes'', ``No''. Since those are _Boolean_ values, what will be the objection to this? A user interface will probably display ``Yes'' and ``No'', but in the protocol, why burden implementations with string comparison, case-sensitive on top of this, rather than use strtol(), this making content check easier (strtol() will detect range errors, e.g. ``OFMarker=hello''). 2. Why not make integer ranges, like OFMarkInt, use dash, ``-'' ASCII: 0x2d, like ``1-65535'', indicating all values in the interval. The reason is that in the future there may be a text/operational key which can take only a set of distinct integer values, but no range, e.g. ``SomeBit=0,4,8,16'', That is ``SomeBit'' is still an integer variable but in negotiation it can choose between certain disctinct values. Furthermore the standard text/operational code which many of you already have written will work in this situation, only add atoi()/strtol() at the end... Comments? -- Luben
Home Last updated: Tue Mar 12 14:18:16 2002 9065 messages in chronological order |