/*
- * $Id: volume.h,v 1.16 2010/03/31 09:47:32 franklahm Exp $
- *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifndef ATALK_VOLUME_H
#define ATALK_VOLUME_H 1
+#include <stdint.h>
#include <sys/cdefs.h>
#include <sys/types.h>
-#include <netatalk/endian.h>
+// #include <netatalk/endian.h>
#include <atalk/unicode.h>
#include <atalk/cnid.h>
#define AFPVOL_U8MNAMELEN 255 /* AFP3 sepc */
#define AFPVOL_MACNAMELEN 27 /* AFP2 spec */
-typedef u_int64_t VolSpace;
+typedef uint64_t VolSpace;
struct vol {
struct vol *v_next;
char *v_gvs;
void *v_nfsclient;
int v_nfs;
-
+ VolSpace v_tm_used; /* used bytes on a TM volume */
+ time_t v_tm_cachetime; /* time at which v_tm_used was calculated last */
+ VolSpace v_appended; /* amount of data appended to files */
+
/* only when opening/closing volumes or in error */
int v_casefold;
char *v_localname; /* as defined in AppleVolumes.default */
#define AFPVOL_CACHE (1 << 21) /* Use adouble v2 CNID caching. Default: yes */
#define AFPVOL_INV_DOTS (1 << 22) /* dots files are invisible */
-#define AFPVOL_TM (1 << 24) /* Supports TimeMachine */
-#define AFPVOL_ACLS (1 << 25) /* Volume supports ACLS */
-#define AFPVOL_CDROM (1 << 25) /* Ejectable media eg CD -> in memory CNID db */
+#define AFPVOL_TM (1 << 23) /* Supports TimeMachine */
+#define AFPVOL_ACLS (1 << 24) /* Volume supports ACLS */
+#define AFPVOL_SEARCHDB (1 << 25) /* Use fast CNID db search instead of filesystem */
+#define AFPVOL_NONETIDS (1 << 26) /* signal the client it shall do privelege mapping */
+#define AFPVOL_FOLLOWSYM (1 << 27) /* follow symlinks on the server, default is not to */
/* Extended Attributes vfs indirection */
#define AFPVOL_EA_NONE 0 /* No EAs */
#define VOLPBIT_ATTR_BLANKACCESS (1 << 4)
#define VOLPBIT_ATTR_UNIXPRIV (1 << 5)
#define VOLPBIT_ATTR_UTF8 (1 << 6)
-#define VOLPBIT_ATTR_NONETUID (1 << 7)
+#define VOLPBIT_ATTR_NONETIDS (1 << 7)
#define VOLPBIT_ATTR_EXT_ATTRS (1 << 10)
#define VOLPBIT_ATTR_ACLS (1 << 11)
#define VOLPBIT_ATTR_TM (1 << 13)
#define VOLPBIT_XBTOTAL 10
#define VOLPBIT_BSIZE 11 /* block size */
-#ifdef AFP3x
#define utf8_encoding() (afp_version >= 30)
-#else
-#define utf8_encoding() (0)
-#endif
#define vol_noadouble(vol) (((vol)->v_flags & AFPVOL_NOADOUBLE) ? 1 : 0)
#define vol_nodev(vol) (((vol)->v_flags & AFPVOL_NODEV) ? 1 : 0)
#define vol_unix_priv(vol) (afp_version >= 30 && ((vol)->v_flags & AFPVOL_UNIX_PRIV))
#define vol_inv_dots(vol) (((vol)->v_flags & AFPVOL_INV_DOTS) ? 1 : 0)
-
+#define vol_syml_opt(vol) (((vol)->v_flags & AFPVOL_FOLLOWSYM) ? 0 : O_NOFOLLOW)
#endif