1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/* pack */
int unpack(uchar *b, uchar *p, uchar *e, char *f, ...);
int vunpack(uchar *b, uchar *p, uchar *e, char *f, va_list a);
int pack(uchar *b, uchar *p, uchar *e, char *f, ...);
int vpack(uchar *b, uchar *p, uchar *e, char *f, va_list a);
/* error */
int smbmkerror(void);
int doserror(int err);
/* util */
void logit(char *fmt, ...);
#pragma varargck argpos logit 1
char *getremote(char *dir);
char *conspath(char *base, char *name);
int splitpath(char *path, char **base, char **name);
void dumphex(char *s, uchar *h, uchar *e);
void todatetime(long time, int *pdate, int *ptime);
long fromdatetime(int date, int time);
vlong tofiletime(long time);
long fromfiletime(vlong filetime);
int filesize32(vlong);
vlong allocsize(vlong size, int blocksize);
int extfileattr(Dir *d);
int dosfileattr(Dir *d);
ulong namehash(char *s);
char *strtr(char *s, Rune (*tr)(Rune));
char *strchrs(char *s, char *c);
int smbstrpack8(uchar *, uchar *p, uchar *e, void *arg);
int smbstrpack16(uchar *b, uchar *p, uchar *e, void *arg);
int smbstrunpack8(uchar *, uchar *p, uchar *e, void *arg);
int smbstrunpack16(uchar *b, uchar *p, uchar *e, void *arg);
int smbnamepack8(uchar *b, uchar *p, uchar *e, void *arg);
int smbnamepack16(uchar *b, uchar *p, uchar *e, void *arg);
int smbnameunpack8(uchar *b, uchar *p, uchar *e, void *arg);
int smbnameunpack16(uchar *b, uchar *p, uchar *e, void *arg);
int smbuntermstrpack8(uchar *b, uchar *p, uchar *e, void *arg);
int smbuntermstrpack16(uchar *b, uchar *p, uchar *e, void *arg);
int smbuntermnamepack8(uchar *b, uchar *p, uchar *e, void *arg);
int smbuntermnamepack16(uchar *b, uchar *p, uchar *e, void *arg);
/* smb */
void smbcmd(Req *r, int cmd, uchar *h, uchar *p, uchar *e);
/* share */
Share *mapshare(char *path);
/* rap */
void transrap(Trans *t);
/* tree */
Tree *connecttree(char *service, char *path, int *perr);
int disconnecttree(int tid);
void logoff(void);
Tree *gettree(int tid);
int newfid(Tree *t, File *f);
void delfid(Tree *t, int fid);
File *getfile(int tid, int fid, Tree **ptree, int *perr);
char *getpath(int tid, char *name, Tree **ptree, int *perr);
int newsid(Tree *t, Find *f);
void delsid(Tree *t, int sid);
Find *getfind(int tid, int sid, Tree **ptree, int *perr);
/* file */
File* createfile(char *path, int (*namecmp)(char *, char *),
int dacc, int sacc, int cdisp, int copt, vlong csize, int fattr, int *pact, Dir **pdir, int *perr);
Dir* statfile(File *f);
void putfile(File *f);
int lockfile(File *f);
void deletefile(File *f, int delete);
int deletedfile(File *f);
/* find */
Find *openfind(char *path, int (*namecmp)(char *, char *),
int attr, int withdot, int *perr);
int matchattr(Dir *d, int s);
int readfind(Find *f, int i, Dir **dp);
void putfind(Find *f);
/* dir */
int xdirread(char **path, int (*namecmp)(char *, char *), Dir **d);
Dir *xdirstat(char **path, int (*namecmp)(char *, char *));
void xdirflush(char *path, int (*namecmp)(char *, char *));
/* idmap */
void unixidmap(Share *share);
char* unixname(Share *share, int id, int group);
int unixuid(Share *share, char *name);
int unixgid(Share *share, char *name);
|