2 Copyright (c) 2008,2009 Frank Lahm <franklahm@gmail.com>
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.
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.
18 #define UUID_BINSIZE 16
19 #define UUID_STRINGSIZE 36
21 typedef const unsigned char *uuidp_t;
22 typedef unsigned char atalk_uuid_t[UUID_BINSIZE];
24 typedef enum {UUID_USER = 1, UUID_GROUP, UUID_LOCAL} uuidtype_t;
25 extern char *uuidtype[];
27 /* afp_options.c needs these. defined in libatalk/ldap.c */
28 extern char *ldap_host;
29 extern int ldap_auth_method;
30 extern char *ldap_auth_dn;
31 extern char *ldap_auth_pw;
32 extern char *ldap_userbase;
33 extern char *ldap_groupbase;
34 extern char *ldap_uuid_attr;
35 extern char *ldap_name_attr;
36 extern char *ldap_group_attr;
37 extern char *ldap_uid_attr;
39 /********************************************************
41 ********************************************************/
43 extern int getuuidfromname( const char *name, uuidtype_t type, unsigned char *uuid);
44 extern int getnamefromuuid( uuidp_t uuidp, char **name, uuidtype_t *type);
45 extern const char *uuid_bin2string(const unsigned char *uuid);
46 extern void uuid_string2bin( const char *uuidstring, unsigned char *uuid);
48 #endif /* AFP_UUID_H */