#define CNID_DBD_OP_MANGLE_GET 0x0a
#define CNID_DBD_OP_GETSTAMP 0x0b
#define CNID_DBD_OP_REBUILD_ADD 0x0c
+#define CNID_DBD_OP_SEARCH 0x0d
#define CNID_DBD_RES_OK 0x00
#define CNID_DBD_RES_NOTFOUND 0x01
#define CNID_DBD_RES_ERR_DB 0x02
#define CNID_DBD_RES_ERR_MAX 0x03
#define CNID_DBD_RES_ERR_DUPLCNID 0x04
+#define CNID_DBD_RES_SRCH_CNT 0x05
+#define CNID_DBD_RES_SRCH_DONE 0x06
+
+#define DBD_MAX_SRCH_RPLY_PAYLOAD 4096
struct cnid_dbd_rqst {
int op;
cnid_t cnid;
dev_t dev;
ino_t ino;
- u_int32_t type;
- cnid_t did;
+ union {
+ uint32_t type;
+ uint32_t reqcount; /* for dbd_search: number of results per query */
+ };
+ union {
+ cnid_t did;
+ uint32_t sindex; /* for dbd_search: continuation index */
+ };
char *name;
size_t namelen;
};
struct cnid_dbd_rply {
int result;
- cnid_t cnid;
+ union {
+ cnid_t cnid;
+ uint32_t count; /* for dbd_search: number of returned names */
+ };
cnid_t did;
char *name;
size_t namelen;