2 $Id: uuid.h,v 1.1 2009-02-02 11:55:01 franklahm Exp $
3 Copyright (c) 2008,2009 Frank Lahm <franklahm@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
19 #define UUID_BINSIZE 16
20 #define UUID_STRINGSIZE 36
22 typedef char *uuidp_t;
23 typedef char atalk_uuid_t[UUID_BINSIZE];
25 typedef enum {UUID_USER = 1, UUID_GROUP} uuidtype_t;
26 extern char *uuidtype[];
28 /* afp_options.c needs these. defined in libatalk/ldap.c */
29 extern char *ldap_host;
30 extern int ldap_auth_method;
31 extern char *ldap_auth_dn;
32 extern char *ldap_auth_pw;
33 extern char *ldap_userbase;
34 extern char *ldap_groupbase;
35 extern char *ldap_uuid_attr;
36 extern char *ldap_name_attr;
37 extern char *ldap_group_attr;
38 extern char *ldap_uid_attr;
40 /********************************************************
42 ********************************************************/
44 extern int getuuidfromname( const char *name, uuidtype_t type, uuidp_t uuid);
45 extern int getnamefromuuid( uuidp_t uuidp, char **name, uuidtype_t *type);
46 extern int uuid_bin2string( uuidp_t uuidp, char **uuidstring);
47 extern void uuid_string2bin( const char *uuidstring, uuidp_t uuid);
49 #endif /* AFP_UUID_H */