aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth/factotum/proto.c
blob: daf90cddae204e6f04c2f39915044fa8a1586313 (plain)
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
#include "std.h"
#include "dat.h"

extern Proto	apop;		/* apop.c */
extern Proto	chap;		/* chap.c */
extern Proto	cram;		/* apop.c */
extern Proto	dsa;			/* dsa.c */
extern Proto	httpdigest;	/* httpdigest.c */
extern Proto	mschap;		/* chap.c */
extern Proto	p9any;		/* p9any.c */
extern Proto	p9sk1;		/* p9sk1.c */
extern Proto	p9sk2;		/* p9sk2.c */
extern Proto	pass;			/* pass.c */
extern Proto	rsa;			/* rsa.c */

Proto *prototab[] = {
	&apop,
	&cram,
	&dsa,
	&httpdigest,
	&p9any,
	&p9sk1,
	&p9sk2,
	&pass,
	&rsa,
	nil
};

Proto*
protolookup(char *name)
{
	int i;

	for(i=0; prototab[i]; i++)
		if(strcmp(prototab[i]->name, name) == 0)
			return prototab[i];
	return nil;
}