netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
include/atalk/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
22 */
23
24#ifndef _ATALK_AFP_H
25#define _ATALK_AFP_H 1
26
27#include <stdint.h>
28#include <sys/types.h>
29
30typedef uint16_t AFPUserBytes;
31
32/* protocols */
33#define AFPPROTO_ASP 1
34#define AFPPROTO_DSI 2
35
36/* server flags */
37/* supports copyfile */
38#define AFPSRVRINFO_COPY (1<<0)
39/* supports change password */
40#define AFPSRVRINFO_PASSWD (1<<1)
41/* don't allow save password */
42#define AFPSRVRINFO_NOSAVEPASSWD (1<<2)
43/* supports server messages */
44#define AFPSRVRINFO_SRVMSGS (1<<3)
45/* supports server signature */
46#define AFPSRVRINFO_SRVSIGNATURE (1<<4)
47/* supports tcpip */
48#define AFPSRVRINFO_TCPIP (1<<5)
49/* supports server notifications */
50#define AFPSRVRINFO_SRVNOTIFY (1<<6)
51/* supports server reconnect */
52#define AFPSRVRINFO_SRVRECONNECT (1<<7)
53/* supports directories service */
54#define AFPSRVRINFO_SRVRDIR (1<<8)
55/* supports UTF8 names AFP 3.1 */
56#define AFPSRVRINFO_SRVUTF8 (1<<9)
57/* supports UUIDs */
58#define AFPSRVRINFO_UUID (1<<10)
59/* supports extended sleep */
60#define AFPSRVRINFO_EXTSLEEP (1<<11)
61/* fast copying */
62#define AFPSRVRINFO_FASTBOZO (1<<15)
63
64#define AFP_OK 0
65/* maximum number of allowed sessions reached */
66#define AFPERR_MAXSESS -1068
67/* not an afp error DID is 1 */
68#define AFPERR_DID1 -4000
69/* permission denied */
70#define AFPERR_ACCESS -5000
71/* logincont */
72#define AFPERR_AUTHCONT -5001
73/* uam doesn't exist */
74#define AFPERR_BADUAM -5002
75/* bad afp version number */
76#define AFPERR_BADVERS -5003
77/* invalid bitmap */
78#define AFPERR_BITMAP -5004
79/* can't move file */
80#define AFPERR_CANTMOVE -5005
81/* file synchronization locks conflict */
82#define AFPERR_DENYCONF -5006
83/* directory not empty */
84#define AFPERR_DIRNEMPT -5007
85/* disk full */
86#define AFPERR_DFULL -5008
87/* end of file -- catsearch and afp_read */
88#define AFPERR_EOF -5009
89/* FileBusy */
90#define AFPERR_BUSY -5010
91/* volume doesn't support directories */
92#define AFPERR_FLATVOL -5011
93/* ItemNotFound */
94#define AFPERR_NOITEM -5012
95/* LockErr */
96#define AFPERR_LOCK -5013
97/* misc. err */
98#define AFPERR_MISC -5014
99/* no more locks */
100#define AFPERR_NLOCK -5015
101/* no response by server at that address */
102#define AFPERR_NOSRVR -5016
103/* object already exists */
104#define AFPERR_EXIST -5017
105/* object not found */
106#define AFPERR_NOOBJ -5018
107/* parameter error */
108#define AFPERR_PARAM -5019
109/* no range lock */
110#define AFPERR_NORANGE -5020
111/* range overlap */
112#define AFPERR_RANGEOVR -5021
113/* session closed */
114#define AFPERR_SESSCLOS -5022
115/* user not authenticated */
116#define AFPERR_NOTAUTH -5023
117/* command not supported */
118#define AFPERR_NOOP -5024
119/* object is the wrong type */
120#define AFPERR_BADTYPE -5025
121/* too many files open */
122#define AFPERR_NFILE -5026
123/* server is going down */
124#define AFPERR_SHUTDOWN -5027
125/* can't rename */
126#define AFPERR_NORENAME -5028
127/* couldn't find directory */
128#define AFPERR_NODIR -5029
129/* wrong icon type */
130#define AFPERR_ITYPE -5030
131/* volume locked */
132#define AFPERR_VLOCK -5031
133/* object locked */
134#define AFPERR_OLOCK -5032
135/* share point contains a share point */
136#define AFPERR_CTNSHRD -5033
137/* file thread not found */
138#define AFPERR_NOID -5034
139/* file already has an id */
140#define AFPERR_EXISTID -5035
141/* different volume */
142#define AFPERR_DIFFVOL -5036
143/* catalog has changed */
144#define AFPERR_CATCHNG -5037
145/* source file == destination file */
146#define AFPERR_SAMEOBJ -5038
147/* non-existent file id */
148#define AFPERR_BADID -5039
149/* same password/can't change password */
150#define AFPERR_PWDSAME -5040
151/* password too short */
152#define AFPERR_PWDSHORT -5041
153/* password expired */
154#define AFPERR_PWDEXPR -5042
155/* folder being shared is inside a shared folder. may be returned by
156 * afpMoveAndRename. */
157#define AFPERR_INSHRD -5043
158/* shared folder in trash. */
159#define AFPERR_INTRASH -5044
160/* password needs to be changed */
161#define AFPERR_PWDCHNG -5045
162/* password fails policy check */
163#define AFPERR_PWDPOLCY -5046
164/* user already logged on */
165#define AFPERR_USRLOGIN -5047
166
167/* AFP Attention Codes -- 4 bits */
168/* shutdown/disconnect */
169#define AFPATTN_SHUTDOWN (1 << 15)
170/* server crashed */
171#define AFPATTN_CRASH (1 << 14)
172/* server has message */
173#define AFPATTN_MESG (1 << 13)
174/* don't reconnect */
175#define AFPATTN_NORECONNECT (1 << 12)
176/* server notification */
177#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT)
178
179/* extended bitmap -- 12 bits. volchanged is only useful w/ a server
180 * notification, and time is only useful for shutdown. */
181/* volume has changed */
182#define AFPATTN_VOLCHANGED (1 << 0)
183/* time in minutes */
184#define AFPATTN_TIME(x) ((x) & 0xfff)
185
190
191/* extended sleep flag */
192#define AFPZZZ_EXT_SLEEP 1
193#define AFPZZZ_EXT_WAKEUP 2
194
195
196/* AFP functions */
197#define AFP_BYTELOCK 1
198#define AFP_CLOSEVOL 2
199#define AFP_CLOSEDIR 3
200#define AFP_CLOSEFORK 4
201#define AFP_COPYFILE 5
202#define AFP_CREATEDIR 6
203#define AFP_CREATEFILE 7
204#define AFP_DELETE 8
205#define AFP_ENUMERATE 9
206#define AFP_FLUSH 10
207#define AFP_FLUSHFORK 11
208
209#define AFP_GETFORKPARAM 14
210#define AFP_GETSRVINFO 15
211#define AFP_GETSRVPARAM 16
212#define AFP_GETVOLPARAM 17
213#define AFP_LOGIN 18
214#define AFP_LOGINCONT 19
215#define AFP_LOGOUT 20
216#define AFP_MAPID 21
217#define AFP_MAPNAME 22
218#define AFP_MOVE 23
219#define AFP_OPENVOL 24
220#define AFP_OPENDIR 25
221#define AFP_OPENFORK 26
222#define AFP_READ 27
223#define AFP_RENAME 28
224#define AFP_SETDIRPARAM 29
225#define AFP_SETFILEPARAM 30
226#define AFP_SETFORKPARAM 31
227#define AFP_SETVOLPARAM 32
228#define AFP_WRITE 33
229#define AFP_GETFLDRPARAM 34
230#define AFP_SETFLDRPARAM 35
231#define AFP_CHANGEPW 36
232#define AFP_GETUSERINFO 37
233#define AFP_GETSRVRMSG 38
234#define AFP_CREATEID 39
235#define AFP_DELETEID 40
236#define AFP_RESOLVEID 41
237#define AFP_EXCHANGEFILE 42
238#define AFP_CATSEARCH 43
239
240#define AFP_OPENDT 48
241#define AFP_CLOSEDT 49
242
243#define AFP_GETICON 51
244#define AFP_GTICNINFO 52
245#define AFP_ADDAPPL 53
246#define AFP_RMVAPPL 54
247
248#define AFP_GETAPPL 55
249#define AFP_ADDCMT 56
250#define AFP_RMVCMT 57
251#define AFP_GETCMT 58
252#define AFP_ADDICON 192
253
254/* version 3.0 */
255#define AFP_BYTELOCK_EXT 59
256#define AFP_CATSEARCH_EXT 67
257#define AFP_ENUMERATE_EXT 66
258#define AFP_READ_EXT 60
259#define AFP_WRITE_EXT 61
260#define AFP_LOGIN_EXT 63
261#define AFP_GETSESSTOKEN 64
262#define AFP_DISCTOLDSESS 65
263
264/* version 3.1 */
265#define AFP_ENUMERATE_EXT2 68
266#define AFP_SPOTLIGHT_PRIVATE 76
267#define AFP_SYNCDIR 78
268#define AFP_SYNCFORK 79
269#define AFP_ZZZ 122
270
271/* version 3.2 */
272#define AFP_GETEXTATTR 69
273#define AFP_SETEXTATTR 70
274#define AFP_REMOVEATTR 71
275#define AFP_LISTEXTATTR 72
276#define AFP_GETACL 73
277#define AFP_SETACL 74
278#define AFP_ACCESS 75
279
280/* more defines */
281#define REPLAYCACHE_SIZE 128
282
283#endif
afpmessage_t
Definition include/atalk/afp.h:186
@ AFPMESG_LOGIN
Definition include/atalk/afp.h:187
@ AFPMESG_SERVER
Definition include/atalk/afp.h:188
uint16_t AFPUserBytes
Definition include/atalk/afp.h:30