summaryrefslogtreecommitdiff
path: root/lib/ntdb/ntdb.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-19 12:43:08 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-19 05:38:07 +0200
commit87f871aae392279b9475ea74ffe3bb9149e02e7c (patch)
treeaa6e6a1734249c94a5945c51b47f2c344fe5c685 /lib/ntdb/ntdb.h
parentdd42962878ab7c9ddfa79d7c32094fb6748017b8 (diff)
downloadsamba-87f871aae392279b9475ea74ffe3bb9149e02e7c.tar.gz
samba-87f871aae392279b9475ea74ffe3bb9149e02e7c.tar.bz2
samba-87f871aae392279b9475ea74ffe3bb9149e02e7c.zip
ntdb: add NTDB_ATTRIBUTE_HASHSIZE
Since we've given up on expansion, let them frob the hashsize again. We have attributes, so we should use them for optional stuff like this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ntdb/ntdb.h')
-rw-r--r--lib/ntdb/ntdb.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/ntdb/ntdb.h b/lib/ntdb/ntdb.h
index 09622787d4..8e8458e4d1 100644
--- a/lib/ntdb/ntdb.h
+++ b/lib/ntdb/ntdb.h
@@ -633,7 +633,8 @@ enum ntdb_attribute_type {
NTDB_ATTRIBUTE_STATS = 3,
NTDB_ATTRIBUTE_OPENHOOK = 4,
NTDB_ATTRIBUTE_FLOCK = 5,
- NTDB_ATTRIBUTE_ALLOCATOR = 6
+ NTDB_ATTRIBUTE_ALLOCATOR = 6,
+ NTDB_ATTRIBUTE_HASHSIZE = 7
};
/**
@@ -867,6 +868,17 @@ struct ntdb_attribute_flock {
};
/**
+ * struct ntdb_attribute_hashsize - ntdb hashsize setting.
+ *
+ * This attribute is only settable on ntdb_open; it indicates that we create
+ * a hashtable of the given size, rather than the default.
+ */
+struct ntdb_attribute_hashsize {
+ struct ntdb_attribute_base base; /* .attr = NTDB_ATTRIBUTE_HASHSIZE */
+ uint32_t size;
+};
+
+/**
* struct ntdb_attribute_allocator - allocator for ntdb to use.
*
* You can replace malloc/free with your own allocation functions.
@@ -910,6 +922,7 @@ union ntdb_attribute {
struct ntdb_attribute_openhook openhook;
struct ntdb_attribute_flock flock;
struct ntdb_attribute_allocator alloc;
+ struct ntdb_attribute_hashsize hashsize;
};
#ifdef __cplusplus