netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
cnid_bdb_private.h
Go to the documentation of this file.
1
12
13
14#ifndef _ATALK_CNID_DBD_PRIVATE_H
15#define _ATALK_CNID_DBD_PRIVATE_H 1
16
17#include <sys/param.h>
18#include <sys/stat.h>
19
20#include <atalk/adouble.h>
21#include <atalk/cnid_private.h>
22
23#define CNID_DBD_OP_OPEN 0x01
24#define CNID_DBD_OP_CLOSE 0x02
25#define CNID_DBD_OP_ADD 0x03
26#define CNID_DBD_OP_GET 0x04
27#define CNID_DBD_OP_RESOLVE 0x05
28#define CNID_DBD_OP_LOOKUP 0x06
29#define CNID_DBD_OP_UPDATE 0x07
30#define CNID_DBD_OP_DELETE 0x08
31#define CNID_DBD_OP_MANGLE_ADD 0x09
32#define CNID_DBD_OP_MANGLE_GET 0x0a
33#define CNID_DBD_OP_GETSTAMP 0x0b
34#define CNID_DBD_OP_REBUILD_ADD 0x0c
35#define CNID_DBD_OP_SEARCH 0x0d
36#define CNID_DBD_OP_WIPE 0x0e
37
38#define CNID_DBD_RES_OK 0x00
39#define CNID_DBD_RES_NOTFOUND 0x01
40#define CNID_DBD_RES_ERR_DB 0x02
41#define CNID_DBD_RES_ERR_MAX 0x03
42#define CNID_DBD_RES_ERR_DUPLCNID 0x04
43#define CNID_DBD_RES_SRCH_CNT 0x05
44#define CNID_DBD_RES_SRCH_DONE 0x06
45
46/* DBD_MAX_SRCH_RSLTS is the wire-protocol maximum batch size for the
47 * SEARCH op. It must equal CNID_FIND_MIN_RESULTS in <atalk/cnid.h>;
48 * the wrapper's lower-bound buflen check uses the latter so that the
49 * sqlite/mysql backends do not have to include this DBD-private header. */
50#define DBD_MAX_SRCH_RSLTS 100
51#define DBD_SEARCH_MAX_OFFSET 50000
52#define DBD_FIND_DEADLINE_SEC 10
53#define DBD_NUM_OPEN_ARGS 3
54
55/* NOTE: Spotlight's per-term minimum length (formerly named
56 * DBD_SEARCH_MIN_NAMELEN here) is intentionally NOT defined in this
57 * header. It is a Spotlight-backend policy, not a DBD wire-protocol
58 * constant; placing it here would force etc/spotlight/cnid/sl_cnid.c
59 * to include this DBD-private header. The constant lives as
60 * `SL_CNID_MIN_TERMLEN` inside etc/spotlight/cnid/sl_cnid.c */
61
63 int op;
65 dev_t dev;
66 ino_t ino;
67 uint32_t type;
69 const char *name;
70 size_t namelen;
71};
72
80
90
91
92#endif /* include/atalk/cnid_dbd.h */
Part of Netatalk's AppleDouble implementatation.
#define ADEDLEN_PRIVSYN
Definition adouble.h:112
uint32_t cnid_t
Definition adouble.h:156
Definition cnid_bdb_private.h:81
char stamp[ADEDLEN_PRIVSYN]
Definition cnid_bdb_private.h:84
int changed
Definition cnid_bdb_private.h:88
int notfirst
Definition cnid_bdb_private.h:87
char * client_stamp
Definition cnid_bdb_private.h:85
struct vol * vol
Definition cnid_bdb_private.h:82
int fd
Definition cnid_bdb_private.h:83
size_t stamp_size
Definition cnid_bdb_private.h:86
Definition cnid_bdb_private.h:73
char * name
Definition cnid_bdb_private.h:77
cnid_t cnid
Definition cnid_bdb_private.h:75
cnid_t did
Definition cnid_bdb_private.h:76
size_t namelen
Definition cnid_bdb_private.h:78
int result
Definition cnid_bdb_private.h:74
Definition cnid_bdb_private.h:62
size_t namelen
Definition cnid_bdb_private.h:70
ino_t ino
Definition cnid_bdb_private.h:66
cnid_t did
Definition cnid_bdb_private.h:68
const char * name
Definition cnid_bdb_private.h:69
cnid_t cnid
Definition cnid_bdb_private.h:64
uint32_t type
Definition cnid_bdb_private.h:67
dev_t dev
Definition cnid_bdb_private.h:65
int op
Definition cnid_bdb_private.h:63