/* -*-c-*-
*
- * $Id: tripe.h,v 1.1 2001/02/03 20:26:37 mdw Exp $
+ * $Id: tripe.h,v 1.4 2001/02/05 19:56:37 mdw Exp $
*
* Main header file for TrIPE
*
/*----- Revision history --------------------------------------------------*
*
* $Log: tripe.h,v $
+ * Revision 1.4 2001/02/05 19:56:37 mdw
+ * Sequence number protection, and BSD tunnels.
+ *
+ * Revision 1.3 2001/02/04 01:17:55 mdw
+ * Create a configuration header file to tidy up command lines.
+ *
+ * Revision 1.2 2001/02/03 22:40:29 mdw
+ * Put timer information into the entropy pool when packets are received
+ * and on similar events. Reseed the generator on the interval timer.
+ *
* Revision 1.1 2001/02/03 20:26:37 mdw
* Initial checkin.
*
/*----- Header files ------------------------------------------------------*/
+#include "config.h"
+
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#endif
gcipher *c; /* Keyset cipher for encryption */
gmac *m; /* Keyset MAC for integrity */
+ uint32 oseq; /* Outbound sequence number */
+ uint32 iseq, iwin; /* Inbound sequence number */
} keyset;
+#define KS_SEQWINSZ 32 /* Bits in sequence number window */
+
/* --- Key exchange --- *
*
* TrIPE uses the Wrestlers Protocol for its key exchange. The Wrestlers
#if TUN_TYPE == TUN_UNET
sel_file f; /* Selector for Usernet device */
struct peer *p; /* Pointer to my peer */
+#elif TUN_TYPE == TUN_BSD
+ sel_file f; /* Selector for tunnel device */
+ struct peer *p; /* Pointer to my peer */
+ unsigned n; /* Number of my tunnel device */
#else
# error "No support for this tunnel type"
#endif
extern unsigned tr_flags; /* Trace options flags */
#endif
+/*----- Other macros ------------------------------------------------------*/
+
+#define TIMER noise_timer(RAND_GLOBAL)
+
/*----- Key management ----------------------------------------------------*/
/* --- @km_interval@ --- *