2 * $Id: pack.h,v 1.4 2009-04-28 13:01:24 franklahm Exp $
4 * Copyright (C) Joerg Lenneis 2003
5 * All Rights Reserved. See COPYING.
8 #ifndef CNID_DBD_PACK_H
9 #define CNID_DBD_PACK_H 1
12 #include <atalk/cnid_dbd_private.h>
14 #define ntoh64(x) (((uint64_t)(x) << 56) | \
15 (((uint64_t)(x) << 40) & 0xff000000000000ULL) | \
16 (((uint64_t)(x) << 24) & 0xff0000000000ULL) | \
17 (((uint64_t)(x) << 8) & 0xff00000000ULL) | \
18 (((uint64_t)(x) >> 8) & 0xff000000ULL) | \
19 (((uint64_t)(x) >> 24) & 0xff0000ULL) | \
20 (((uint64_t)(x) >> 40) & 0xff00ULL) | \
21 ((uint64_t)(x) >> 56))
23 extern unsigned char *pack_cnid_data(struct cnid_dbd_rqst *);
24 extern int didname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
25 extern int devino(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
28 extern char *stringify_devino(dev_t dev, ino_t ino);
31 #endif /* CNID_DBD_PACK_H */