and on similar events. Reseed the generator on the interval timer.
- * $Id: admin.c,v 1.1 2001/02/03 20:26:37 mdw Exp $
+ * $Id: admin.c,v 1.2 2001/02/03 22:40:29 mdw Exp $
*
* Admin interface for configuration
*
*
* Admin interface for configuration
*
/*----- Revision history --------------------------------------------------*
*
* $Log: admin.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: admin.c,v $
+ * 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.
*
* Revision 1.1 2001/02/03 20:26:37 mdw
* Initial checkin.
*
{
admin *a = v;
T( trace(T_ADMIN, "admin: %u resolved", a->seq); )
{
admin *a = v;
T( trace(T_ADMIN, "admin: %u resolved", a->seq); )
sel_rmtimer(&a->t);
if (!h)
a_write(a, "ERR couldn't resolve hostname `%s'\n", a->paddr);
sel_rmtimer(&a->t);
if (!h)
a_write(a, "ERR couldn't resolve hostname `%s'\n", a->paddr);
if (!p) {
a_destroy(a);
return;
if (!p) {
a_destroy(a);
return;
- * $Id: peer.c,v 1.1 2001/02/03 20:26:37 mdw Exp $
+ * $Id: peer.c,v 1.2 2001/02/03 22:40:29 mdw Exp $
*
* Communication with the peer
*
*
* Communication with the peer
*
/*----- Revision history --------------------------------------------------*
*
* $Log: peer.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: peer.c,v $
+ * 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.
*
* Revision 1.1 2001/02/03 20:26:37 mdw
* Initial checkin.
*
/* --- Read the data --- */
/* --- Read the data --- */
sz = sizeof(addr);
n = recvfrom(fd, buf_i, sizeof(buf_i), 0, &a.sa, &sz);
if (n < 0) {
sz = sizeof(addr);
n = recvfrom(fd, buf_i, sizeof(buf_i), 0, &a.sa, &sz);
if (n < 0) {
/* --- Find the appropriate peer --- */
assert(a.sa.sa_family == AF_INET);
/* --- Find the appropriate peer --- */
assert(a.sa.sa_family == AF_INET);
- T( trace(T_PEER, "packet from %s:%u",
- inet_ntoa(a.sin.sin_addr), (unsigned)ntohs(a.sin.sin_port)); )
for (p = peers; p; p = p->next) {
for (p = peers; p; p = p->next) {
- T( trace(T_PEER, "trying %s:%u",
- inet_ntoa(p->peer.sin.sin_addr), (unsigned)ntohs(p->peer.sin.sin_port)); )
if (p->peer.sin.sin_addr.s_addr == a.sin.sin_addr.s_addr &&
p->peer.sin.sin_port == a.sin.sin_port)
goto found;
if (p->peer.sin.sin_addr.s_addr == a.sin.sin_addr.s_addr &&
p->peer.sin.sin_port == a.sin.sin_port)
goto found;
void p_tun(peer *p, buf *b)
{
buf *bb = p_txstart(p, MSG_PACKET);
void p_tun(peer *p, buf *b)
{
buf *bb = p_txstart(p, MSG_PACKET);
if (ks_encrypt(&p->ks, b, bb))
kx_start(&p->kx);
if (BCUR(bb) > BBASE(bb))
if (ks_encrypt(&p->ks, b, bb))
kx_start(&p->kx);
if (BCUR(bb) > BBASE(bb))
- * $Id: tripe.h,v 1.1 2001/02/03 20:26:37 mdw Exp $
+ * $Id: tripe.h,v 1.2 2001/02/03 22:40:29 mdw Exp $
*
* Main header file for TrIPE
*
*
* Main header file for TrIPE
*
/*----- Revision history --------------------------------------------------*
*
* $Log: tripe.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: tripe.h,v $
+ * 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.
*
* Revision 1.1 2001/02/03 20:26:37 mdw
* Initial checkin.
*
extern unsigned tr_flags; /* Trace options flags */
#endif
extern unsigned tr_flags; /* Trace options flags */
#endif
+/*----- Other macros ------------------------------------------------------*/
+
+#define TIMER noise_timer(RAND_GLOBAL)
+
/*----- Key management ----------------------------------------------------*/
/* --- @km_interval@ --- *
/*----- Key management ----------------------------------------------------*/
/* --- @km_interval@ --- *