netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
uuid.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2008,2009 Frank Lahm <[email protected]>
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
20typedef const unsigned char *uuidp_t;
21typedef unsigned char atalk_uuid_t[UUID_BINSIZE];
22
23/* used as bit flag */
24typedef enum {UUID_USER = 1,
27 }
29#define UUIDTYPESTR_MASK 3
30extern char *uuidtype[];
31
32/********************************************************
33 * Interface
34 ********************************************************/
35
36extern int getuuidfromname(const char *name, uuidtype_t type,
37 unsigned char *uuid);
38extern int getnamefromuuid(const unsigned char *uuid, char **name,
40extern void localuuid_from_id(unsigned char *buf, uuidtype_t type,
41 unsigned int id);
42extern const char *uuid_bin2string(const unsigned char *uuid);
43extern void uuid_string2bin(const char *uuidstring, unsigned char *uuid);
44extern void uuidcache_dump(void);
45
46#endif /* AFP_UUID_H */
static char buf[MAXPATHLEN+1]
Definition afppasswd.c:66
uid_t uuid
static enum op type
Definition nad_cp.c:95
int getnamefromuuid(const unsigned char *uuid, char **name, uuidtype_t *type)
Definition uuid.c:289
unsigned char atalk_uuid_t[UUID_BINSIZE]
Definition uuid.h:21
void localuuid_from_id(unsigned char *buf, uuidtype_t type, unsigned int id)
Definition uuid.c:54
const char * uuid_bin2string(const unsigned char *uuid)
Definition uuid.c:114
char * uuidtype[]
Definition uuid.c:38
int getuuidfromname(const char *name, uuidtype_t type, unsigned char *uuid)
Definition uuid.c:155
const unsigned char * uuidp_t
Definition uuid.h:20
void uuid_string2bin(const char *uuidstring, unsigned char *uuid)
Definition uuid.c:78
void uuidcache_dump(void)
Definition cache.c:48
uuidtype_t
Definition uuid.h:24
@ UUID_ENOENT
Definition uuid.h:26
@ UUID_USER
Definition uuid.h:24
@ UUID_GROUP
Definition uuid.h:25
#define UUID_BINSIZE
Definition uuid.h:18