aboutsummaryrefslogtreecommitdiff
path: root/nscd/nscd-client.h
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd-client.h')
-rw-r--r--nscd/nscd-client.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
index caad26a9cc..b5cd2d2c1e 100644
--- a/nscd/nscd-client.h
+++ b/nscd/nscd-client.h
@@ -260,12 +260,17 @@ struct hashentry
/* Current persistent database version. */
-#define DB_VERSION 1
+#define DB_VERSION 2
/* Maximum time allowed between updates of the timestamp. */
#define MAPPING_TIMEOUT (5 * 60)
+/* Used indices for the EXTRA_DATA element of 'database_pers_head'.
+ Each database has its own indices. */
+#define NSCD_HST_IDX_CONF_TIMESTAMP 0
+
+
/* Header of persistent database file. */
struct database_pers_head
{
@@ -274,6 +279,8 @@ struct database_pers_head
volatile int32_t gc_cycle;
volatile int32_t nscd_certainly_running;
volatile nscd_time_t timestamp;
+ /* Room for extensions. */
+ volatile uint32_t extra_data[4];
nscd_ssize_t module;
nscd_ssize_t data_size;
@@ -322,6 +329,12 @@ extern int __nscd_open_socket (const char *key, size_t keylen,
request_type type, void *response,
size_t responselen) attribute_hidden;
+/* Try to get a file descriptor for the shared meory segment
+ containing the database. */
+extern struct mapped_database *__nscd_get_mapping (request_type type,
+ const char *key,
+ struct mapped_database **mappedp) attribute_hidden;
+
/* Get reference of mapping. */
extern struct mapped_database *__nscd_get_map_ref (request_type type,
const char *name,
@@ -371,4 +384,7 @@ extern ssize_t writeall (int fd, const void *buf, size_t len)
extern ssize_t sendfileall (int tofd, int fromfd, off_t off, size_t len)
attribute_hidden;
+/* Get netlink timestamp counter from mapped area or zero. */
+extern uint32_t __nscd_get_nl_timestamp (void);
+
#endif /* nscd.h */