Sigrid Solveig Haflínudóttirauth.h: clean upcd42cad4 years agoHistory
51 lines · 1.0 KB · C
RawDownload
/* * Interface for typical callers. */ typedef struct	AuthInfo	AuthInfo;typedef struct	AuthRpc		AuthRpc; enum{	ARok = 0,			/* rpc return values */	ARdone,	ARerror,	ARneedkey,	ARbadkey,	ARwritenext,	ARtoosmall,	ARtoobig,	ARrpcfailure,	ARphase, 	AuthRpcMax = 4096}; struct AuthRpc{	int afd;	char ibuf[AuthRpcMax+1];	char obuf[AuthRpcMax];	char *arg;	uint narg;}; struct AuthInfo{	char	*cuid;		/* caller id */	char	*suid;		/* server id */	char	*cap;		/* capability (only valid on server side) */	int	nsecret;	/* length of secret */	uchar	*secret;	/* secret */}; typedef int AuthGetkey(char*); extern AuthInfo*	fauth_proxy(FFid*, AuthRpc *rpc, AuthGetkey *getkey, char *params);extern AuthInfo*	auth_proxy(FFid*, AuthGetkey *getkey, char *fmt, ...);extern int		auth_getkey(char*);extern void		auth_freeAI(AuthInfo *ai);extern AuthInfo*	auth_getinfo(AuthRpc *rpc);extern AuthRpc*		auth_allocrpc(int afd);extern void		auth_freerpc(AuthRpc *rpc);extern uint		auth_rpc(AuthRpc *rpc, char *verb, void *a, int n);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t