aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth/factotum/proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/auth/factotum/proto.c')
-rw-r--r--src/cmd/auth/factotum/proto.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/cmd/auth/factotum/proto.c b/src/cmd/auth/factotum/proto.c
new file mode 100644
index 00000000..a455bd0a
--- /dev/null
+++ b/src/cmd/auth/factotum/proto.c
@@ -0,0 +1,34 @@
+#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 mschap; /* chap.c */
+extern Proto p9any; /* p9any.c */
+extern Proto p9sk1; /* p9sk1.c */
+extern Proto p9sk2; /* p9sk2.c */
+extern Proto rsa; /* rsa.c */
+
+Proto *prototab[] = {
+ &apop,
+ &cram,
+ &dsa,
+ &p9any,
+ &p9sk1,
+ &p9sk2,
+ &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;
+}