Lines Matching defs:req

1340 ipsec_prot_from_req(const ipsec_req_t *req, ipsec_prot_t *ipp)
1347 ipp->ipp_use_ah = !!(req->ipsr_ah_req & IPSEC_PREF_REQUIRED);
1348 ipp->ipp_use_esp = !!(req->ipsr_esp_req & IPSEC_PREF_REQUIRED);
1349 ipp->ipp_use_espa = !!(req->ipsr_esp_auth_alg);
1350 ipp->ipp_use_se = !!(req->ipsr_self_encap_req & IPSEC_PREF_REQUIRED);
1351 ipp->ipp_use_unique = !!((req->ipsr_ah_req|req->ipsr_esp_req) &
1353 ipp->ipp_encr_alg = req->ipsr_esp_alg;
1360 ipp->ipp_auth_alg = (req->ipsr_auth_alg != SADB_AALG_ANY) ?
1361 req->ipsr_auth_alg : 0;
1362 ipp->ipp_esp_auth_alg = (req->ipsr_esp_auth_alg != SADB_AALG_ANY) ?
1363 req->ipsr_esp_auth_alg : 0;
1370 ipsec_actvec_from_req(const ipsec_req_t *req, ipsec_act_t **actp, uint_t *nactp,
1376 if ((req->ipsr_ah_req & IPSEC_PREF_NEVER) &&
1377 (req->ipsr_esp_req & IPSEC_PREF_NEVER)) {
1381 ipsec_prot_from_req(req, &act.ipa_apply);
1388 * We assume caller has already zero'ed *req for us.
1391 ipsec_req_from_prot(ipsec_prot_t *ipp, ipsec_req_t *req)
1393 req->ipsr_esp_alg = ipp->ipp_encr_alg;
1394 req->ipsr_auth_alg = ipp->ipp_auth_alg;
1395 req->ipsr_esp_auth_alg = ipp->ipp_esp_auth_alg;
1398 req->ipsr_ah_req |= IPSEC_PREF_UNIQUE;
1399 req->ipsr_esp_req |= IPSEC_PREF_UNIQUE;
1402 req->ipsr_self_encap_req |= IPSEC_PREF_REQUIRED;
1404 req->ipsr_ah_req |= IPSEC_PREF_REQUIRED;
1406 req->ipsr_esp_req |= IPSEC_PREF_REQUIRED;
1407 return (sizeof (*req));
1412 * We assume caller has already zero'ed *req for us.
1415 ipsec_req_from_act(ipsec_action_t *ap, ipsec_req_t *req)
1419 req->ipsr_ah_req = IPSEC_PREF_NEVER;
1420 req->ipsr_esp_req = IPSEC_PREF_NEVER;
1421 return (sizeof (*req));
1423 return (ipsec_req_from_prot(&ap->ipa_act.ipa_apply, req));
1425 return (sizeof (*req));
1430 * We assume caller has already zero'ed *req for us.
1433 ipsec_req_from_head(ipsec_policy_head_t *ph, ipsec_req_t *req, int af)
1444 return (ipsec_req_from_act(p->ipsp_act, req));
1446 return (sizeof (*req));
1455 ipsec_req_from_conn(conn_t *connp, ipsec_req_t *req, int af)
1460 bzero(req, sizeof (*req));
1473 req);
1478 connp->conn_latch_in_policy->ipsp_act, req);
1483 rv = ipsec_req_from_head(connp->conn_policy, req, af);