X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fatalk%2Fvolume.h;h=60bae6ff5cb0dde0831c075eaec37886400af5a9;hb=b362b6f7b22b6e4e9e74760989f389149677917b;hp=e2458ec4c9a077eb02ab9f5cc52609f082d06f89;hpb=5a4a20436042ff567ebda2518f0944dacf4d01fc;p=netatalk.git diff --git a/include/atalk/volume.h b/include/atalk/volume.h index e2458ec4..60bae6ff 100644 --- a/include/atalk/volume.h +++ b/include/atalk/volume.h @@ -1,6 +1,4 @@ /* - * $Id: volume.h,v 1.15 2010-02-19 10:51:59 franklahm Exp $ - * * Copyright (c) 1990,1994 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. */ @@ -8,9 +6,10 @@ #ifndef ATALK_VOLUME_H #define ATALK_VOLUME_H 1 +#include #include #include -#include +// #include #include #include @@ -20,14 +19,14 @@ #define AFPVOL_U8MNAMELEN 255 /* AFP3 sepc */ #define AFPVOL_MACNAMELEN 27 /* AFP2 spec */ +typedef uint64_t VolSpace; + struct vol { struct vol *v_next; u_int16_t v_vid; int v_flags; char *v_path; - struct dir *v_dir, *v_root; - struct dir *v_curdir; /* cache */ - hash_t *v_hash; + struct dir *v_root; time_t v_mtime; charset_t v_volcharset; @@ -43,6 +42,7 @@ struct vol { char *(*ad_path)(const char *, int); struct _cnid_db *v_cdb; char v_stamp[ADEDLEN_PRIVSYN]; + VolSpace v_limitsize; /* Size limit, if any, in MiB */ mode_t v_umask; mode_t v_perm; /* default permission value OR with requested perm*/ mode_t v_dperm; /* default directories permission value OR with requested perm*/ @@ -64,7 +64,10 @@ struct vol { 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 */ @@ -73,6 +76,8 @@ struct vol { char *v_password; char *v_cnidscheme; char *v_dbpath; + char *v_cnidserver; + char *v_cnidport; int v_hide; /* new volume wait until old volume is closed */ int v_new; /* volume deleted but there's a new one with the same name */ int v_deleted; /* volume open but deleted in new config file */ @@ -82,7 +87,7 @@ struct vol { char *v_postexec; int v_root_preexec_close; int v_preexec_close; - + char *v_uuid; /* For TimeMachine zeroconf record */ #ifdef FORCE_UIDGID char *v_forceuid; char *v_forcegid; @@ -92,12 +97,6 @@ struct vol { #endif /*__svr4__*/ }; -#ifdef NO_LARGE_VOL_SUPPORT -typedef u_int32_t VolSpace; -#else /* NO_LARGE_VOL_SUPPORT */ -typedef u_int64_t VolSpace; -#endif /* NO_LARGE_VOL_SUPPORT */ - #define AFPVOL_OPEN (1<<0) /* flags for AFS and quota 0xxx0 */ @@ -109,7 +108,7 @@ typedef u_int64_t VolSpace; /* Flags that alter volume behaviour. - Keep in sync with include/atalk/volinfo.h and libatalk/util/volinfo.c + Keep in sync with libatalk/util/volinfo.c */ #define AFPVOL_A2VOL (1 << 5) /* prodos volume */ #define AFPVOL_CRLF (1 << 6) /* cr/lf translation */ @@ -136,8 +135,11 @@ typedef u_int64_t VolSpace; #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_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 */ @@ -176,7 +178,7 @@ int wincheck(const struct vol *vol, const char *path); #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) @@ -195,16 +197,12 @@ int wincheck(const struct vol *vol, const char *path); #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