xform_ah.c (116925) | xform_ah.c (117058) |
---|---|
1/* $FreeBSD: head/sys/netipsec/xform_ah.c 116925 2003-06-27 20:10:03Z sam $ */ | 1/* $FreeBSD: head/sys/netipsec/xform_ah.c 117058 2003-06-30 05:09:32Z sam $ */ |
2/* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ 3/* 4 * The authors of this code are John Ioannidis (ji@tla.org), 5 * Angelos D. Keromytis (kermit@csd.uch.gr) and 6 * Niels Provos (provos@physnet.uni-hamburg.de). 7 * 8 * The original version of this code was written by John Ioannidis 9 * for BSD/OS in Athens, Greece, in November 1995. --- 672 unchanged lines hidden (view full) --- 682 free(tc, M_XDATA); 683 crypto_freereq(crp); 684 return error; 685 } 686 } 687 688 /* Crypto operation descriptor. */ 689 crp->crp_ilen = m->m_pkthdr.len; /* Total input length. */ | 2/* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ 3/* 4 * The authors of this code are John Ioannidis (ji@tla.org), 5 * Angelos D. Keromytis (kermit@csd.uch.gr) and 6 * Niels Provos (provos@physnet.uni-hamburg.de). 7 * 8 * The original version of this code was written by John Ioannidis 9 * for BSD/OS in Athens, Greece, in November 1995. --- 672 unchanged lines hidden (view full) --- 682 free(tc, M_XDATA); 683 crypto_freereq(crp); 684 return error; 685 } 686 } 687 688 /* Crypto operation descriptor. */ 689 crp->crp_ilen = m->m_pkthdr.len; /* Total input length. */ |
690 crp->crp_flags = CRYPTO_F_IMBUF; 691 /* 692 * When using crypto support the operates "synchronously" (e.g. 693 * software crypto) mark the operation for immediate callback to 694 * avoid the context switch. This increases the amount of kernel 695 * stack required to process a frame but we assume there is enough 696 * to do this. 697 */ 698 if (CRYPTO_SESID2CAPS(sav->tdb_cryptoid) & CRYPTOCAP_F_SYNC) 699 crp->crp_flags |= CRYPTO_F_CBIMM; | 690 crp->crp_flags = CRYPTO_F_IMBUF | CRYPTO_F_CBIFSYNC; |
700 crp->crp_buf = (caddr_t) m; 701 crp->crp_callback = ah_input_cb; 702 crp->crp_sid = sav->tdb_cryptoid; 703 crp->crp_opaque = (caddr_t) tc; 704 705 /* These are passed as-is to the callback. */ 706 tc->tc_spi = sav->spi; 707 tc->tc_dst = sav->sah->saidx.dst; --- 386 unchanged lines hidden (view full) --- 1094 m = NULL; /* mbuf was free'd by ah_massage_headers. */ 1095 free(tc, M_XDATA); 1096 crypto_freereq(crp); 1097 goto bad; 1098 } 1099 1100 /* Crypto operation descriptor. */ 1101 crp->crp_ilen = m->m_pkthdr.len; /* Total input length. */ | 691 crp->crp_buf = (caddr_t) m; 692 crp->crp_callback = ah_input_cb; 693 crp->crp_sid = sav->tdb_cryptoid; 694 crp->crp_opaque = (caddr_t) tc; 695 696 /* These are passed as-is to the callback. */ 697 tc->tc_spi = sav->spi; 698 tc->tc_dst = sav->sah->saidx.dst; --- 386 unchanged lines hidden (view full) --- 1085 m = NULL; /* mbuf was free'd by ah_massage_headers. */ 1086 free(tc, M_XDATA); 1087 crypto_freereq(crp); 1088 goto bad; 1089 } 1090 1091 /* Crypto operation descriptor. */ 1092 crp->crp_ilen = m->m_pkthdr.len; /* Total input length. */ |
1102 crp->crp_flags = CRYPTO_F_IMBUF; 1103 /* 1104 * When using crypto support the operates "synchronously" (e.g. 1105 * software crypto) mark the operation for immediate callback to 1106 * avoid the context switch. This increases the amount of kernel 1107 * stack required to process a frame but we assume there is enough 1108 * to do this. 1109 */ 1110 if (CRYPTO_SESID2CAPS(sav->tdb_cryptoid) & CRYPTOCAP_F_SYNC) 1111 crp->crp_flags |= CRYPTO_F_CBIMM; | 1093 crp->crp_flags = CRYPTO_F_IMBUF | CRYPTO_F_CBIFSYNC; |
1112 crp->crp_buf = (caddr_t) m; 1113 crp->crp_callback = ah_output_cb; 1114 crp->crp_sid = sav->tdb_cryptoid; 1115 crp->crp_opaque = (caddr_t) tc; 1116 1117 /* These are passed as-is to the callback. */ 1118 tc->tc_isr = isr; 1119 tc->tc_spi = sav->spi; --- 108 unchanged lines hidden --- | 1094 crp->crp_buf = (caddr_t) m; 1095 crp->crp_callback = ah_output_cb; 1096 crp->crp_sid = sav->tdb_cryptoid; 1097 crp->crp_opaque = (caddr_t) tc; 1098 1099 /* These are passed as-is to the callback. */ 1100 tc->tc_isr = isr; 1101 tc->tc_spi = sav->spi; --- 108 unchanged lines hidden --- |