• 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/libatalk/cnid/cdb/
1/*
2 * $Id: cnid_cdb_nextid.c,v 1.2 2005-04-28 20:49:59 bfernhomberg Exp $
3 */
4
5#ifdef HAVE_CONFIG_H
6#include "config.h"
7#endif /* HAVE_CONFIG_H */
8
9#ifdef CNID_BACKEND_CDB
10
11#ifdef unused
12#include "cnid_cdb_private.h"
13
14/* return the next id. we use the fact that ad files are memory
15 * mapped. */
16cnid_t cnid_cdb_nextid(struct _cnid_db *cdb)
17{
18    CNID_private *db;
19    cnid_t id;
20
21    if (!cdb || !(db = cdb->_private))
22        return 0;
23
24    memcpy(&id, ad_entry(&db->rootinfo, ADEID_DID), sizeof(id));
25    return id;
26}
27#endif
28
29#endif /* CNID_BACKEND_CDB */
30