• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/netatalk-3.0.5/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
20typedef const unsigned char *uuidp_t;
21typedef unsigned char atalk_uuid_t[UUID_BINSIZE];
22
23typedef enum {UUID_USER   = 1,
24              UUID_GROUP  = 2,
25              UUID_ENOENT = 4} /* used as bit flag */
26    uuidtype_t;
27#define UUIDTYPESTR_MASK 3
28extern char *uuidtype[];
29
30/********************************************************
31 * Interface
32 ********************************************************/
33
34extern int getuuidfromname( const char *name, uuidtype_t type, unsigned char *uuid);
35extern int getnamefromuuid( const unsigned char *uuid, char **name, uuidtype_t *type);
36extern void localuuid_from_id(unsigned char *buf, uuidtype_t type, unsigned int id);
37extern const char *uuid_bin2string(const unsigned char *uuid);
38extern void uuid_string2bin( const char *uuidstring, unsigned char *uuid);
39extern void uuidcache_dump(void);
40
41#endif /* AFP_UUID_H */
42