2 * $Id: cnid_cdb_private.h,v 1.7 2009-11-20 17:22:11 didg Exp $
5 #ifndef LIBATALK_CDB_PRIVATE_H
6 #define LIBATALK_CDB_PRIVATE_H 1
10 #endif /* HAVE_CONFIG_H */
12 #include <netatalk/endian.h>
16 #endif /* HAVE_UNISTD_H */
22 #endif /* HAVE_FCNTL_H */
23 #include <sys/param.h>
25 #ifdef HAVE_SYS_TIME_H
27 #endif /* HAVE_SYS_TIME_H */
31 #include <sys/cdefs.h>
34 #include <atalk/logger.h>
35 #include <atalk/adouble.h>
36 #include <atalk/cnid_private.h>
37 #include <atalk/cnid.h>
38 #include <atalk/util.h>
45 type/last cnid 4 Not used
57 typedef struct cnid_record { /* helper for debug don't use */
66 typedef struct CNID_private {
73 char lock_file[MAXPATHLEN + 1];
76 /* XXX stuff below is outdate */
77 /* on-disk data format (in network byte order where appropriate) --
78 * db_cnid: (key: cnid)
79 * name size (in bytes)
83 * unix name strlen(name) + 1
85 * db_didname: (key: did/unix name)
86 * -- this also caches the bits of .AppleDouble used by FPGetFilDirParam
87 * so that we don't have to open the header file.
88 * NOTE: FPCatSearch has to search through all of the directories as
89 * this stuff doesn't get entered until needed.
90 * if the entire volume is in the database, though, we can use
91 * cursor operations to make this faster.
93 * version number is stored with did/name key of 0/0
96 * modfiller 4 (dates only use 4 bytes right now, but we leave space
97 * moddate 4 for 8. moddate is also used to keep this info
98 * createfiller 4 up-to-date.)
102 * accfiller 4 (unused)
104 * AFP info 4 (stores a couple permission bits as well)
109 * macname 32 (nul-terminated)
110 * shortname 12 (nul-terminated)
111 * longname longnamelen (nul-terminated)
113 * 132 bytes + longnamelen
115 * db_devino: (key: dev/ino)
116 * -- this is only used for consistency checks and isn't 1-1
119 * these correspond to the different path types. longname is for the
120 * 255 unicode character names (path type == ?), macname is for the
121 * 32-character names (path type == 2), and shortname is for the
122 * 8+3-character names (path type == 1).
124 * db_longname: (key: did/longname)
125 * name namelen = strlen(name) + 1
127 * db_macname: (key: did/macname)
128 * name namelen = strlen(name) + 1
130 * db_shortname: (key: did/shortname)
131 * name namelen = strlen(name) + 1
134 /* construct db_cnid data. NOTE: this is not re-entrant. */
135 extern unsigned char *make_cnid_data (u_int32_t flags, const struct stat *,const cnid_t ,
136 const char *, const size_t );
138 #endif /* atalk/cnid/cnid_private.h */