summaryrefslogtreecommitdiff
path: root/source/nmbd
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-06-29 18:49:20 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-06-29 18:49:20 +0000
commit7e8c60cfe54060860e5ce20b1c3b8ec6aa5c54da (patch)
tree8015d1bd6233a588ea491f44673d726d7d32f7f1 /source/nmbd
parent6d81d56f929e763bcf6b1f7a61aabaf884c4aad4 (diff)
downloadsamba-7e8c60cfe54060860e5ce20b1c3b8ec6aa5c54da.tar.gz
luke's first attempt at using cvs
accidentally updated the Makefile updated the name database structure (again!). this time, there is one name database per local interface. there is also a pseudo-interface on ip 255.255.255.255. its purpose is to store WINS name entries. all the local interface name databases store SELF names only. the WINS name database stores non-special browser names. added wins.dat file: records WINS entries in ascii format. this is reloaded when nmbd restarts. added repeating code for response packets. timer is in seconds only at the moment. updated the response queue code to deal with samba registering with a WINS server a bit better (added more cases when a response isn't received). tidied up the response packet processing code and expire_response_queue() code. added cross references between response received and await-response expired code. added over-zealous code that checks all machines that register with samba as a WINS server (every 10 minutes i think): to see whether they are still alive or not (see rfc1001.txt) bug reported by terry@ren.pc.athabascau.ca: DNSFAILed names _stay_ as DNSFAIL, even though the machine may come back up and REGISTER. removed update_from_reg() function. it's not necessary, and it does too much. added code that announces on each local interface samba's ttl as zero and servertype as zero when nmbd is kill -TERMed first attempt at putting the first functionality of samba browsing back in (remote subnets should have samba appear in a workgroup specified through the lmhosts file) lots of other miscellaneous tidying up / chopping about.
Diffstat (limited to 'source/nmbd')
-rw-r--r--source/nmbd/nmbd.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index a20c4eb9993..1d541ea95f0 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -69,6 +69,9 @@ static int sig_term()
/* remove all samba names, with wins server if necessary. */
remove_my_names();
+ /* announce all server entries as 0 time-to-live, 0 type */
+ remove_my_servers();
+
/* XXXX don't care if we never receive a response back... yet */
/* XXXX other things: if we are a master browser, force an election? */
@@ -204,6 +207,7 @@ BOOL reload_services(BOOL test)
}
load_interfaces();
+ add_subnet_interfaces();
return(ret);
}
@@ -286,9 +290,13 @@ static void load_hosts_file(char *fname)
ipmask = *iface_nmask(ipaddr);
if (group) {
- add_subnet_entry(ipaddr, ipmask, name, True);
+ add_subnet_entry(ipaddr, ipmask, name, True, True);
} else {
- add_netbios_entry(name,0x20,NB_ACTIVE,0,source,ipaddr,True);
+ struct subnet_record *d = find_subnet(ipaddr);
+ if (d)
+ {
+ add_netbios_entry(d,name,0x20,NB_ACTIVE,0,source,ipaddr,True,True);
+ }
}
}
}
@@ -316,16 +324,19 @@ static void process(void)
announce_host();
#if 0
- /* what was this stuff supposed to do? It sent
+ /* XXXX what was this stuff supposed to do? It sent
ANN_GetBackupListReq packets which I think should only be
sent when trying to find out who to browse with */
+
announce_backup();
#endif
announce_master();
+ query_refresh_names();
+
expire_names_and_servers();
- expire_netbios_response_entries(t-10);
+ expire_netbios_response_entries();
refresh_my_names(t);
write_browse_list();
@@ -514,7 +525,7 @@ static void usage(char *pname)
return(-1);
if (*group)
- add_my_domains(group);
+ add_my_subnets(group);
if (!is_daemon && !is_a_socket(0)) {
DEBUG(0,("standard input is not a socket, assuming -D option\n"));
@@ -535,16 +546,22 @@ static void usage(char *pname)
DEBUG(3,("Loaded hosts file\n"));
}
+
+
if (!*ServerComment)
strcpy(ServerComment,"Samba %v");
string_sub(ServerComment,"%v",VERSION);
string_sub(ServerComment,"%h",myhostname);
add_my_names();
- add_my_domains(lp_workgroup());
+ add_my_subnets(lp_workgroup());
DEBUG(3,("Checked names\n"));
+ load_netbios_names();
+
+ DEBUG(3,("Loaded names\n"));
+
write_browse_list();
DEBUG(3,("Dumped names\n"));