netatalk  4.6.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
megatron.h
Go to the documentation of this file.
1#ifndef MEGATRON_H
2#define MEGATRON_H 1
3
4#include <atalk/adouble.h>
5#include <atalk/compat.h>
6#include <stdbool.h>
7
8struct vol;
9
10#ifndef STDIN
11# define STDIN "-"
12#endif /* ! STDIN */
13
14/*
15 Where it matters, data stored in either of these two structs is in
16 network byte order. Any routines that need to interpret this data
17 locally would need to do the conversion. Mostly this affects the
18 fork length variables. Time values are affected as well, if any
19 routines actually need to look at them.
20 */
21
22#define DATA 0
23#define RESOURCE 1
24#define NUMFORKS 2
25
26#define HEX2NAD 0 /* unhex */
27#define BIN2NAD 1 /* unbin */
28#define NAD2BIN 2 /* bin */
29#define NAD2HEX 3 /* hex */
30
31#define OPTION_NONE (0)
32#define OPTION_HEADERONLY (1 << 0)
33#define OPTION_STDOUT (1 << 1)
34#define OPTION_VERBOSE (1 << 2)
35#define OPTION_ADOUBLE (1 << 3)
36#define OPTION_NORF (1 << 4)
37
38#define FH_DATE_CREATE (1 << 0)
39#define FH_DATE_MODIFY (1 << 1)
40#define FH_DATE_BACKUP (1 << 2)
41
42struct FInfo {
43 uint32_t fdType;
44 uint32_t fdCreator;
45 uint16_t fdFlags;
46 uint32_t fdLocation;
47 uint16_t fdFldr;
48};
49
50struct FXInfo {
51 uint16_t fdIconID;
52 uint16_t fdUnused[3];
53 uint8_t fdScript;
54 uint8_t fdXFlags;
55 uint16_t fdComment;
56 uint32_t fdPutAway;
57};
58
59struct FHeader {
60 char name[ ADEDLEN_NAME + 1 ];
62 uint32_t forklen[ NUMFORKS ];
63 uint32_t create_date;
64 uint32_t mod_date;
65 uint32_t backup_date;
66 unsigned int date_flags;
69};
70
71struct nad_volume {
72 struct vol *vol;
73 struct vol *cnid_vol;
78};
79
80#define FILEIOFF_CREATE 0
81#define FILEIOFF_MODIFY 4
82#define FILEIOFF_BACKUP 8
83#define FILEIOFF_ATTR 14
84#define FINDERIOFF_TYPE 0
85#define FINDERIOFF_CREATOR 4
86#define FINDERIOFF_FLAGS 8
87#define FINDERIOFF_LOC 10
88#define FINDERIOFF_FLDR 14
89#define FINDERIOFF_SCRIPT 24
90#define FINDERIOFF_XFLAGS 25
91
92#define TRASH 0
93#define KEEP 1
94
95#ifndef S_ISDIR
96# define S_ISDIR(s) (( s & S_IFMT ) == S_IFDIR )
97#endif /* ! S_ISDIR */
98
99extern char *forkname[];
100extern char *(*_mtoupath)(char *);
101extern char *(*_utompath)(char *);
102#define mtoupath(s) (*_mtoupath)(s)
103#define utompath(s) (*_utompath)(s)
104
105#endif /* MEGATRON_H */
Part of Netatalk's AppleDouble implementatation.
#define ADEDLEN_COMMENT
Definition adouble.h:99
#define ADEDLEN_PRIVSYN
Definition adouble.h:113
#define ADEDLEN_NAME
Definition adouble.h:98
char * forkname[]
Definition megatron.c:38
#define NUMFORKS
Definition megatron.h:24
Definition megatron.h:59
uint32_t backup_date
Definition megatron.h:65
char name[ADEDLEN_NAME+1]
Definition megatron.h:60
struct FXInfo finder_xinfo
Definition megatron.h:68
uint32_t mod_date
Definition megatron.h:64
uint32_t create_date
Definition megatron.h:63
struct FInfo finder_info
Definition megatron.h:67
char comment[ADEDLEN_COMMENT+1]
Definition megatron.h:61
unsigned int date_flags
Definition megatron.h:66
uint32_t forklen[NUMFORKS]
Definition megatron.h:62
Definition megatron.h:42
uint16_t fdFlags
Definition megatron.h:45
uint32_t fdLocation
Definition megatron.h:46
uint32_t fdType
Definition megatron.h:43
uint16_t fdFldr
Definition megatron.h:47
uint32_t fdCreator
Definition megatron.h:44
Definition megatron.h:50
uint16_t fdComment
Definition megatron.h:55
uint16_t fdUnused[3]
Definition megatron.h:52
uint8_t fdXFlags
Definition megatron.h:54
uint16_t fdIconID
Definition megatron.h:51
uint32_t fdPutAway
Definition megatron.h:56
uint8_t fdScript
Definition megatron.h:53
Definition megatron.h:71
struct vol * vol
Definition megatron.h:72
bool skip_cnid
Definition megatron.h:77
char db_stamp[ADEDLEN_PRIVSYN]
Definition megatron.h:74
bool fallback
Definition megatron.h:76
bool owns_cdb
Definition megatron.h:75
struct vol * cnid_vol
Definition megatron.h:73
Definition include/atalk/volume.h:33