| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#if defined(DUMP_MACOSX) |
| 6 |
|
| 7 |
#ifndef DARWIN_H |
| 8 |
#define DARWIN_H |
| 9 |
|
| 10 |
#define INFOLEN 32 |
| 11 |
#define CORRECT 2 |
| 12 |
|
| 13 |
|
| 14 |
#define DARWIN_RSRC_NAME "/..namedfork/rsrc" |
| 15 |
#define DARWIN_FINFO_NAME "/..namedfork/finfo" |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
struct FndrFileInfo { |
| 22 |
u_int32_t fdType; |
| 23 |
u_int32_t fdCreator; |
| 24 |
u_int16_t fdFlags; |
| 25 |
struct { |
| 26 |
int16_t v; |
| 27 |
int16_t h; |
| 28 |
} fdLocation; |
| 29 |
int16_t opaque; |
| 30 |
}; |
| 31 |
typedef struct FndrFileInfo FndrFileInfo; |
| 32 |
|
| 33 |
struct FndrDirInfo { |
| 34 |
struct { |
| 35 |
int16_t top; |
| 36 |
int16_t left; |
| 37 |
int16_t bottom; |
| 38 |
int16_t right; |
| 39 |
} frRect; |
| 40 |
unsigned short frFlags; |
| 41 |
struct { |
| 42 |
u_int16_t v; |
| 43 |
u_int16_t h; |
| 44 |
} frLocation; |
| 45 |
int16_t opaque; |
| 46 |
}; |
| 47 |
typedef struct FndrDirInfo FndrDirInfo; |
| 48 |
|
| 49 |
|
| 50 |
struct FndrOpaqueInfo { |
| 51 |
int8_t opaque[16]; |
| 52 |
}; |
| 53 |
typedef struct FndrOpaqueInfo FndrOpaqueInfo; |
| 54 |
|
| 55 |
struct fndrinfo_block_t { |
| 56 |
FndrFileInfo finderInfo; |
| 57 |
FndrOpaqueInfo extendedFinderInfo; |
| 58 |
}; |
| 59 |
typedef struct fndrinfo_block_t fndrinfo_block_t; |
| 60 |
|
| 61 |
struct attrinfo_block_t { |
| 62 |
unsigned long info_length; |
| 63 |
u_int32_t objid_low; |
| 64 |
u_int32_t objid_high; |
| 65 |
struct timespec created; |
| 66 |
struct timespec backup; |
| 67 |
union { |
| 68 |
fndrinfo_block_t finfo; |
| 69 |
FndrDirInfo dinfo; |
| 70 |
} o; |
| 71 |
off_t rsrc_length; |
| 72 |
}; |
| 73 |
typedef struct attrinfo_block_t attrinfo_block_t; |
| 74 |
|
| 75 |
|
| 76 |
#define ASINGLE_MAGIC 0x00051600 |
| 77 |
#define ADOUBLE_MAGIC 0x00051607 |
| 78 |
|
| 79 |
#define ASD_VERSION1 0x00010000 |
| 80 |
#define ASD_VERSION2 0x00020000 |
| 81 |
|
| 82 |
typedef struct ASDHeader { |
| 83 |
u_long magic; |
| 84 |
u_long version; |
| 85 |
u_char filler[16]; |
| 86 |
u_short entries; |
| 87 |
|
| 88 |
} ASDHeader, *ASDHeaderPtr, **ASDHeaderHandle; |
| 89 |
|
| 90 |
typedef enum { |
| 91 |
EntryDataFork = 1, |
| 92 |
EntryRSRCFork, |
| 93 |
EntryRealName, |
| 94 |
EntryComment, |
| 95 |
EntryBWIcon, |
| 96 |
EntryColorIcon, |
| 97 |
EntryOldFileInfo, |
| 98 |
EntryFileDates, |
| 99 |
EntryFinderInfo, |
| 100 |
EntryMacFileInfo, |
| 101 |
EntryProDOSInfo, |
| 102 |
EntryMSDOSInfo, |
| 103 |
EntryShortName, |
| 104 |
EntryAFPFileInfo, |
| 105 |
EntryDirID |
| 106 |
} ASDEntryType; |
| 107 |
|
| 108 |
typedef struct { |
| 109 |
u_long entryID; |
| 110 |
u_long offset; |
| 111 |
u_long len; |
| 112 |
} ASDEntry, *ASDEntryPtr, **ASDEntryHandle; |
| 113 |
|
| 114 |
typedef struct { |
| 115 |
u_long creationDate; |
| 116 |
u_long modificationDate; |
| 117 |
u_long backupDate; |
| 118 |
u_long accessDate; |
| 119 |
} FileDates, *FileDatesPtr; |
| 120 |
|
| 121 |
typedef struct dumpfinderinfo { |
| 122 |
FndrFileInfo fndrinfo; |
| 123 |
u_int32_t createDate; |
| 124 |
u_int32_t contentModDate; |
| 125 |
u_int32_t attributeModDate; |
| 126 |
u_int32_t accessDate; |
| 127 |
u_int32_t backupDate; |
| 128 |
u_int32_t textEncoding; |
| 129 |
char filler[980]; |
| 130 |
} DumpFinderInfo, *DumpFinderInfoPtr; |
| 131 |
|
| 132 |
#endif |
| 133 |
#endif |