Question about Node Status Request made to name "*"

Christopher R. Hertel crh at
Fri Jul 20 15:53:45 GMT 2001


The '*' name is described in RFC1001/1002.  It really is a wildcard.  It
is also encoded differently.  All other names are padded with spaces
(except some newer exceptions introduced by Microsoft--ick).  The 
wildcard name is padded with null bytes.  The encoded form is:


Samba decodes all NetBIOS names before processing them.  That way, we can
apply case-insensitive string comparisons and such.  Microsoft takes a
(valid) shortcut.  They compare the encoded strings.  So, in their code,
Microsoft sees CKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA as the wildcard name, not

You can test this very simply.  Write a quick C program (I'll give you a
link to one below) that sends broadcast wildcard queries.  If you pad with
spaces, Samba will still reply to the wildcard query, but Windows won't. 

Also, you can use the code to send queries in lower case (nmblookup and 
Microsoft's nbtstat always upper-case the name before encoding).  If you 
send broadcast queries in lower case, Samba servers will answer (if the 
name is in their name list) but Windows systems won't.

Fun, eh?

See for docs.

Chris -)-----

> Hello all-
> I'm trying to understand how Samba behaves in the event that it
> receives a Node Status Request with a question name of "*".  I don't
> understand Microsoft's use of this wildcard name..
> I've look at the code (process_node_status_request() in
> nmbd/nmbd_incomingrequests.c) and it appears that Samba will just
> respond to this as though it were addressed by name directly; in
> other words, it truly is a wildcard name.
> Can anyone comment on if this is true?
> My next step would be to capture some traffic to see for sure, but
> that will take me a bit of setup time to get that going..
> Thanks for any information in advance-

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