2 * interface for database access to cnids. i do it this way to abstract
3 * things a bit in case we want to change the underlying implementation.
6 #ifndef _ATALK_CNID_HASH__H
7 #define _ATALK_CNID_HASH__H 1
14 #include <netatalk/endian.h>
15 #include <atalk/cnid.h>
28 #include <atalk/tdb.h>
30 #define HASH_ERROR_LINK 1
31 #define HASH_ERROR_DEV 2
32 #define HASH_ERROR_INODE 4
34 struct _cnid_hash_private {
42 extern struct _cnid_module cnid_hash_module;
43 extern struct _cnid_db *cnid_hash_open __P((const char *, mode_t));
46 extern void cnid_hash_close __P((struct _cnid_db *));
49 extern cnid_t cnid_hash_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
50 char *, const int, cnid_t));
53 extern cnid_t cnid_hash_get __P((struct _cnid_db *, const cnid_t, char *, const int));
54 extern char *cnid_hash_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
55 extern cnid_t cnid_hash_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
58 extern int cnid_hash_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
59 const cnid_t, char *, int));
62 extern int cnid_hash_delete __P((struct _cnid_db *, const cnid_t));
65 extern cnid_t cnid_hash_nextid __P((struct _cnid_db *));
67 #endif /* include/atalk/cnid_hash.h */