netatalk
4.4.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afp.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 1990,1991 Regents of The University of Michigan.
3
* All Rights Reserved.
4
*
5
* Permission to use, copy, modify, and distribute this software and
6
* its documentation for any purpose and without fee is hereby granted,
7
* provided that the above copyright notice appears in all copies and
8
* that both that copyright notice and this permission notice appear
9
* in supporting documentation, and that the name of The University
10
* of Michigan not be used in advertising or publicity pertaining to
11
* distribution of the software without specific, written prior
12
* permission. This software is supplied as is without expressed or
13
* implied warranties of any kind.
14
*
15
* Research Systems Unix Group
16
* The University of Michigan
17
* c/o Mike Clark
18
* 535 W. William Street
19
* Ann Arbor, Michigan
20
* +1-313-763-0525
21
*
[email protected]
22
*/
23
24
#ifndef _ATALK_AFP_H
25
#define _ATALK_AFP_H 1
26
27
#include <stdint.h>
28
#include <sys/types.h>
29
30
typedef
uint16_t
AFPUserBytes
;
31
32
/* protocols */
33
#define AFPPROTO_ASP 1
34
#define AFPPROTO_DSI 2
35
36
/* server flags */
37
#define AFPSRVRINFO_COPY (1<<0)
38
#define AFPSRVRINFO_PASSWD (1<<1)
39
#define AFPSRVRINFO_NOSAVEPASSWD (1<<2)
40
#define AFPSRVRINFO_SRVMSGS (1<<3)
41
#define AFPSRVRINFO_SRVSIGNATURE (1<<4)
42
#define AFPSRVRINFO_TCPIP (1<<5)
43
#define AFPSRVRINFO_SRVNOTIFY (1<<6)
44
#define AFPSRVRINFO_SRVRECONNECT (1<<7)
45
#define AFPSRVRINFO_SRVRDIR (1<<8)
46
#define AFPSRVRINFO_SRVUTF8 (1<<9)
47
#define AFPSRVRINFO_UUID (1<<10)
48
#define AFPSRVRINFO_EXTSLEEP (1<<11)
49
#define AFPSRVRINFO_FASTBOZO (1<<15)
50
51
#define AFP_OK 0
52
#define AFPERR_MAXSESS -1068
53
#define AFPERR_DID1 -4000
54
#define AFPERR_ACCESS -5000
55
#define AFPERR_AUTHCONT -5001
56
#define AFPERR_BADUAM -5002
57
#define AFPERR_BADVERS -5003
58
#define AFPERR_BITMAP -5004
59
#define AFPERR_CANTMOVE -5005
60
#define AFPERR_DENYCONF -5006
61
#define AFPERR_DIRNEMPT -5007
62
#define AFPERR_DFULL -5008
63
#define AFPERR_EOF -5009
64
#define AFPERR_BUSY -5010
65
#define AFPERR_FLATVOL -5011
66
#define AFPERR_NOITEM -5012
67
#define AFPERR_LOCK -5013
68
#define AFPERR_MISC -5014
69
#define AFPERR_NLOCK -5015
70
#define AFPERR_NOSRVR -5016
71
#define AFPERR_EXIST -5017
72
#define AFPERR_NOOBJ -5018
73
#define AFPERR_PARAM -5019
74
#define AFPERR_NORANGE -5020
75
#define AFPERR_RANGEOVR -5021
76
#define AFPERR_SESSCLOS -5022
77
#define AFPERR_NOTAUTH -5023
78
#define AFPERR_NOOP -5024
79
#define AFPERR_BADTYPE -5025
80
#define AFPERR_NFILE -5026
81
#define AFPERR_SHUTDOWN -5027
82
#define AFPERR_NORENAME -5028
83
#define AFPERR_NODIR -5029
84
#define AFPERR_ITYPE -5030
85
#define AFPERR_VLOCK -5031
86
#define AFPERR_OLOCK -5032
87
#define AFPERR_CTNSHRD -5033
88
#define AFPERR_NOID -5034
89
#define AFPERR_EXISTID -5035
90
#define AFPERR_DIFFVOL -5036
91
#define AFPERR_CATCHNG -5037
92
#define AFPERR_SAMEOBJ -5038
93
#define AFPERR_BADID -5039
94
#define AFPERR_PWDSAME -5040
95
#define AFPERR_PWDSHORT -5041
96
#define AFPERR_PWDEXPR -5042
97
#define AFPERR_INSHRD -5043
100
#define AFPERR_INTRASH -5044
101
#define AFPERR_PWDCHNG -5045
102
#define AFPERR_PWDPOLCY -5046
103
#define AFPERR_USRLOGIN -5047
104
105
/* AFP Attention Codes -- 4 bits */
106
#define AFPATTN_SHUTDOWN (1 << 15)
107
#define AFPATTN_CRASH (1 << 14)
108
#define AFPATTN_MESG (1 << 13)
109
#define AFPATTN_NORECONNECT (1 << 12)
110
/* server notification */
111
#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT)
112
113
/* extended bitmap -- 12 bits. volchanged is only useful w/ a server
114
* notification, and time is only useful for shutdown. */
115
#define AFPATTN_VOLCHANGED (1 << 0)
116
#define AFPATTN_TIME(x) ((x) & 0xfff)
117
118
typedef
enum
{
119
AFPMESG_LOGIN
= 0,
120
AFPMESG_SERVER
= 1
121
}
afpmessage_t
;
122
123
/* extended sleep flag */
124
#define AFPZZZ_EXT_SLEEP 1
125
#define AFPZZZ_EXT_WAKEUP 2
126
127
128
/* AFP functions */
129
#define AFP_BYTELOCK 1
130
#define AFP_CLOSEVOL 2
131
#define AFP_CLOSEDIR 3
132
#define AFP_CLOSEFORK 4
133
#define AFP_COPYFILE 5
134
#define AFP_CREATEDIR 6
135
#define AFP_CREATEFILE 7
136
#define AFP_DELETE 8
137
#define AFP_ENUMERATE 9
138
#define AFP_FLUSH 10
139
#define AFP_FLUSHFORK 11
140
141
#define AFP_GETFORKPARAM 14
142
#define AFP_GETSRVINFO 15
143
#define AFP_GETSRVPARAM 16
144
#define AFP_GETVOLPARAM 17
145
#define AFP_LOGIN 18
146
#define AFP_LOGINCONT 19
147
#define AFP_LOGOUT 20
148
#define AFP_MAPID 21
149
#define AFP_MAPNAME 22
150
#define AFP_MOVE 23
151
#define AFP_OPENVOL 24
152
#define AFP_OPENDIR 25
153
#define AFP_OPENFORK 26
154
#define AFP_READ 27
155
#define AFP_RENAME 28
156
#define AFP_SETDIRPARAM 29
157
#define AFP_SETFILEPARAM 30
158
#define AFP_SETFORKPARAM 31
159
#define AFP_SETVOLPARAM 32
160
#define AFP_WRITE 33
161
#define AFP_GETFLDRPARAM 34
162
#define AFP_SETFLDRPARAM 35
163
#define AFP_CHANGEPW 36
164
#define AFP_GETUSERINFO 37
165
#define AFP_GETSRVRMSG 38
166
#define AFP_CREATEID 39
167
#define AFP_DELETEID 40
168
#define AFP_RESOLVEID 41
169
#define AFP_EXCHANGEFILE 42
170
#define AFP_CATSEARCH 43
171
172
#define AFP_OPENDT 48
173
#define AFP_CLOSEDT 49
174
175
#define AFP_GETICON 51
176
#define AFP_GTICNINFO 52
177
#define AFP_ADDAPPL 53
178
#define AFP_RMVAPPL 54
179
180
#define AFP_GETAPPL 55
181
#define AFP_ADDCMT 56
182
#define AFP_RMVCMT 57
183
#define AFP_GETCMT 58
184
#define AFP_ADDICON 192
185
186
/* version 3.0 */
187
#define AFP_BYTELOCK_EXT 59
188
#define AFP_CATSEARCH_EXT 67
189
#define AFP_ENUMERATE_EXT 66
190
#define AFP_READ_EXT 60
191
#define AFP_WRITE_EXT 61
192
#define AFP_LOGIN_EXT 63
193
#define AFP_GETSESSTOKEN 64
194
#define AFP_DISCTOLDSESS 65
195
196
/* version 3.1 */
197
#define AFP_ENUMERATE_EXT2 68
198
#define AFP_SPOTLIGHT_PRIVATE 76
199
#define AFP_SYNCDIR 78
200
#define AFP_SYNCFORK 79
201
#define AFP_ZZZ 122
202
203
/* version 3.2 */
204
#define AFP_GETEXTATTR 69
205
#define AFP_SETEXTATTR 70
206
#define AFP_REMOVEATTR 71
207
#define AFP_LISTEXTATTR 72
208
#define AFP_GETACL 73
209
#define AFP_SETACL 74
210
#define AFP_ACCESS 75
211
212
/* more defines */
213
#define REPLAYCACHE_SIZE 128
214
215
#endif
afpmessage_t
afpmessage_t
Definition
afp.h:118
AFPMESG_LOGIN
@ AFPMESG_LOGIN
Definition
afp.h:119
AFPMESG_SERVER
@ AFPMESG_SERVER
Definition
afp.h:120
AFPUserBytes
uint16_t AFPUserBytes
Definition
afp.h:30
include
atalk
afp.h
Generated by
1.15.0