]> arthur.barton.de Git - netatalk.git/blob - etc/cnid_dbd/pack.h
Enhanced machine type
[netatalk.git] / etc / cnid_dbd / pack.h
1 /*
2  * $Id: pack.h,v 1.5 2009-05-04 09:09:43 franklahm Exp $
3  *
4  * Copyright (C) Joerg Lenneis 2003
5  * All Rights Reserved.  See COPYING.
6  */
7
8 #ifndef CNID_DBD_PACK_H
9 #define CNID_DBD_PACK_H 1
10
11 #include <db.h>
12 #include <atalk/cnid_dbd_private.h>
13
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))
22
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);
26
27 #endif /* CNID_DBD_PACK_H */