summaryrefslogtreecommitdiff
path: root/source3/include/nameserv.h
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-06-10 19:51:58 +0000
committerChristopher R. Hertel <crh@samba.org>1998-06-10 19:51:58 +0000
commitd4366df039dfd730fe24c95b9ef7d59306f35309 (patch)
treed872bd4ba5aa2aabecadf8d71382ba758aa00928 /source3/include/nameserv.h
parent72bf410b6e9b85f8fbff7f6175661829bef35f62 (diff)
downloadsamba-d4366df039dfd730fe24c95b9ef7d59306f35309.tar.gz
samba-d4366df039dfd730fe24c95b9ef7d59306f35309.tar.bz2
samba-d4366df039dfd730fe24c95b9ef7d59306f35309.zip
I've replaced the linked list used to manage the subnet namelists with a
splay tree. For short lists, this will have no noticable effect. As lists (eg. the WINS database) grow longer, the speed improvements should be quite dramatic. This change is an incremental step toward replacing the in-memory namelists with a back-end database. This change is going into the 1.9.19pre-alpha code because...well...it's pre-alpha. Please let me know if there are any problems. (Oh, as a side-effect, the wins.dat will be in sorted order. :) Chris -)----- (This used to be commit 7806c453df02a89f67e7c5c8b91f24aa2274e756)
Diffstat (limited to 'source3/include/nameserv.h')
-rw-r--r--source3/include/nameserv.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h
index f1707115ca..0ba7acda18 100644
--- a/source3/include/nameserv.h
+++ b/source3/include/nameserv.h
@@ -191,13 +191,13 @@ struct nmb_data
/* This is the structure used for the local netbios name list. */
struct name_record
-{
- struct name_record *next;
- struct name_record *prev;
+ {
+ ubi_trNode node[1];
+
struct subnet_record *subnet;
- struct nmb_name name; /* The netbios name. */
- struct nmb_data data; /* The netbios data. */
-};
+ struct nmb_name name; /* The netbios name. */
+ struct nmb_data data; /* The netbios data. */
+ };
/* Browser cache for synchronising browse lists. */
struct browse_cache_record
@@ -404,9 +404,9 @@ struct subnet_record
char *subnet_name; /* For Debug identification. */
enum subnet_type type; /* To catagorize the subnet. */
- struct work_record *workgrouplist; /* List of workgroups. */
- struct name_record *namelist; /* List of netbios names. */
- struct response_record *responselist; /* List of responses expected. */
+ struct work_record *workgrouplist; /* List of workgroups. */
+ ubi_trRoot namelist[1]; /* List of netbios names. */
+ struct response_record *responselist; /* List of responses expected. */
BOOL namelist_changed;
BOOL work_changed;