Multi-WINS behavior.

Christopher R. Hertel crh at
Wed Jul 19 05:12:56 GMT 2000

Dear WINS fans,

This is a quick status report on the WINS failover code:

- I wrote a new module called wins_srv.c, and then rewrote it again after
  I thought about it a bit.  Ah, well...

- There are three key functions:
    - This function parses a string of IP addresses and DNS names and
      loads the results into a linked list.
    - This function returns the (struct in_addr) IP address of the first
      'live' WINS server.
    - Used to indicate that a WINS server has died.  This should be called
      whenever no response at all is given by a WINS server.
    - Lists the number of entries in the failover list.

Some quick notes:

- If the WINS server was entered as a DNS name in smb.conf, then a name 
  lookup was being performed every time a WINS query or registration was 
  performed.  Ick.  What I do instead is to cache the IP address once it's
  found.  If the WINS server is marked 'dead', then I clear the IP address
  and look it up again when the WINS server is alive again.  A failed
  lookup kills the entry, so the code won't repeat the lookup for another 
  ten minutes.

- If smb.conf is re-read then the list is reset and things start all over 
  again.  The wins_srv list should not be out of sync with

- The functions above are implemented, but not yet fully integrated with 
  the the rest of the code.  There are...issues.  Some of the nmbd
  processing relies on a namelist called the "unicast" list.  I think that
  I might have to update this list whenever a WINS server is marked dead,
  but I'm not sure yet. 

- I know how to do multi-membership (the ability to register with and 
  query multiple WINS server sets), but there are a lot issues to be 
  worked out regarding the rest of the code.  This will need some thought. 

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