1 typedef struct Fcall Fcall;
3 /* see /sys/include/auth.h */
6 DOMLEN= 48, /* length of an authentication domain name */
7 DESKEYLEN= 7, /* length of a des key for encrypt/decrypt */
8 CHALLEN= 8, /* length of a challenge */
9 NETCHLEN= 16, /* max network challenge length */
12 KEYDBLEN= NAMELEN+DESKEYLEN+4+2
14 #define TICKETLEN (CHALLEN+2*NAMELEN+DESKEYLEN+1)
15 #define AUTHENTLEN (CHALLEN+4+1)
26 unsigned short oldtag; /* T-Flush */
27 Qid qid; /* R-Attach, R-Walk, R-Open, R-Create */
28 char rauth[AUTHENTLEN]; /* Rattach */
32 char uname[NAMELEN]; /* T-Attach */
33 char aname[NAMELEN]; /* T-Attach */
34 char ticket[TICKETLEN]; /* T-Attach */
35 char auth[AUTHENTLEN];/* T-Attach */
39 char ename[ERRLEN]; /* R-Error */
40 char authid[NAMELEN]; /* R-session */
41 char authdom[DOMLEN]; /* R-session */
42 char chal[CHALLEN]; /* T-session/R-session */
46 long perm; /* T-Create */
47 short newfid; /* T-Clone, T-Clwalk */
48 char name[NAMELEN]; /* T-Walk, T-Clwalk, T-Create */
49 char mode; /* T-Create, T-Open */
53 long offset; /* T-Read, T-Write */
54 long count; /* T-Read, T-Write, R-Read */
55 char *data; /* T-Write, R-Read */
59 char stat[DIRLEN]; /* T-Wstat, R-Stat */
65 #define MAXMSG 160 /* max header sans data */
66 #define NOTAG 0xFFFF /* Dummy tag */
74 Tosession = 52, /* illegal */
75 Rosession, /* illegal */
76 Terror = 54, /* illegal */
80 Toattach = 58, /* illegal */
81 Roattach, /* illegal */
104 Tauth = 82, /* illegal */
112 int convM2S(char*, Fcall*, int);
113 int convS2M(Fcall*, char*);
115 int convM2D(char*, Dir*);
116 int convD2M(Dir*, char*);
118 char* getS(int, char*, Fcall*, long*);