|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: iSCSI base64 and 12-92On Thursday, May 23, 2002 7:07 AM, Julian Satran wrote: > As we have to keep them for numbers I reinstated them for small values too > (why implement a check) and for those that don't take > numerical big-endian representation for granted there is now text that > says it without referring to internal representation. Retaining base-64 encoding for normal-sized numbers (size less than or equal to the machine's largest arithmetic word size, usually 32 or 64 bits) may make the language in the spec simpler, but it does NOT simplify implementation by eliminating a check; in fact, it would require additional checks and implementation complexity. Keys that can contain large numbers (larger than the machine's largest arithmetic word size) must be handled differently from normal-sized numbers anyway, precisely because they are beyond the machine's normal arithmetic capabilities; therefore, a check based on the key type must be done no matter what. If the spec requires support for base-64 encoding for normal-sized numbers, implementers will also have to check for the "0b" prefix, pass the string off to a base-64 decoding routine (taking care not to overflow the machine's word size), and then properly pad, byte-swap, and cast the result, or, if "0b" was not found, call strtol() instead. This seems like needless implementation complexity to support something NOBODY will do, i.e., specify a normal-sized number like MaxConnections in base 64! If the base-64 requirement for normal-sized numbers were dropped, a single call to strtol() would suffice. In short, let's keep it simple: decimal and hexadecimal representations for normal-sized numbers, hexadecimal and base-64 representations for binary items and large-sized numbers. (I would still argue that "large-sized numbers" are just a special case of binary items, but that's a fine point.) Michael -- Michael J. Krueger mailto:michael.krueger@windriver.com Wind River Networks http://www.windriver.com 500 Wind River Way phone: 510-749-2130 Alameda, CA 94501 fax: 510-749-2010
Home Last updated: Thu May 23 16:18:34 2002 10264 messages in chronological order |