aboutsummaryrefslogtreecommitdiff
path: root/challenge.h
diff options
context:
space:
mode:
Diffstat (limited to 'challenge.h')
-rw-r--r--challenge.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/challenge.h b/challenge.h
new file mode 100644
index 0000000..7bfd68c
--- /dev/null
+++ b/challenge.h
@@ -0,0 +1,18 @@
+#ifndef CHALLENGE_H
+#define CHALLENGE_H 1
+
+#include <stdint.h>
+
+/** challenge_t: This structure contains the pseudo-random challenge used for
+ * authentication.
+ */
+typedef struct challenge_t {
+ /** tv_sec as returned by gettimeofday */
+ uint32_t sec;
+ /** tv_usec as returned by gettimeofday + random value */
+ uint32_t usec_rnd;
+ /** random values */
+ uint32_t random[6];
+} __attribute__ ((packed)) challenge_t;
+
+#endif