]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/extattrs.h
82d9befa74fedc1c8c8fb481f5facbce2d4a83a2
[netatalk.git] / etc / afpd / extattrs.h
1 /*
2    $Id: extattrs.h,v 1.1 2009-02-16 13:49:20 franklahm Exp $
3    Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
4
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.
9  
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.
14  */
15
16 #ifndef AFPD_EXT_ATTRS_H 
17 #define AFPD_EXT_ATTRS_H
18
19 /* This seems to be the current limit fo HFS+, we arbitrarily force that
20    which also safes us from buffer overflows */
21 #define MAX_EA_SIZE 3802
22
23 /* At time of writing the 10.5.6 client adds 8 bytes to the
24    length of the EA that we send him */
25 #define MAX_REPLY_EXTRA_BYTES 8
26
27 enum {
28     kXAttrNoFollow = 0x1,
29     kXAttrCreate = 0x2,
30     kXAttrReplace = 0x4
31 };
32
33 extern int afp_listextattr(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen);
34 extern int afp_getextattr(AFPObj *obj _U_ , char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen);
35 extern int afp_setextattr(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen);
36 extern int afp_remextattr(AFPObj *obj _U_, char *ibuf, int ibuflen _U_, char *rbuf, int *rbuflen);
37
38 #endif /* AFPD_EXT_ATTRS_H */