summaryrefslogtreecommitdiffstats
path: root/source/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
commit7806c453df02a89f67e7c5c8b91f24aa2274e756 (patch)
treeea2466be2ade60eaf90c36f749bc9054319ed162 /source/include/nameserv.h
parentfb6ed81844e7cb6049749e43ac9b4adfaf4ca2de (diff)
downloadsamba-7806c453df02a89f67e7c5c8b91f24aa2274e756.tar.gz
samba-7806c453df02a89f67e7c5c8b91f24aa2274e756.tar.xz
samba-7806c453df02a89f67e7c5c8b91f24aa2274e756.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 -)-----
Diffstat (limited to 'source/include/nameserv.h')
-rw-r--r--source/include/nameserv.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/include/nameserv.h b/source/include/nameserv.h
index f1707115caa..0ba7acda189 100644
--- a/source/include/nameserv.h
+++ b/source/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;