superlifter design notes and a new proposal

Martin Pool mbp at samba.org
Mon Aug 5 19:24:01 EST 2002


On  6 Aug 2002, Tim Potter <tpot at samba.org> wrote:

> I worked on a project where we used four character mnemonics for command
> names.  Reading them in hex dumps or whatever didn't turn out to be
> particularly useful.  In fact I doubt that ever actually occured.
> 
> The worst bit was those stupid four character acronyms insinuated
> themselves all through the code.  It was very confusing.  It also
> became more difficult to think up new names after there were more than a
> couple of similar commands.  More confusion.

I can certainly see how that would occur.  (I wasn't so dumb in my
code. :-)

I think the only thing here that I really case about is that magic
numbers should be "sufficiently magical".  

Numbering commands from 0 is not ideal because 0 words will often
occur for reasons other than command #0.  If commands (or errors, or
whatever) start at, 0xc0000000 or 69 or whatever and go up, then

 - any incorrect values will be really obvious; there will be no
   false matches

 - (less important) it's easy for humans to recognize them in a hex
   dump

> Write a dissector for ethereal instead.

There is no ethereal cabal?

-- 
Martin 




More information about the rsync mailing list