2 * Copyright (C) Joerg Lenneis 2003
3 * Copyright (C) Frank Lahm 2010
4 * All Rights Reserved. See COPYING.
7 #ifndef CNID_DBD_PACK_H
8 #define CNID_DBD_PACK_H 1
11 #include <atalk/cnid_dbd_private.h>
13 #define ntoh64(x) (((uint64_t)(x) << 56) | \
14 (((uint64_t)(x) << 40) & 0xff000000000000ULL) | \
15 (((uint64_t)(x) << 24) & 0xff0000000000ULL) | \
16 (((uint64_t)(x) << 8) & 0xff00000000ULL) | \
17 (((uint64_t)(x) >> 8) & 0xff000000ULL) | \
18 (((uint64_t)(x) >> 24) & 0xff0000ULL) | \
19 (((uint64_t)(x) >> 40) & 0xff00ULL) | \
20 ((uint64_t)(x) >> 56))
22 extern unsigned char *pack_cnid_data(struct cnid_dbd_rqst *);
23 extern int didname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
24 extern int devino(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
25 extern int idxname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
27 #endif /* CNID_DBD_PACK_H */