1 #ifndef LIBATALK_CDB_PRIVATE_H
2 #define LIBATALK_CDB_PRIVATE_H 1
6 #endif /* HAVE_CONFIG_H */
13 #include <sys/param.h>
17 #include <arpa/inet.h>
21 #include <atalk/logger.h>
22 #include <atalk/adouble.h>
23 #include <atalk/cnid_private.h>
24 #include <atalk/cnid.h>
25 #include <atalk/util.h>
32 type/last cnid 4 Not used
44 typedef struct cnid_record { /* helper for debug don't use */
53 typedef struct CNID_private {
60 char lock_file[MAXPATHLEN + 1];
63 /* XXX stuff below is outdate */
64 /* on-disk data format (in network byte order where appropriate) --
65 * db_cnid: (key: cnid)
66 * name size (in bytes)
70 * unix name strlen(name) + 1
72 * db_didname: (key: did/unix name)
73 * -- this also caches the bits of .AppleDouble used by FPGetFilDirParam
74 * so that we don't have to open the header file.
75 * NOTE: FPCatSearch has to search through all of the directories as
76 * this stuff doesn't get entered until needed.
77 * if the entire volume is in the database, though, we can use
78 * cursor operations to make this faster.
80 * version number is stored with did/name key of 0/0
83 * modfiller 4 (dates only use 4 bytes right now, but we leave space
84 * moddate 4 for 8. moddate is also used to keep this info
85 * createfiller 4 up-to-date.)
89 * accfiller 4 (unused)
91 * AFP info 4 (stores a couple permission bits as well)
96 * macname 32 (nul-terminated)
97 * shortname 12 (nul-terminated)
98 * longname longnamelen (nul-terminated)
100 * 132 bytes + longnamelen
102 * db_devino: (key: dev/ino)
103 * -- this is only used for consistency checks and isn't 1-1
106 * these correspond to the different path types. longname is for the
107 * 255 unicode character names (path type == ?), macname is for the
108 * 32-character names (path type == 2), and shortname is for the
109 * 8+3-character names (path type == 1).
111 * db_longname: (key: did/longname)
112 * name namelen = strlen(name) + 1
114 * db_macname: (key: did/macname)
115 * name namelen = strlen(name) + 1
117 * db_shortname: (key: did/shortname)
118 * name namelen = strlen(name) + 1
121 /* construct db_cnid data. NOTE: this is not re-entrant. */
122 extern unsigned char *make_cnid_data (u_int32_t flags, const struct stat *,const cnid_t ,
123 const char *, const size_t );
125 #endif /* atalk/cnid/cnid_private.h */