netatalk  4.4.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afpclient.h
Go to the documentation of this file.
1/* ---------------------------------------------------
2*/
3#ifndef AFPCLIENT_H
4#define AFPCLIENT_H
5
6#ifdef HAVE_CONFIG_H
7#include "config.h"
8#endif /* HAVE_CONFIG_H */
9
10#include <stdio.h>
11#include <stdlib.h>
12#include <string.h>
13#include <unistd.h>
14#include <fcntl.h>
15#include <signal.h>
16
17#include <sys/types.h>
18#include <sys/stat.h>
19#include <sys/param.h>
20#include <sys/uio.h>
21#include <sys/time.h>
22#include <sys/socket.h>
23
24#include <sys/ioctl.h>
25#include <net/if.h>
26#include <netinet/tcp.h>
27#include <netinet/in.h>
28#include <arpa/inet.h>
29#include <errno.h>
30#include <netdb.h>
31
32#include <atalk/afp.h>
33#include "dsi.h"
34
35#ifndef SA_ONESHOT
36#define SA_ONESHOT SA_RESETHAND
37#endif
38
39
40#ifndef HAVE_BSWAP_64
41#define bswap_64(x) \
42 ((((x) & 0xff00000000000000ull) >> 56) \
43 | (((x) & 0x00ff000000000000ull) >> 40) \
44 | (((x) & 0x0000ff0000000000ull) >> 24) \
45 | (((x) & 0x000000ff00000000ull) >> 8) \
46 | (((x) & 0x00000000ff000000ull) << 8) \
47 | (((x) & 0x0000000000ff0000ull) << 24) \
48 | (((x) & 0x000000000000ff00ull) << 40) \
49 | (((x) & 0x00000000000000ffull) << 56))
50#endif /* bswap_64 */
51
52/* AFP functions */
53#ifndef AFP_CLOSEVOL
54#define AFP_CLOSEVOL 2
55#define AFP_ENUMERATE 9
56
57#define AFP_GETSRVINFO 15
58#define AFP_GETSRVPARAM 16
59#define AFP_LOGIN 18
60
61#define AFP_LOGOUT 20
62#define AFP_OPENVOL 24
63#define AFP_OPENDIR 25
64#define AFP_OPENFORK 26
65
66#define AFP_OPENDT 48
67#define AFP_CLOSEDT 49
68#endif
69
70/* ----------------------------- */
71/* from etc/afpd/directory.h volume attributes */
72#define DIRPBIT_ATTR 0
73#define DIRPBIT_PDID 1
74#define DIRPBIT_CDATE 2
75#define DIRPBIT_MDATE 3
76#define DIRPBIT_BDATE 4
77#define DIRPBIT_FINFO 5
78#define DIRPBIT_LNAME 6
79#define DIRPBIT_SNAME 7
80#define DIRPBIT_DID 8
81#define DIRPBIT_OFFCNT 9
82#define DIRPBIT_UID 10
83#define DIRPBIT_GID 11
84#define DIRPBIT_ACCESS 12
85#define DIRPBIT_PDINFO 13
86#define DIRPBIT_UNIXPR 15
87
88/* directory attribute bits (see file.h for other bits) */
89#define ATTRBIT_EXPFOLDER (1 << 1)
90#define ATTRBIT_MOUNTED (1 << 3)
91#define ATTRBIT_INEXPFOLDER (1 << 4)
92
93#define FILDIRBIT_ISDIR (1 << 7)
94#define FILDIRBIT_ISFILE (0)
95
96/* reserved directory id's */
97#define DIRDID_ROOT_PARENT htonl(1)
98#define DIRDID_ROOT htonl(2)
99
100/* ----------------------------- */
101/* from etc/afpd/file.h volume attributes */
102#define FILPBIT_ATTR 0
103#define FILPBIT_PDID 1
104#define FILPBIT_CDATE 2
105#define FILPBIT_MDATE 3
106#define FILPBIT_BDATE 4
107#define FILPBIT_FINFO 5
108#define FILPBIT_LNAME 6
109#define FILPBIT_SNAME 7
110#define FILPBIT_FNUM 8
111#define FILPBIT_DFLEN 9
112#define FILPBIT_RFLEN 10
113#define FILPBIT_EXTDFLEN 11
114#define FILPBIT_PDINFO 13
115#define FILPBIT_EXTRFLEN 14
116#define FILPBIT_UNIXPR 15
117
118/* attribute bits. d = directory attribute bit as well. */
119#define ATTRBIT_INVISIBLE (1<<0)
120#define ATTRBIT_MULTIUSER (1<<1)
121#define ATTRBIT_SYSTEM (1<<2)
122#define ATTRBIT_DOPEN (1<<3)
123#define ATTRBIT_ROPEN (1<<4)
124#define ATTRBIT_SHARED (1<<4)
125#define ATTRBIT_NOWRITE (1<<5)
126#define ATTRBIT_BACKUP (1<<6)
127#define ATTRBIT_NORENAME (1<<7)
128#define ATTRBIT_NODELETE (1<<8)
129#define ATTRBIT_NOCOPY (1<<10)
130#define ATTRBIT_SETCLR (1<<15)
131
132/* ----------------------------- */
133/* from etc/afpd/volume.h volume attributes */
134#define VOLPBIT_ATTR_RO (1 << 0)
135#define VOLPBIT_ATTR_PASSWD (1 << 1)
136#define VOLPBIT_ATTR_FILEID (1 << 2)
137#define VOLPBIT_ATTR_CATSEARCH (1 << 3)
138#define VOLPBIT_ATTR_BLANKACCESS (1 << 4)
139#define VOLPBIT_ATTR_UNIXPRIV (1 << 5)
140#define VOLPBIT_ATTR_UTF8 (1 << 6)
141#define VOLPBIT_ATTR_NONETUID (1 << 7)
142#define VOLPBIT_ATTR_PRIVPARENT (1 << 8)
143#define VOLPBIT_ATTR_NOEXCHANGE (1 << 9)
144#define VOLPBIT_ATTR_EXTATTRS (1 << 10)
145#define VOLPBIT_ATTR_ACLS (1 << 11)
146
147#define VOLPBIT_ATTR 0
148#define VOLPBIT_SIG 1
149#define VOLPBIT_CDATE 2
150#define VOLPBIT_MDATE 3
151#define VOLPBIT_BDATE 4
152#define VOLPBIT_VID 5
153#define VOLPBIT_BFREE 6
154#define VOLPBIT_BTOTAL 7
155#define VOLPBIT_NAME 8
156/* handle > 4GB volumes */
157#define VOLPBIT_XBFREE 9
158#define VOLPBIT_XBTOTAL 10
159#define VOLPBIT_BSIZE 11
160/* ----------------------------- */
161
162/* from etc/afpd/fork.h */
163#define AFPOF_DFORK 0x00
164#define AFPOF_RFORK 0x80
165
166#define OPENFORK_DATA (0)
167#define OPENFORK_RSCS (1<<7)
168
169#define OPENACC_RD (1<<0)
170#define OPENACC_WR (1<<1)
171#define OPENACC_DRD (1<<4)
172#define OPENACC_DWR (1<<5)
173
174#define AFPFORK_OPEN (1<<0)
175#define AFPFORK_RSRC (1<<1)
176#define AFPFORK_DATA (1<<2)
177#define AFPFORK_DIRTY (1<<3)
178#define AFPFORK_ACCRD (1<<4)
179#define AFPFORK_ACCWR (1<<5)
180#define AFPFORK_ACCMASK (AFPFORK_ACCRD | AFPFORK_ACCWR)
181
182/* we use this so that we can use the same mechanism for both byte
183 * locks and file synchronization locks. */
184#if _FILE_OFFSET_BITS == 64
185#define AD_FILELOCK_BASE (UINT64_C(0x7FFFFFFFFFFFFFFF) - 9)
186#else
187#define AD_FILELOCK_BASE (UINT32_C(0x7FFFFFFF) - 9)
188#endif
189
190typedef struct CONN {
192#if 0
193 ASP asp;
194#endif
195 int type;
198
199extern CONN *Conn, *Conn2;
200
201#define min(a,b) ((a) < (b) ? (a) : (b))
202
203#define PASSWDLEN 8
204
205#define dsi_clientID(x) ((x)->clientID++)
206
207#define my_dsi_send(x) do { \
208 (x)->header.dsi_len = htonl((x)->cmdlen); \
209 my_dsi_stream_send((x), (x)->commands, (x)->cmdlen); \
210} while (0)
211
212int my_dsi_cmd_receive(DSI *x);
214
215/* from
216 modified
217 */
218/* Files and directories */
220 int isdir;
221 uint16_t bitmap;
222 uint16_t attr;
223 uint16_t vid;
224 uint32_t pdid;
225 uint32_t did;
226 uint32_t bdate, mdate, cdate;
227 uint32_t dflen, rflen;
228 uint64_t ext_dflen;
229 uint64_t ext_rflen;
230 uint16_t offcnt;
231 uint32_t uid, gid;
232 uint32_t unix_priv; /* FIXME what if mode_t != uint32_t */
233 uint8_t access[4];
234 uint8_t pdinfo[6];
235 /* FIXME: Finder info ! */
236 char finder_info[32];
238 char *lname;
239 char *sname;
241};
242
244 /* FIXME: keep state across calls here (OPENED/CLOSED) */
245 uint8_t state;
246 uint8_t flags;
247 uint16_t attr;
248 uint16_t sig;
249 uint32_t cdate, bdate, mdate;
250 uint16_t vid;
251 uint32_t bfree, btotal, bsize;
252 char *name;
254};
255
256void afp_volume_unpack(struct afp_volume_parms *parms, unsigned char *b,
257 uint16_t rbitmap);
258
259void afp_filedir_unpack(struct afp_filedir_parms *filedir, unsigned char *b,
260 uint16_t rfbitmap, uint16_t rdbitmap);
261int afp_filedir_pack(unsigned char *b, struct afp_filedir_parms *filedir,
262 uint16_t rfbitmap, uint16_t rdbitmap);
263
264/*
265 afpclient.c
266*/
267int OpenClientSocket(char *host, int port);
268int CloseClientSocket(int fd);
269
270
271size_t my_dsi_stream_read(DSI *dsi, void *data, const size_t length);
272int my_dsi_stream_receive(DSI *dsi, void *buf, const size_t ilength,
273 size_t *rlength);
274size_t my_dsi_stream_write(DSI *dsi, void *data, const size_t length);
275int my_dsi_stream_send(DSI *dsi, void *buf, size_t length);
276uint16_t my_dsi_cmd_nwriterply_async(CONN *conn, uint64_t n);
277void dump_header(DSI *dsi);
278
279unsigned int DSIOpenSession(CONN *conn);
280unsigned int DSIGetStatus(CONN *conn);
281unsigned int DSICloseSession(CONN *conn);
282
283unsigned int AFPopenLogin(CONN *conn, char *vers, char *uam, char *usr,
284 char *pwd);
285unsigned int AFPopenLoginExt(CONN *conn, char *vers, char *uam, char *usr,
286 char *pwd);
287unsigned int AFPLogOut(CONN *conn);
288unsigned int AFPChangePW(CONN *conn, char *uam, char *usr, char *opwd,
289 char *pwd);
290
291unsigned int AFPzzz(CONN *conn, int);
292
293unsigned int AFPGetSrvrInfo(CONN *conn);
294unsigned int AFPGetSrvrParms(CONN *conn);
295unsigned int AFPGetSrvrMsg(CONN *conn, uint16_t type, uint16_t bitmap);
296
297unsigned int AFPCloseVol(CONN *conn, uint16_t vol);
298unsigned int AFPCloseDT(CONN *conn, uint16_t vol);
299
300unsigned int AFPByteLock(CONN *conn, uint16_t fork, int end, int mode,
301 int offset, int size);
302unsigned int AFPByteLock_ext(CONN *conn, uint16_t fork, int end, int mode,
303 off_t offset, off_t size);
304unsigned int AFPCloseFork(CONN *conn, uint16_t fork);
305unsigned int AFPFlush(CONN *conn, uint16_t vol);
306unsigned int AFPFlushFork(CONN *conn, uint16_t fork);
307unsigned int AFPDelete(CONN *conn, uint16_t vol, int did, char *name);
308
309unsigned int AFPGetComment(CONN *conn, uint16_t vol, int did, char *name);
310unsigned int AFPRemoveComment(CONN *conn, uint16_t vol, int did, char *name);
311unsigned int AFPAddComment(CONN *conn, uint16_t vol, int did, char *name,
312 char *cmt);
313
314uint16_t AFPOpenVol(CONN *conn, char *vol, uint16_t bitmap);
315uint16_t AFPOpenFork(CONN *conn, uint16_t vol, char type, uint16_t bitmap,
316 int did, char *name, uint16_t access);
317
318unsigned int AFPGetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap);
319unsigned int AFPSetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap,
320 struct afp_volume_parms *parms);
321
322unsigned int AFPCreateFile(CONN *conn, uint16_t vol, char type, int did,
323 char *name);
324unsigned int AFPCreateDir(CONN *conn, uint16_t vol, int did, char *name);
325
326unsigned int AFPWriteHeader(DSI *dsi, uint16_t fork, int offset, int size,
327 char *data, char whence);
328unsigned int AFPWriteFooter(DSI *dsi, uint16_t fork, int offset, int size,
329 char *data, char whence);
330unsigned int AFPWrite(CONN *conn, uint16_t fork, int offset, int size,
331 char *data, char whence);
332unsigned int AFPWrite_ext(CONN *conn, uint16_t fork, off_t offset, off_t size,
333 char *data, char whence);
334unsigned int AFPWrite_ext_async(CONN *conn, uint16_t fork, off_t offset,
335 off_t size, char *data, char whence);
336
337unsigned int AFPReadHeader(DSI *dsi, uint16_t fork, int offset, int size,
338 char *data);
339unsigned int AFPReadFooter(DSI *dsi, uint16_t fork, int offset, int size,
340 char *data);
341unsigned int AFPRead(CONN *conn, uint16_t fork, int offset, int size,
342 char *data);
343unsigned int AFPRead_ext(CONN *conn, uint16_t fork, off_t offset, off_t size,
344 char *data);
345unsigned int AFPRead_ext_async(CONN *conn, uint16_t fork, off_t offset,
346 off_t size, char *data);
347
348unsigned int AFPGetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap);
349
350unsigned int AFPGetSessionToken(CONN *conn, int type, uint32_t time, int len,
351 char *token);
352unsigned int AFPDisconnectOldSession(CONN *conn, uint16_t type, int len,
353 char *token);
354
355unsigned int AFPMapID(CONN *conn, char fn, int id);
356unsigned int AFPMapName(CONN *conn, char fn, char *name);
357
358unsigned int AFPAddAPPL(CONN *conn, uint16_t dt, int did, char *creator,
359 uint32_t tag, char *name);
360unsigned int AFPGetAPPL(CONN *conn, uint16_t dt, char *name, uint16_t index,
361 uint16_t f_bitmap);
362unsigned int AFPRemoveAPPL(CONN *conn, uint16_t dt, int did, char *creator,
363 char *name);
364
365unsigned int AFPGetUserInfo(CONN *conn, char flag, int id, uint16_t bitmap);
366unsigned int AFPBadPacket(CONN *conn, char fn, char *name);
367
368unsigned int AFPCatSearch(CONN *conn, uint16_t vol, uint32_t nbe, char *pos,
369 uint16_t f_bitmap, uint16_t d_bitmap,
370 uint32_t rbitmap, struct afp_filedir_parms *filedir,
371 struct afp_filedir_parms *filedir2);
372
373unsigned int AFPCatSearchExt(CONN *conn, uint16_t vol, uint32_t nbe, char *pos,
374 uint16_t f_bitmap, uint16_t d_bitmap,
375 uint32_t rbitmap, struct afp_filedir_parms *filedir,
376 struct afp_filedir_parms *filedir2);
377
378unsigned int AFPSetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap,
379 off_t size);
380
381unsigned int AFPGetACL(CONN *conn, uint16_t vol, int did, uint16_t bitmap,
382 char *name);
383unsigned int AFPListExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap,
384 int maxsize, char *pathname);
385unsigned int AFPGetExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap,
386 int maxsize, char *pathname, char *attrname);
387unsigned int AFPSetExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap,
388 char *pathname, char *attrname, char *data);
389unsigned int AFPRemoveExtAttr(CONN *conn, uint16_t vol, int did,
390 uint16_t bitmap, char *pathname, char *attrname);
391
392int FPset_name(CONN *conn, int ofs, char *name);
393void u2mac(uint8_t *dst, char *name, int len);
394
395char *strp2cdup(unsigned char *src);
396
397#endif
398
399/* ---------------------------------
400*/
CONN * Conn2
Definition afparg.c:57
char * vers
Definition afparg.c:53
char * uam
Definition afparg.c:54
static DSI * dsi
Definition afparg.c:39
CONN * Conn
Definition afparg.c:40
unsigned int AFPGetAPPL(CONN *conn, uint16_t dt, char *name, uint16_t index, uint16_t f_bitmap)
Definition afpclient.c:2182
int my_dsi_data_receive(DSI *x)
Definition afpclient.c:325
unsigned int AFPRemoveAPPL(CONN *conn, uint16_t dt, int did, char *creator, char *name)
Definition afpclient.c:2240
unsigned int AFPCloseFork(CONN *conn, uint16_t fork)
Definition afpclient.c:731
unsigned int AFPFlush(CONN *conn, uint16_t vol)
Definition afpclient.c:853
unsigned int AFPByteLock_ext(CONN *conn, uint16_t fork, int end, int mode, off_t offset, off_t size)
Definition afpclient.c:807
unsigned int AFPWriteFooter(DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence)
Definition afpclient.c:1628
unsigned int DSIGetStatus(CONN *conn)
Definition afpclient.c:439
unsigned int AFPopenLoginExt(CONN *conn, char *vers, char *uam, char *usr, char *pwd)
Definition afpclient.c:521
unsigned int DSIOpenSession(CONN *conn)
Definition afpclient.c:399
unsigned int AFPSetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap, struct afp_volume_parms *parms)
Definition afpclient.c:1497
unsigned int AFPGetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap)
Definition afpclient.c:2159
unsigned int DSICloseSession(CONN *conn)
Definition afpclient.c:457
unsigned int AFPByteLock(CONN *conn, uint16_t fork, int end, int mode, int offset, int size)
Definition afpclient.c:741
unsigned int AFPGetSrvrInfo(CONN *conn)
Definition afpclient.c:669
unsigned int AFPSetExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *pathname, char *attrname, char *data)
Definition afpclient.c:2482
unsigned int AFPAddAPPL(CONN *conn, uint16_t dt, int did, char *creator, uint32_t tag, char *name)
Definition afpclient.c:2212
unsigned int AFPGetSrvrMsg(CONN *conn, uint16_t type, uint16_t bitmap)
Definition afpclient.c:689
uint16_t my_dsi_cmd_nwriterply_async(CONN *conn, uint64_t n)
unsigned int AFPCloseVol(CONN *conn, uint16_t vol)
Definition afpclient.c:711
uint16_t AFPOpenFork(CONN *conn, uint16_t vol, char type, uint16_t bitmap, int did, char *name, uint16_t access)
Definition afpclient.c:1739
unsigned int AFPGetComment(CONN *conn, uint16_t vol, int did, char *name)
Definition afpclient.c:1784
void afp_filedir_unpack(struct afp_filedir_parms *filedir, unsigned char *b, uint16_t rfbitmap, uint16_t rdbitmap)
Definition afpclient.c:1135
int OpenClientSocket(char *host, int port)
Definition afpclient.c:20
unsigned int AFPCatSearch(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 afpclient.c:2266
unsigned int AFPMapName(CONN *conn, char fn, char *name)
Definition afpclient.c:1939
uint16_t AFPOpenVol(CONN *conn, char *vol, uint16_t bitmap)
Definition afpclient.c:873
unsigned int AFPMapID(CONN *conn, char fn, int id)
Definition afpclient.c:1918
unsigned int AFPCreateDir(CONN *conn, uint16_t vol, int did, char *name)
Definition afpclient.c:2127
unsigned int AFPWriteHeader(DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence)
Definition afpclient.c:1597
unsigned int AFPCatSearchExt(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 afpclient.c:2314
unsigned int AFPChangePW(CONN *conn, char *uam, char *usr, char *opwd, char *pwd)
Definition afpclient.c:592
unsigned int AFPGetSrvrParms(CONN *conn)
Definition afpclient.c:679
unsigned int AFPWrite_ext_async(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data, char whence)
Definition afpclient.c:1711
int my_dsi_stream_send(DSI *dsi, void *buf, size_t length)
Definition afpclient.c:183
size_t my_dsi_stream_write(DSI *dsi, void *data, const size_t length)
Definition afpclient.c:152
unsigned int AFPListExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, int maxsize, char *pathname)
Definition afpclient.c:2448
unsigned int AFPBadPacket(CONN *conn, char fn, char *name)
Definition afpclient.c:1977
unsigned int AFPRead(CONN *conn, uint16_t fork, int offset, int size, char *data)
Definition afpclient.c:2045
unsigned int AFPGetExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, int maxsize, char *pathname, char *attrname)
Definition afpclient.c:2394
void afp_volume_unpack(struct afp_volume_parms *parms, unsigned char *b, uint16_t rbitmap)
Definition afpclient.c:981
int afp_filedir_pack(unsigned char *b, struct afp_filedir_parms *filedir, uint16_t rfbitmap, uint16_t rdbitmap)
Definition afpclient.c:1309
unsigned int AFPReadHeader(DSI *dsi, uint16_t fork, int offset, int size, char *data)
Definition afpclient.c:2000
char * strp2cdup(unsigned char *src)
Definition afpclient.c:952
unsigned int AFPFlushFork(CONN *conn, uint16_t fork)
Definition afpclient.c:863
unsigned int AFPRead_ext(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data)
Definition afpclient.c:2057
void dump_header(DSI *dsi)
Definition afpcmd.c:489
void u2mac(uint8_t *dst, char *name, int len)
Definition afpclient.c:1524
unsigned int AFPDelete(CONN *conn, uint16_t vol, int did, char *name)
Definition afpclient.c:1778
unsigned int AFPDisconnectOldSession(CONN *conn, uint16_t type, int len, char *token)
Definition afpclient.c:1867
unsigned int AFPGetACL(CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *name)
Definition afpclient.c:2365
unsigned int AFPSetForkParam(CONN *conn, uint16_t fork, uint16_t bitmap, off_t size)
Definition afpclient.c:828
size_t my_dsi_stream_read(DSI *dsi, void *data, const size_t length)
Definition afpclient.c:76
int FPset_name(CONN *conn, int ofs, char *name)
Definition afpclient.c:1544
unsigned int AFPzzz(CONN *conn, int)
Definition afpclient.c:649
unsigned int AFPReadFooter(DSI *dsi, uint16_t fork, int offset, int size, char *data)
Definition afpclient.c:2025
unsigned int AFPGetUserInfo(CONN *conn, char flag, int id, uint16_t bitmap)
Definition afpclient.c:1894
int my_dsi_stream_receive(DSI *dsi, void *buf, const size_t ilength, size_t *rlength)
Definition afpclient.c:132
unsigned int AFPCreateFile(CONN *conn, uint16_t vol, char type, int did, char *name)
Definition afpclient.c:1574
unsigned int AFPCloseDT(CONN *conn, uint16_t vol)
Definition afpclient.c:721
unsigned int AFPRead_ext_async(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data)
Definition afpclient.c:2107
unsigned int AFPGetVolParam(CONN *conn, uint16_t vol, uint16_t bitmap)
Definition afpclient.c:1475
unsigned int AFPLogOut(CONN *conn)
Definition afpclient.c:638
unsigned int AFPWrite_ext(CONN *conn, uint16_t fork, off_t offset, off_t size, char *data, char whence)
Definition afpclient.c:1664
unsigned int AFPRemoveComment(CONN *conn, uint16_t vol, int did, char *name)
Definition afpclient.c:1790
unsigned int AFPWrite(CONN *conn, uint16_t fork, int offset, int size, char *data, char whence)
Definition afpclient.c:1654
unsigned int AFPRemoveExtAttr(CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *pathname, char *attrname)
Definition afpclient.c:2532
unsigned int AFPAddComment(CONN *conn, uint16_t vol, int did, char *name, char *cmt)
Definition afpclient.c:1796
int CloseClientSocket(int fd)
Definition afpclient.c:69
unsigned int AFPGetSessionToken(CONN *conn, int type, uint32_t time, int len, char *token)
Definition afpclient.c:1829
int my_dsi_cmd_receive(DSI *x)
Definition afpclient.c:319
unsigned int AFPopenLogin(CONN *conn, char *vers, char *uam, char *usr, char *pwd)
Definition afpclient.c:474
static char buf[MAXPATHLEN+1]
Definition afppasswd.c:75
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
static unsigned char port
Definition pap.c:504
Definition asp.h:43
Definition afpclient.h:190
int afp_version
Definition afpclient.h:196
int type
Definition afpclient.h:195
DSI dsi
Definition afpclient.h:191
Definition include/atalk/dsi.h:58
Definition afpclient.h:219
uint16_t offcnt
Definition afpclient.h:230
int isdir
Definition afpclient.h:220
uint16_t attr
Definition afpclient.h:222
int name_type
Definition afpclient.h:237
uint32_t cdate
Definition afpclient.h:226
uint32_t rflen
Definition afpclient.h:227
char * sname
Definition afpclient.h:239
uint32_t mdate
Definition afpclient.h:226
uint32_t gid
Definition afpclient.h:231
char * utf8_name
Definition afpclient.h:240
char finder_info[32]
Definition afpclient.h:236
uint32_t bdate
Definition afpclient.h:226
uint16_t vid
Definition afpclient.h:223
uint8_t pdinfo[6]
Definition afpclient.h:234
uint64_t ext_dflen
Definition afpclient.h:228
uint64_t ext_rflen
Definition afpclient.h:229
uint32_t did
Definition afpclient.h:225
uint32_t uid
Definition afpclient.h:231
uint32_t dflen
Definition afpclient.h:227
char * lname
Definition afpclient.h:238
uint32_t pdid
Definition afpclient.h:224
uint32_t unix_priv
Definition afpclient.h:232
uint16_t bitmap
Definition afpclient.h:221
uint8_t access[4]
Definition afpclient.h:233
Definition afpclient.h:243
uint8_t flags
Definition afpclient.h:246
uint16_t vid
Definition afpclient.h:250
uint8_t state
Definition afpclient.h:245
uint32_t mdate
Definition afpclient.h:249
uint16_t attr
Definition afpclient.h:247
uint32_t btotal
Definition afpclient.h:251
uint32_t cdate
Definition afpclient.h:249
uint32_t bdate
Definition afpclient.h:249
char * utf8_name
Definition afpclient.h:253
char * name
Definition afpclient.h:252
uint32_t bfree
Definition afpclient.h:251
uint16_t sig
Definition afpclient.h:248
uint32_t bsize
Definition afpclient.h:251
Definition include/atalk/volume.h:30
DSI (Data Stream Interface) protocol definitions modified for the afptest test-suite.