Changes in v9fs broke pipesrv. Fix it.
[npfs.git] / libnpauth / npaimpl.h
blob68bd5c68879c3ac4552b17744e974c7dae87759a
2 enum {
3 AuthTreq = 1, AuthChal, AuthPass, AuthOK, AuthErr, AuthMod,
4 AuthTs = 64, AuthTc, AuthAs, AuthAc, AuthTp, AuthHr,
5 };
7 struct DES_ks;
9 struct ticketreq {
10 char type;
11 char *ids;
12 char *dom;
13 char *ch;
14 char *idc;
15 char *idr;
18 struct ticket {
19 char type;
20 char *ch;
21 char *idc;
22 char *idr;
23 char *key;
26 struct auth {
27 char type;
28 char *ch;
29 int gen;
32 void setKey(unsigned char *key, struct DES_ks *sched);
33 int _encrypt(unsigned char *buf, int n, char *key);
34 int _decrypt(unsigned char *buf, int n, char *key);
35 void getRand(char *buf, int sz);
37 int decTicketReq(char *buf, struct ticketreq *r);
38 int encTicketReq(char *buf, struct ticketreq *r);
39 int decTicket(char *buf, struct ticket *r, char *key);
40 int encTicket(char *buf, struct ticket *r, char *key);
41 int decAuth(char *buf, struct auth *r, char *key);
42 int encAuth(char *buf, struct auth *r, char *key);
44 int get(Npcfid *fid, char *buf, int sz);
45 int getline0(Npcfid *fid, char *buf, int sz);
46 int put(Npcfid *fid, char *buf, int sz);
47 int putline0(Npcfid *fid, char *fmt, ...);
48 int err(char *msg, int no);
49 int getWord(char **buf, char sep, char **retbuf);