netatalk 4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afpcmd.h
Go to the documentation of this file.
1/* -------------------------------- */
2#ifndef AFPCMD_H
3#define AFPCMD_H
4
5#include <inttypes.h>
6
7#include "afpclient.h"
8
9 extern unsigned int FPopenLogin(CONN *conn, char *vers, char *uam, char *usr,
10 char *pwd);
11 extern unsigned int FPopenLoginExt(CONN *conn, char *vers, char *uam, char *usr,
12 char *pwd);
13 extern unsigned int FPzzz(CONN *conn, int);
14 extern unsigned int FPLogOut(CONN *conn);
15 extern unsigned int FPMapID(CONN *conn, char fn, int id);
16 extern unsigned int FPMapName(CONN *conn, char fn, char *name);
17 extern unsigned int FPGetSessionToken(CONN *conn, int type, uint32_t time,
18 int len, char *token);
19 extern unsigned int FPDisconnectOldSession(CONN *conn, uint16_t type, int len,
20 char *token);
21
22 extern unsigned int FPGetSrvrInfo(CONN *conn);
23 extern unsigned int FPGetSrvrParms(CONN *conn);
24 extern unsigned int FPGetSrvrMsg(CONN *conn, uint16_t type, uint16_t bitmap);
25
26 extern uint16_t FPOpenVol(CONN *conn, char *vol);
27 extern uint16_t FPOpenVolFull(CONN *conn, char *vol, uint16_t bitmap);
28 extern unsigned int FPCloseVol(CONN *conn, uint16_t vol);
29 extern uint16_t FPOpenDT(CONN *conn, uint16_t vol);
30 extern unsigned int FPCloseDT(CONN *conn, uint16_t vol);
31 extern unsigned int FPCloseDir(CONN *conn, uint16_t vol, int did);
32
33 extern unsigned int FPByteLock(CONN *conn, uint16_t fork, int end, int mode,
34 int offset, int size);
35 extern unsigned int FPByteLock_ext(CONN *conn, uint16_t fork, int end, int mode,
36 off_t offset, off_t size);
37
38 extern unsigned int FPCloseFork(CONN *conn, uint16_t vol);
39
40 extern unsigned int FPFlush(CONN *conn, uint16_t vol);
41 extern unsigned int FPFlushFork(CONN *conn, uint16_t vol);
42 extern unsigned int FPEnumerate(CONN *conn, uint16_t vol, int did, char *name,
43 uint16_t f_bitmap, uint16_t d_bitmap);
44 extern unsigned int FPEnumerateFull(CONN *conn, uint16_t vol, uint16_t sindex,
45 uint16_t reqcnt, uint16_t size,
46 int did, char *name, uint16_t f_bitmap, uint16_t d_bitmap);
47
48 extern unsigned int FPGetFileDirParams(CONN *conn, uint16_t vol, int did,
49 char *name, uint16_t f_bitmap, uint16_t d_bitmap);
50 extern unsigned int FPEnumerate_ext(CONN *conn, uint16_t vol, int did,
51 char *name, uint16_t f_bitmap, uint16_t d_bitmap);
52 extern unsigned int FPEnumerate_ext2(CONN *conn, uint16_t vol, int did,
53 char *name, uint16_t f_bitmap, uint16_t d_bitmap);
54 extern unsigned int FPEnumerateExt2Full(CONN *conn, uint16_t vol, uint32_t did,
55 char *name, uint16_t f_bitmap, uint16_t d_bitmap, uint32_t startindex,
56 uint16_t reqcount);
57 extern unsigned int FPDelete(CONN *conn, uint16_t vol, int did, char *name);
58 extern unsigned int FPOpenDir(CONN *conn, uint16_t vol, int did, char *name);
59 extern unsigned int FPCreateDir(CONN *conn, uint16_t vol, int did, char *name);
60 extern uint16_t FPOpenFork(CONN *conn, uint16_t vol, int type,
61 uint16_t bitmap, int did, char *name, int access);
62 extern unsigned int FPCreateFile(CONN *conn, uint16_t vol, char type, int did,
63 char *name);
64 extern unsigned int FPGetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap);
65 extern unsigned int FPCopyFile(CONN *conn, uint16_t svol, int sdid,
66 uint16_t dvol, int ddid, char *src, char *dstdir, char *dst);
67 extern unsigned int FPExchangeFile(CONN *conn, uint16_t vol, int sdid, int ddid,
68 char *src, char *dst);
69
70 extern unsigned int FPMoveAndRename(CONN *conn, uint16_t svol, int sdid,
71 int ddid, char *src, char *dst);
72 extern unsigned int FPRename(CONN *conn, uint16_t svol, int sdid, char *src,
73 char *dst);
74
75 extern unsigned int FPReadHeader(DSI *dsi, uint16_t fork, int offset, int size,
76 char *data);
77 extern unsigned int FPReadFooter(DSI *dsi, uint16_t fork, int offset, int size,
78 char *data);
79 extern unsigned int FPRead(CONN *conn, uint16_t fork, long long offset,
80 int size, char *data);
81
82 extern unsigned int FPRead_ext(CONN *conn, uint16_t fork, off_t offset,
83 off_t size, char *data);
84 extern unsigned int FPRead_ext_async(CONN *conn, uint16_t fork, off_t offset,
85 off_t size, char *data);
86
87 extern unsigned int FPWriteHeader(DSI *dsi, uint16_t fork, int offset, int size,
88 char *data, char whence);
89 extern unsigned int FPWriteFooter(DSI *dsi, uint16_t fork, int offset, int size,
90 char *data, char whence);
91 extern unsigned int FPWrite(CONN *conn, uint16_t fork, long long offset,
92 int size, char *data, char whence);
93 extern unsigned int FPWrite_ext(CONN *conn, uint16_t fork, off_t offset,
94 off_t size, char *data, char whence);
95 extern unsigned int FPWrite_ext_async(CONN *conn, uint16_t fork, off_t offset,
96 off_t size, char *data, char whence);
97
98 extern unsigned int FPSetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap,
99 off_t size);
100
101 extern unsigned int FPGetComment(CONN *conn, uint16_t vol, int did, char *name);
102 extern unsigned int FPRemoveComment(CONN *conn, uint16_t vol, int did,
103 char *name);
104 extern unsigned int FPAddComment(CONN *conn, uint16_t vol, int did, char *name,
105 char *cmt);
106
107 extern unsigned int FPGetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap);
108 extern unsigned int FPSetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap,
109 struct afp_volume_parms *parms);
110
111 extern unsigned int FPGetUserInfo(CONN *conn, char flag, int id,
112 uint16_t bitmap);
113
114 extern unsigned int FPSetDirParms(CONN *conn, uint16_t vol, int did, char *name,
115 uint16_t bitmap,
116 struct afp_filedir_parms *dir);
117 extern unsigned int FPSetFilDirParam(CONN *conn, uint16_t vol, int did,
118 char *name, uint16_t bitmap,
119 struct afp_filedir_parms *fil);
120
121 extern unsigned int FPSetFileParams(CONN *, uint16_t vol, int did, char *name,
122 uint16_t bitmap, struct afp_filedir_parms *);
123
124 extern unsigned int FPCreateID(CONN *conn, uint16_t vol, int did, char *name);
125 extern unsigned int FPDeleteID(CONN *conn, uint16_t vol, int did);
126 extern unsigned int FPResolveID(CONN *conn, uint16_t vol, int did,
127 uint16_t bitmap);
128
129 extern unsigned int FPAddIcon(CONN *conn, uint16_t dt, char *creator,
130 char *type, char itype, uint32_t tag,
131 uint16_t size, char *data);
132 extern unsigned int FPGetIcon(CONN *conn, uint16_t dt, char *creator,
133 char *type, char itype, uint16_t size);
134 extern unsigned int FPGetIconInfo(CONN *conn, uint16_t dt,
135 unsigned char *creator, uint16_t itype);
136
137 extern unsigned int FPGetAppl(CONN *conn, uint16_t dt, char *name,
138 uint16_t index, uint16_t f_bitmap);
139 extern unsigned int FPAddAPPL(CONN *conn, uint16_t dt, int did, char *creator,
140 uint32_t tag, char *name);
141 extern unsigned int FPRemoveAPPL(CONN *conn, uint16_t dt, int did,
142 char *creator, char *name);
143
144 extern unsigned int FPCatSearch(CONN *conn, uint16_t vol, uint32_t nbe,
145 char *pos, uint16_t f_bitmap, uint16_t d_bitmap,
146 uint32_t rbitmap, struct afp_filedir_parms *filedir,
147 struct afp_filedir_parms *filedir2);
148
149 extern unsigned int FPCatSearchExt(CONN *conn, uint16_t vol, uint32_t nbe,
150 char *pos, uint16_t f_bitmap, uint16_t d_bitmap,
151 uint32_t rbitmap, struct afp_filedir_parms *filedir,
152 struct afp_filedir_parms *filedir2);
153
154 extern unsigned int FPBadPacket(CONN *conn, char fn, char *name);
155
156 extern unsigned int FPGetACL(CONN *conn, uint16_t svol, int did,
157 uint16_t bitmap, char *name);
158 extern unsigned int FPGetExtAttr(CONN *conn, uint16_t vol, int did,
159 uint16_t bitmap, uint16_t maxsize, char *name, char *attr);
160 extern unsigned int FPListExtAttr(CONN *conn, uint16_t vol, int did,
161 uint16_t bitmap, int maxsize, char *name);
162 extern unsigned int FPSetExtAttr(CONN *conn, uint16_t vol, int did,
163 uint16_t bitmap, char *name, char *attr, char *data);
164 extern unsigned int FPRemoveExtAttr(CONN *conn, uint16_t vol, int did,
165 uint16_t bitmap, char *name, char *attr);
166 extern unsigned int FPSyncDir(CONN *conn, uint16_t vol, int did);
167
168 char *afp_error(int error);
169
170#endif
vers
char * vers
Definition afparg.c:53
uam
char * uam
Definition afparg.c:54
dsi
static DSI * dsi
Definition afparg.c:39
afpclient.h
FPWriteFooter
unsigned int FPWriteFooter(DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence)
Definition afpcmd.c:2415
FPMoveAndRename
unsigned int FPMoveAndRename(CONN *conn, uint16_t svol, int sdid, int ddid, char *src, char *dst)
Definition afpcmd.c:2240
FPGetFileDirParams
unsigned int FPGetFileDirParams(CONN *conn, uint16_t vol, int did, char *name, uint16_t f_bitmap, uint16_t d_bitmap)
Definition afpcmd.c:1326
FPGetIcon
unsigned int FPGetIcon(CONN *conn, uint16_t dt, char *creator, char *type, char itype, uint16_t size)
Definition afpcmd.c:900
FPSyncDir
unsigned int FPSyncDir(CONN *conn, uint16_t vol, int did)
Definition afpcmd.c:2040
FPRemoveExtAttr
unsigned int FPRemoveExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *name, char *attr)
Definition afpcmd.c:2555
FPReadFooter
unsigned int FPReadFooter(DSI *dsi, uint16_t fork, int offset, int size, char *data)
Definition afpcmd.c:2329
FPExchangeFile
unsigned int FPExchangeFile(CONN *conn, uint16_t vol, int sdid, int ddid, char *src, char *dst)
Definition afpcmd.c:2201
FPDisconnectOldSession
unsigned int FPDisconnectOldSession(CONN *conn, uint16_t type, int len, char *token)
Definition afpcmd.c:684
FPByteLock
unsigned int FPByteLock(CONN *conn, uint16_t fork, int end, int mode, int offset, int size)
Definition afpcmd.c:1106
FPCloseFork
unsigned int FPCloseFork(CONN *conn, uint16_t vol)
Definition afpcmd.c:1074
FPRead
unsigned int FPRead(CONN *conn, uint16_t fork, long long offset, int size, char *data)
Definition afpcmd.c:2345
FPCreateID
unsigned int FPCreateID(CONN *conn, uint16_t vol, int did, char *name)
Definition afpcmd.c:1369
FPCreateFile
unsigned int FPCreateFile(CONN *conn, uint16_t vol, char type, int did, char *name)
Definition afpcmd.c:1842
FPMapID
unsigned int FPMapID(CONN *conn, char fn, int id)
Definition afpcmd.c:702
FPDelete
unsigned int FPDelete(CONN *conn, uint16_t vol, int did, char *name)
Definition afpcmd.c:1679
FPReadHeader
unsigned int FPReadHeader(DSI *dsi, uint16_t fork, int offset, int size, char *data)
Definition afpcmd.c:2313
FPCreateDir
unsigned int FPCreateDir(CONN *conn, uint16_t vol, int did, char *name)
Definition afpcmd.c:1799
FPGetSrvrInfo
unsigned int FPGetSrvrInfo(CONN *conn)
Definition afpcmd.c:767
FPWrite_ext
unsigned int FPWrite_ext(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data, char whence)
Definition afpcmd.c:2449
FPSetDirParms
unsigned int FPSetDirParms(CONN *conn, uint16_t vol, int did, char *name, uint16_t bitmap, struct afp_filedir_parms *dir)
Definition afpcmd.c:1948
FPGetSessionToken
unsigned int FPGetSessionToken(CONN *conn, int type, uint32_t time, int len, char *token)
Definition afpcmd.c:667
FPCloseDir
unsigned int FPCloseDir(CONN *conn, uint16_t vol, int did)
Definition afpcmd.c:1161
FPopenLogin
unsigned int FPopenLogin(CONN *conn, char *vers, char *uam, char *usr, char *pwd)
Definition afpcmd.c:571
FPSetVolParam
unsigned int FPSetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap, struct afp_volume_parms *parms)
Definition afpcmd.c:1040
FPEnumerateExt2Full
unsigned int FPEnumerateExt2Full(CONN *conn, uint16_t vol, uint32_t did, char *name, uint16_t f_bitmap, uint16_t d_bitmap, uint32_t startindex, uint16_t reqcount)
Definition afpcmd.c:1606
FPByteLock_ext
unsigned int FPByteLock_ext(CONN *conn, uint16_t fork, int end, int mode, off_t offset, off_t size)
Definition afpcmd.c:1124
FPAddAPPL
unsigned int FPAddAPPL(CONN *conn, uint16_t dt, int did, char *creator, uint32_t tag, char *name)
Definition afpcmd.c:1894
FPCopyFile
unsigned int FPCopyFile(CONN *conn, uint16_t svol, int sdid, uint16_t dvol, int ddid, char *src, char *dstdir, char *dst)
Definition afpcmd.c:2160
FPGetExtAttr
unsigned int FPGetExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, uint16_t maxsize, char *name, char *attr)
Definition afpcmd.c:2500
FPSetExtAttr
unsigned int FPSetExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *name, char *attr, char *data)
Definition afpcmd.c:2536
FPEnumerate_ext
unsigned int FPEnumerate_ext(CONN *conn, uint16_t vol, int did, char *name, uint16_t f_bitmap, uint16_t d_bitmap)
Definition afpcmd.c:1475
FPDeleteID
unsigned int FPDeleteID(CONN *conn, uint16_t vol, int did)
Definition afpcmd.c:1404
FPRemoveComment
unsigned int FPRemoveComment(CONN *conn, uint16_t vol, int did, char *name)
Definition afpcmd.c:1715
FPRead_ext
unsigned int FPRead_ext(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data)
Definition afpcmd.c:2363
FPLogOut
unsigned int FPLogOut(CONN *conn)
Definition afpcmd.c:635
FPOpenDT
uint16_t FPOpenDT(CONN *conn, uint16_t vol)
Definition afpcmd.c:856
FPRename
unsigned int FPRename(CONN *conn, uint16_t svol, int sdid, char *src, char *dst)
Definition afpcmd.c:2278
FPOpenVol
uint16_t FPOpenVol(CONN *conn, char *vol)
Definition afpcmd.c:835
afp_error
char * afp_error(int error)
Definition afpcmd.c:21
FPCatSearch
unsigned int FPCatSearch(CONN *conn, uint16_t vol, uint32_t nbe, char *pos, uint16_t f_bitmap, uint16_t d_bitmap, uint32_t rbitmap, struct afp_filedir_parms *filedir, struct afp_filedir_parms *filedir2)
Definition afpcmd.c:2072
FPRemoveAPPL
unsigned int FPRemoveAPPL(CONN *conn, uint16_t dt, int did, char *creator, char *name)
Definition afpcmd.c:1912
FPCloseVol
unsigned int FPCloseVol(CONN *conn, uint16_t vol)
Definition afpcmd.c:841
FPGetIconInfo
unsigned int FPGetIconInfo(CONN *conn, uint16_t dt, unsigned char *creator, uint16_t itype)
Definition afpcmd.c:986
FPWrite_ext_async
unsigned int FPWrite_ext_async(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data, char whence)
Definition afpcmd.c:2467
FPSetFilDirParam
unsigned int FPSetFilDirParam(CONN *conn, uint16_t vol, int did, char *name, uint16_t bitmap, struct afp_filedir_parms *fil)
Definition afpcmd.c:2114
FPEnumerate_ext2
unsigned int FPEnumerate_ext2(CONN *conn, uint16_t vol, int did, char *name, uint16_t f_bitmap, uint16_t d_bitmap)
Definition afpcmd.c:1540
FPOpenFork
uint16_t FPOpenFork(CONN *conn, uint16_t vol, int type, uint16_t bitmap, int did, char *name, int access)
Definition afpcmd.c:1818
FPGetAppl
unsigned int FPGetAppl(CONN *conn, uint16_t dt, char *name, uint16_t index, uint16_t f_bitmap)
Definition afpcmd.c:1877
FPGetUserInfo
unsigned int FPGetUserInfo(CONN *conn, char flag, int id, uint16_t bitmap)
Definition afpcmd.c:750
FPOpenVolFull
uint16_t FPOpenVolFull(CONN *conn, char *vol, uint16_t bitmap)
Definition afpcmd.c:820
FPAddComment
unsigned int FPAddComment(CONN *conn, uint16_t vol, int did, char *name, char *cmt)
Definition afpcmd.c:1733
FPopenLoginExt
unsigned int FPopenLoginExt(CONN *conn, char *vers, char *uam, char *usr, char *pwd)
Definition afpcmd.c:601
FPzzz
unsigned int FPzzz(CONN *conn, int)
Definition afpcmd.c:651
FPFlushFork
unsigned int FPFlushFork(CONN *conn, uint16_t vol)
Definition afpcmd.c:1144
FPResolveID
unsigned int FPResolveID(CONN *conn, uint16_t vol, int did, uint16_t bitmap)
Definition afpcmd.c:1438
FPGetForkParam
unsigned int FPGetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap)
Definition afpcmd.c:1860
FPWrite
unsigned int FPWrite(CONN *conn, uint16_t fork, long long offset, int size, char *data, char whence)
Definition afpcmd.c:2431
FPOpenDir
unsigned int FPOpenDir(CONN *conn, uint16_t vol, int did, char *name)
Definition afpcmd.c:1753
FPSetForkParam
unsigned int FPSetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap, off_t size)
Definition afpcmd.c:1930
FPGetSrvrMsg
unsigned int FPGetSrvrMsg(CONN *conn, uint16_t type, uint16_t bitmap)
Definition afpcmd.c:799
FPListExtAttr
unsigned int FPListExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, int maxsize, char *name)
Definition afpcmd.c:2518
FPBadPacket
unsigned int FPBadPacket(CONN *conn, char fn, char *name)
Definition afpcmd.c:734
FPEnumerateFull
unsigned int FPEnumerateFull(CONN *conn, uint16_t vol, uint16_t sindex, uint16_t reqcnt, uint16_t size, int did, char *name, uint16_t f_bitmap, uint16_t d_bitmap)
Definition afpcmd.c:1258
FPAddIcon
unsigned int FPAddIcon(CONN *conn, uint16_t dt, char *creator, char *type, char itype, uint32_t tag, uint16_t size, char *data)
Definition afpcmd.c:941
FPSetFileParams
unsigned int FPSetFileParams(CONN *, uint16_t vol, int did, char *name, uint16_t bitmap, struct afp_filedir_parms *)
Definition afpcmd.c:1994
FPEnumerate
unsigned int FPEnumerate(CONN *conn, uint16_t vol, int did, char *name, uint16_t f_bitmap, uint16_t d_bitmap)
Definition afpcmd.c:1195
FPRead_ext_async
unsigned int FPRead_ext_async(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data)
Definition afpcmd.c:2381
FPGetVolParam
unsigned int FPGetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap)
Definition afpcmd.c:1023
FPGetACL
unsigned int FPGetACL(CONN *conn, uint16_t svol, int did, uint16_t bitmap, char *name)
Definition afpcmd.c:2483
FPFlush
unsigned int FPFlush(CONN *conn, uint16_t vol)
Definition afpcmd.c:1090
FPMapName
unsigned int FPMapName(CONN *conn, char fn, char *name)
Definition afpcmd.c:718
FPCatSearchExt
unsigned int FPCatSearchExt(CONN *conn, uint16_t vol, uint32_t nbe, char *pos, uint16_t f_bitmap, uint16_t d_bitmap, uint32_t rbitmap, struct afp_filedir_parms *filedir, struct afp_filedir_parms *filedir2)
Definition afpcmd.c:2093
FPCloseDT
unsigned int FPCloseDT(CONN *conn, uint16_t vol)
Definition afpcmd.c:1058
FPGetSrvrParms
unsigned int FPGetSrvrParms(CONN *conn)
Definition afpcmd.c:783
FPWriteHeader
unsigned int FPWriteHeader(DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence)
Definition afpcmd.c:2399
FPGetComment
unsigned int FPGetComment(CONN *conn, uint16_t vol, int did, char *name)
Definition afpcmd.c:1697
time
struct timeval time
data
#define data
Definition hash.c:37
did
cnid_t did
Definition nad_cp.c:93
type
static enum op type
Definition nad_cp.c:96
flag
#define flag(x)
Definition netacnv.c:15
CONN
Definition afpclient.h:190
DSI
Definition include/atalk/dsi.h:58
afp_filedir_parms
Definition afpclient.h:219
afp_volume_parms
Definition afpclient.h:243
dir
Definition include/atalk/directory.h:55
vol
Definition include/atalk/volume.h:30