• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/netatalk-2.2.0/etc/cnid_dbd/
1/*
2 * Copyright (C) Joerg Lenneis 2003
3 * Copyright (C) Frank Lahm 2010
4 * All Rights Reserved.  See COPYING.
5 */
6
7#ifndef CNID_DBD_PACK_H
8#define CNID_DBD_PACK_H 1
9
10#include <db.h>
11#include <atalk/cnid_dbd_private.h>
12
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))
21
22extern unsigned char *pack_cnid_data(struct cnid_dbd_rqst *);
23extern int didname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
24extern int devino(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
25extern int idxname(DB *dbp, const DBT *pkey, const DBT *pdata, DBT *skey);
26
27#endif /* CNID_DBD_PACK_H */
28