Lines Matching refs:crp
539 struct cryptop *crp; in ah_input() local
609 crp = crypto_getreq(cryptoid, M_NOWAIT); in ah_input()
610 if (crp == NULL) { in ah_input()
618 crp->crp_payload_start = 0; in ah_input()
619 crp->crp_payload_length = m->m_pkthdr.len; in ah_input()
620 crp->crp_digest_start = skip + rplen; in ah_input()
628 crypto_freereq(crp); in ah_input()
652 crypto_freereq(crp); in ah_input()
658 crp->crp_op = CRYPTO_OP_COMPUTE_DIGEST; in ah_input()
659 crp->crp_flags = CRYPTO_F_CBIFSYNC; in ah_input()
660 crypto_use_mbuf(crp, m); in ah_input()
661 crp->crp_callback = ah_input_cb; in ah_input()
662 crp->crp_opaque = xd; in ah_input()
667 memcpy(crp->crp_esn, &seqh, sizeof(seqh)); in ah_input()
678 return (crypto_dispatch_async(crp, CRYPTO_ASYNC_ORDERED)); in ah_input()
680 return (crypto_dispatch(crp)); in ah_input()
691 ah_input_cb(struct cryptop *crp) in ah_input_cb() argument
706 m = crp->crp_buf.cb_mbuf; in ah_input_cb()
707 xd = crp->crp_opaque; in ah_input_cb()
720 if (crp->crp_etype) { in ah_input_cb()
721 if (crp->crp_etype == EAGAIN) { in ah_input_cb()
723 if (ipsec_updateid(sav, &crp->crp_session, &cryptoid) != 0) in ah_input_cb()
725 xd->cryptoid = crp->crp_session; in ah_input_cb()
727 return (crypto_dispatch(crp)); in ah_input_cb()
730 DPRINTF(("%s: crypto error %d\n", __func__, crp->crp_etype)); in ah_input_cb()
731 error = crp->crp_etype; in ah_input_cb()
735 crypto_freereq(crp); /* No longer needed. */ in ah_input_cb()
736 crp = NULL; in ah_input_cb()
833 if (crp != NULL) in ah_input_cb()
834 crypto_freereq(crp); in ah_input_cb()
849 struct cryptop *crp; in ah_output() local
976 crp = crypto_getreq(cryptoid, M_NOWAIT); in ah_output()
977 if (crp == NULL) { in ah_output()
985 crp->crp_payload_start = 0; in ah_output()
986 crp->crp_payload_length = m->m_pkthdr.len; in ah_output()
987 crp->crp_digest_start = skip + rplen; in ah_output()
993 crypto_freereq(crp); in ah_output()
1045 crypto_freereq(crp); in ah_output()
1050 crp->crp_op = CRYPTO_OP_COMPUTE_DIGEST; in ah_output()
1051 crp->crp_flags = CRYPTO_F_CBIFSYNC; in ah_output()
1052 crypto_use_mbuf(crp, m); in ah_output()
1053 crp->crp_callback = ah_output_cb; in ah_output()
1054 crp->crp_opaque = xd; in ah_output()
1059 memcpy(crp->crp_esn, &seqh, sizeof(seqh)); in ah_output()
1072 return (crypto_dispatch_async(crp, CRYPTO_ASYNC_ORDERED)); in ah_output()
1074 return (crypto_dispatch(crp)); in ah_output()
1087 ah_output_cb(struct cryptop *crp) in ah_output_cb() argument
1098 m = crp->crp_buf.cb_mbuf; in ah_output_cb()
1099 xd = (struct xform_data *) crp->crp_opaque; in ah_output_cb()
1109 if (crp->crp_etype) { in ah_output_cb()
1110 if (crp->crp_etype == EAGAIN) { in ah_output_cb()
1112 if (ipsec_updateid(sav, &crp->crp_session, &cryptoid) != 0) in ah_output_cb()
1114 xd->cryptoid = crp->crp_session; in ah_output_cb()
1116 return (crypto_dispatch(crp)); in ah_output_cb()
1119 DPRINTF(("%s: crypto error %d\n", __func__, crp->crp_etype)); in ah_output_cb()
1120 error = crp->crp_etype; in ah_output_cb()
1139 crypto_freereq(crp); in ah_output_cb()
1162 crypto_freereq(crp); in ah_output_cb()