add the 'ead' package (emergency access daemon),
[openwrt.git] / package / ead / src / tinysrp / tinysrp.h
diff --git a/package/ead/src/tinysrp/tinysrp.h b/package/ead/src/tinysrp/tinysrp.h
new file mode 100644 (file)
index 0000000..4420a19
--- /dev/null
@@ -0,0 +1,18 @@
+/* Simple API for the tinysrp library. */
+
+#ifndef T_PWD_H
+#define MAXUSERLEN      32
+#define SESSION_KEY_LEN 40      /* 320-bit session key */
+#endif
+
+typedef struct {
+       char username[MAXUSERLEN + 1];
+       unsigned char key[SESSION_KEY_LEN];
+} TSRP_SESSION;
+
+/* These functions are passed a connected socket, and return true for a
+successful authentication.  If tsrp is not NULL, the username and key
+fields are filled in. */
+
+extern int tsrp_server_authenticate(int s, TSRP_SESSION *tsrp);
+extern int tsrp_client_authenticate(int s, char *user, char *pass, TSRP_SESSION *tsrp);
This page took 0.024099 seconds and 4 git commands to generate.