netatalk
4.6.0
Free and Open Source Apple Filing Protocol (AFP) Server
Toggle main menu visibility
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
8
struct
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
42
struct
FInfo
{
43
uint32_t
fdType
;
44
uint32_t
fdCreator
;
45
uint16_t
fdFlags
;
46
uint32_t
fdLocation
;
47
uint16_t
fdFldr
;
48
};
49
50
struct
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
59
struct
FHeader
{
60
char
name
[
ADEDLEN_NAME
+ 1 ];
61
char
comment
[
ADEDLEN_COMMENT
+ 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
;
67
struct
FInfo
finder_info
;
68
struct
FXInfo
finder_xinfo
;
69
};
70
71
struct
nad_volume
{
72
struct
vol
*
vol
;
73
struct
vol
*
cnid_vol
;
74
char
db_stamp
[
ADEDLEN_PRIVSYN
];
75
bool
owns_cdb
;
76
bool
fallback
;
77
bool
skip_cnid
;
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
99
extern
char
*
forkname
[];
100
extern
char
*(*_mtoupath)(
char
*);
101
extern
char
*(*_utompath)(
char
*);
102
#define mtoupath(s) (*_mtoupath)(s)
103
#define utompath(s) (*_utompath)(s)
104
105
#endif
/* MEGATRON_H */
adouble.h
Part of Netatalk's AppleDouble implementatation.
ADEDLEN_COMMENT
#define ADEDLEN_COMMENT
Definition
adouble.h:99
ADEDLEN_PRIVSYN
#define ADEDLEN_PRIVSYN
Definition
adouble.h:113
ADEDLEN_NAME
#define ADEDLEN_NAME
Definition
adouble.h:98
compat.h
forkname
char * forkname[]
Definition
megatron.c:38
NUMFORKS
#define NUMFORKS
Definition
megatron.h:24
FHeader
Definition
megatron.h:59
FHeader::backup_date
uint32_t backup_date
Definition
megatron.h:65
FHeader::name
char name[ADEDLEN_NAME+1]
Definition
megatron.h:60
FHeader::finder_xinfo
struct FXInfo finder_xinfo
Definition
megatron.h:68
FHeader::mod_date
uint32_t mod_date
Definition
megatron.h:64
FHeader::create_date
uint32_t create_date
Definition
megatron.h:63
FHeader::finder_info
struct FInfo finder_info
Definition
megatron.h:67
FHeader::comment
char comment[ADEDLEN_COMMENT+1]
Definition
megatron.h:61
FHeader::date_flags
unsigned int date_flags
Definition
megatron.h:66
FHeader::forklen
uint32_t forklen[NUMFORKS]
Definition
megatron.h:62
FInfo
Definition
megatron.h:42
FInfo::fdFlags
uint16_t fdFlags
Definition
megatron.h:45
FInfo::fdLocation
uint32_t fdLocation
Definition
megatron.h:46
FInfo::fdType
uint32_t fdType
Definition
megatron.h:43
FInfo::fdFldr
uint16_t fdFldr
Definition
megatron.h:47
FInfo::fdCreator
uint32_t fdCreator
Definition
megatron.h:44
FXInfo
Definition
megatron.h:50
FXInfo::fdComment
uint16_t fdComment
Definition
megatron.h:55
FXInfo::fdUnused
uint16_t fdUnused[3]
Definition
megatron.h:52
FXInfo::fdXFlags
uint8_t fdXFlags
Definition
megatron.h:54
FXInfo::fdIconID
uint16_t fdIconID
Definition
megatron.h:51
FXInfo::fdPutAway
uint32_t fdPutAway
Definition
megatron.h:56
FXInfo::fdScript
uint8_t fdScript
Definition
megatron.h:53
nad_volume
Definition
megatron.h:71
nad_volume::vol
struct vol * vol
Definition
megatron.h:72
nad_volume::skip_cnid
bool skip_cnid
Definition
megatron.h:77
nad_volume::db_stamp
char db_stamp[ADEDLEN_PRIVSYN]
Definition
megatron.h:74
nad_volume::fallback
bool fallback
Definition
megatron.h:76
nad_volume::owns_cdb
bool owns_cdb
Definition
megatron.h:75
nad_volume::cnid_vol
struct vol * cnid_vol
Definition
megatron.h:73
vol
Definition
include/atalk/volume.h:33
bin
nad
megatron.h
Generated by
1.18.0