• 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/include/atalk/
1/*
2   Copyright (c) 2008,2009 Frank Lahm <franklahm@gmail.com>
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13 */
14
15#ifndef AFP_UUID_H
16#define AFP_UUID_H
17
18#define UUID_BINSIZE 16
19#define UUID_STRINGSIZE 36
20
21typedef unsigned char *uuidp_t;
22typedef unsigned char atalk_uuid_t[UUID_BINSIZE];
23
24typedef enum {UUID_USER   = 0,
25              UUID_GROUP  = 1,
26              UUID_ENOENT = 4} /* used as bit flag */
27    uuidtype_t;
28#define UUIDTYPESTR_MASK 3
29extern char *uuidtype[];
30
31/* afp_options.c needs these. defined in libatalk/ldap.c */
32extern char *ldap_host;
33extern int  ldap_auth_method;
34extern char *ldap_auth_dn;
35extern char *ldap_auth_pw;
36extern char *ldap_userbase;
37extern char *ldap_groupbase;
38extern char *ldap_uuid_attr;
39extern char *ldap_name_attr;
40extern char *ldap_group_attr;
41extern char *ldap_uid_attr;
42
43/********************************************************
44 * Interface
45 ********************************************************/
46
47extern int getuuidfromname( const char *name, uuidtype_t type, uuidp_t uuid);
48extern int getnamefromuuid( const uuidp_t uuidp, char **name, uuidtype_t *type);
49
50extern void localuuid_from_id(unsigned char *buf, uuidtype_t type, unsigned int id);
51extern const char *uuid_bin2string(unsigned char *uuid);
52extern void uuid_string2bin( const char *uuidstring, uuidp_t uuid);
53extern void uuidcache_dump(void);
54#endif /* AFP_UUID_H */
55