#include <sys/time.h>
#include <netatalk/endian.h>
+#include <atalk/bstrlib.h>
/* version info */
#define AD_VERSION2 0x00020000
#define AD_VERSION_EA 0x00020002
-#define AD_VERSION AD_VERSION_EA
+
+/* default */
+#define AD_VERSION AD_VERSION2
/*
* AppleDouble entry IDs.
#define ADEID_PRIVINO 17
#define ADEID_PRIVSYN 18 /* in synch with database */
#define ADEID_PRIVID 19
-#define ADEID_MAX 19
+#define ADEID_MAX (ADEID_PRIVID + 1)
/* These are the real ids for these entries, as stored in the adouble file */
#define AD_DEV 0x80444556
int ad_adflags; /* ad_open flags adflags like ADFLAGS_DIR */
unsigned int ad_inited;
int ad_options;
- int ad_fileordir;
int ad_refcount; /* used in afpd/ofork.c */
+ void *ad_resforkbuf; /* buffer for AD_VERSION_EA ressource fork */
+ size_t ad_resforkbufsize; /* size of ad_resforkbuf */
off_t ad_rlen; /* ressource fork len with AFP 3.0
the header parameter size is too small. */
char *ad_m_name; /* mac name for open fork */
int ad_m_namelen;
+ bstring ad_fullpath; /* adouble EA need this */
struct adouble_fops *ad_ops;
- uint16_t ad_open_forks; /* open forks (by others) */
-#ifdef USE_MMAPPED_HEADERS
- char *ad_data;
-#else
+ uint16_t ad_open_forks; /* open forks (by others) */
+
char ad_data[AD_DATASZ_MAX];
-#endif
};
#define ADFLAGS_DF (1<<0)
#define ADFLAGS_NOHF (1<<4) /* not an error if no ressource fork */
#define ADFLAGS_RDONLY (1<<5) /* don't try readwrite */
#define ADFLAGS_OPENFORKS (1<<6) /* check for open fork in ad_metadata function */
-#define ADFLAGS_CREATE (1<<7)
#define ADVOL_NODEV (1 << 0)
#define ADVOL_CACHE (1 << 1)
#define ADVOL_INVDOTS (1 << 3) /* dot files (.DS_Store) are invisible) */
#define ADVOL_NOADOUBLE (1 << 4)
-extern uint32_t adv2_disk_eid[];
-#define DISK_EID(a) (adv2_disk_eid[a])
-
/* lock flags */
#define ADLOCK_CLR (0)
#define ADLOCK_RD (1<<0)