/* -*-c-*-
*
- * $Id: peer.c,v 1.8 2003/05/16 12:09:03 mdw Exp $
+ * $Id: peer.c,v 1.11 2004/04/08 01:36:17 mdw Exp $
*
* Communication with the peer
*
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: peer.c,v $
- * Revision 1.8 2003/05/16 12:09:03 mdw
- * Allow binding to a chosen address.
- *
- * Revision 1.7 2003/04/15 14:12:05 mdw
- * Insert a newline to improve readability.
- *
- * Revision 1.6 2001/06/19 22:07:59 mdw
- * Use magic number for packet size.
- *
- * Revision 1.5 2001/03/03 11:15:19 mdw
- * Set the socket send and receive buffers to maximum. At least this way,
- * we won't drop large packets on the floor. If the administrator wants to
- * prevent fragmentation of TrIPE messages, he can lower the MTU on the
- * tunnel interface. Getting path-MTU stuff out of the kernel is too much
- * system-specific hard work for this program.
- *
- * Revision 1.4 2001/02/16 21:40:24 mdw
- * Change key exchange message interface. Maintain statistics.
- *
- * Revision 1.3 2001/02/04 17:10:58 mdw
- * Make file descriptors be nonblocking and close-on-exec.
- *
- * 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 "tripe.h"
return;
}
buf_init(&bb, buf_o, sizeof(buf_o));
- if (ksl_decrypt(&p->ks, &b, &bb)) {
+ if (ksl_decrypt(&p->ks, MSG_PACKET, &b, &bb)) {
p->st.n_reject++;
a_warn("couldn't decrypt inbound packet from `%s'", p->name);
return;
buf *bb = p_txstart(p, MSG_PACKET);
TIMER;
- if (ksl_encrypt(&p->ks, b, bb))
+ if (ksl_encrypt(&p->ks, MSG_PACKET, b, bb))
kx_start(&p->kx);
if (BOK(bb) && BLEN(bb)) {
p->st.n_ipout++;