NetBIOS Name comparison.

Christopher R. Hertel crh at
Wed Nov 1 23:37:58 GMT 2000

Of interest...

- RFC 1001/1002 do not actually make clear whether the case of the NetBIOS 
  Name is significant.  (Please show me I'm wrong.  I'd really like to be.)
  The RFCs do refer to RFC 883 which says that DNS name comparisons should
  be case-insensitive.  This has to do with the encoded name, however, not
  the original NetBIOS name.

- The assumption is made that NetBIOS name comparisons should be non-case 

- The Windows products I've tested all convert the NetBIOS name to upper 
  case before encoding, thus normalizing the name.  Samba does the same.

! In my tests, Windows95 will not respond to a query that is formed using 
  a lower case NetBIOS name...but Samba will.

So, Microsoft is doing their comparisons against the encoded name and not
bothering to decode the name before doing the compare.  Samba, on the
other hand, is decodng the name and doing a case-insensitive comparison. 

The question is:  are there SMB servers/clients out there that actually
encode the lower-case version of the name?  If so, then Samba should
decode the name and do a case-insensitive compare.  If not, then it might
be faster to store all names in encoded format and compare the encoded

Probably minor, but worth a few cycles.

Chris -)-----

Christopher R. Hertel -)-----                   University of Minnesota
crh at              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz

More information about the samba-technical mailing list