summaryrefslogtreecommitdiff
path: root/source3/nsswitch/wins.c
AgeCommit message (Collapse)AuthorFilesLines
2000-10-11Converted to call lib/wins_srv.c:wins_srv_ip() instead of lp_wins_server()Christopher R. Hertel1-4/+4
when looking up the WINS server address. Please *don't* use lp_wins_server() any more! The wins_srv_ip() function has the following features: - If the WINS server was entered as a DNS name then the translation to an IP address will already have taken place. We used to do this every time a call to the WINS server was made. Ick. - The return value of wins_srv_ip() is a struct in_addr. Ready to go. - When WINS failover is fully implemented, you'll be able to enter a colon- separated list of WINS servers via the WINS SERVER parameter. Using lp_wins_server() directly will fail if this syntax is used. Chris -)----- (This used to be commit 56be7c2a49a8a918318a70843fff4e89ec10d0d3)
2000-10-09Fixes to allow wins.c to compile to allow building of libnss_wins.so.John Terpstra1-2/+11
(This used to be commit 3fb2e94c4430c570639c0e4d1caeed3a19bbd09b)
2000-07-19Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel1-4/+2
string), the wins_srv module now hands back a struct in_addr when it's called. It caches the IP address once it has been looked up. The IP is cleared (and must be looked up again) if the 'wins server' parameter is reread, or if the node is marked 'dead'. A dead node will not be re-tried for 10 minutes (per a #define in wins_srv.c). As it was, the code was reading the WINS server name or IP directly from lp_wins_server. That's okay, except that if the value was expressed as a name, then a DNS lookup would be done every time the client wanted to talk to the server. I still need to work out the implications of failover regarding the 'unicast subnet' list. Chris -)----- (This used to be commit 73aa188320fd3bf10b5dfc057323f40aff2c13bd)
2000-07-19First cut toward adding WINS server failover.Christopher R. Hertel1-1/+1
*Note: failover doesn't actually work yet!* It's just that the code I'm adding provides all of the pieces necessary. I do have one big question. Something that I'll have to ask Jeremy, I'm thinkin'. In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to set up the Unicast subnet. ...so what happens if the WINS server changes? My guess is either: a) nothing. b) I'd have to change the unicast subnet entry whenever the WINS server changes. Urq. BTW, the lp_wins_server() function no longer returns the WINS server name or IP. It returns the list of WINS servers entered in smb.conf. To get the currently 'live' WINS server, use the wins_srv() function. Fun, eh? Chris -)----- (This used to be commit cc08bdc74f4cd111fdc582ee7babef47ed8a950d)
2000-01-07remove scope parameter here tooAndrew Tridgell1-3/+3
(This used to be commit c78deb1d229bd301be483a256f1fd2047cec6120)
1999-12-17added basic nsswitch support - this allows you to use a "wins" entryAndrew Tridgell1-0/+129
in a /etc/nsswitch.conf hosts line. Only tested on RH6.1, but should work on a broad range of Linux distributions. It could probably be made to work with Solaris pretty easily. It does not build by default. Build it with "make nsswitch" (This used to be commit 4058eb5bffeec539f71786580376419ea5749351)