5 #define CHAR(x) f->x = *p++
6 #define SHORT(x) f->x = (p[0] | (p[1]<<8)); p += 2
7 #define VLONG(q) q = (p[0] | (p[1]<<8) | (p[2]<<16) | (p[3]<<24)); p += 4
8 #define LONG(x) VLONG(f->x)
9 #define STRING(x,n) memmove(f->x, p, n); p += n
12 convM2T(char *ap, int n, Ticket *f, Authkey *key)
14 uchar *p, buf[TICKETLEN];
16 memset(f, 0, sizeof(Ticket));
21 memmove(buf, ap, TICKETLEN);
23 decrypt(key->des, ap, TICKETLEN);
27 STRING(chal, CHALLEN);
28 STRING(cuid, ANAMELEN);
29 f->cuid[ANAMELEN-1] = 0;
30 STRING(suid, ANAMELEN);
31 f->suid[ANAMELEN-1] = 0;
32 STRING(key, DESKEYLEN);