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