Lines Matching refs:iph2
745 ipsecdoi_selectph2proposal(iph2) in ipsecdoi_selectph2proposal() argument
746 struct ph2handle *iph2; in ipsecdoi_selectph2proposal()
753 pair = get_proppair_and_doi_sit(iph2->sa, IPSECDOI_TYPE_PH2,
759 ret = get_ph2approval(iph2, pair);
766 iph2->sa_ret = get_sabyproppair(doitype, sittype, ret);
768 if (iph2->sa_ret == NULL)
782 ipsecdoi_checkph2proposal(iph2) in ipsecdoi_checkph2proposal() argument
783 struct ph2handle *iph2; in ipsecdoi_checkph2proposal()
793 spair = get_proppair_and_doi_sit(iph2->sa, IPSECDOI_TYPE_PH2,
804 rpair = get_proppair(iph2->sa_ret, IPSECDOI_TYPE_PH2);
854 p = get_ph2approval(iph2, rpair);
859 sa_ret = iph2->sa_ret;
860 iph2->sa_ret = get_sabyproppair(doitype, sittype, p);
862 if (iph2->sa_ret == NULL)
974 get_ph2approval(iph2, pair) in get_ph2approval() argument
975 struct ph2handle *iph2; in get_ph2approval()
981 iph2->approval = NULL;
994 ret = get_ph2approvalx(iph2, pair[i]);
1011 get_ph2approvalx(iph2, pp) in get_ph2approvalx() argument
1012 struct ph2handle *iph2; in get_ph2approvalx()
1024 for (q2 = iph2->proposal; q2; q2 = q2->next) {
1032 pr = cmpsaprop_alloc(iph2->ph1, q1, q2, iph2->side);
1048 iph2->approval = pr;
1502 ipsecdoi_updatespi(iph2) in ipsecdoi_updatespi() argument
1503 struct ph2handle *iph2; in ipsecdoi_updatespi()
1512 pair = get_proppair(iph2->sa_ret, IPSECDOI_TYPE_PH2);
1524 pp = iph2->approval;
2900 setph2proposal0(iph2, pp, pr) in setph2proposal0() argument
2901 const struct ph2handle *iph2; in setph2proposal0()
3016 if (alg_oakley_dhdef_ok(iph2->sainfo->pfs_group))
3080 if (alg_oakley_dhdef_ok(iph2->sainfo->pfs_group))
3082 iph2->sainfo->pfs_group);
3121 ipsecdoi_setph2proposal(iph2) in ipsecdoi_setph2proposal() argument
3122 struct ph2handle *iph2; in ipsecdoi_setph2proposal()
3131 proposal = iph2->proposal;
3133 iph2->sa = vmalloc(sizeof(*sab));
3134 if (iph2->sa == NULL) {
3141 sab = (struct ipsecdoi_sa_b *)iph2->sa->v;
3150 if (iph2->ph1->natt_flags & NAT_DETECTED) {
3151 int udp_diff = iph2->ph1->natt_options->mode_udp_diff;
3163 q = setph2proposal0(iph2, a, b);
3165 VPTRINIT(iph2->sa);
3169 iph2->sa = vrealloc(iph2->sa, iph2->sa->l + q->l);
3170 if (iph2->sa == NULL) {
3177 memcpy(iph2->sa->v + iph2->sa->l - q->l, q->v, q->l);
3179 prop = (struct isakmp_pl_p *)(iph2->sa->v +
3183 propoff = iph2->sa->l - q->l;
3928 ipsecdoi_setid2(iph2) in ipsecdoi_setid2() argument
3929 struct ph2handle *iph2; in ipsecdoi_setid2()
3934 sp = getspbyspid(iph2->spid);
3937 "no policy found for spid:%u.\n", iph2->spid);
3941 if (!ipsecdoi_transportmode(iph2->proposal))
3942 iph2->id = ipsecdoi_sockaddr2id((struct sockaddr *)&sp->spidx.src,
3944 else if (iph2->sa_src != NULL) {
3953 iph2->id = ipsecdoi_sockaddr2id(iph2->sa_src,
3957 iph2->id = ipsecdoi_sockaddr2id(iph2->src, IPSECDOI_PREFIX_HOST,
3960 if (iph2->id == NULL) {
3967 s_ipsecdoi_ident(((struct ipsecdoi_id_b *)iph2->id->v)->type));
3973 if (!ipsecdoi_transportmode(iph2->proposal))
3975 iph2->id_p = ipsecdoi_sockaddr2id((struct sockaddr *)&sp->spidx.dst,
3977 else if (iph2->sa_dst != NULL) {
3979 iph2->id_p = ipsecdoi_sockaddr2id(iph2->sa_dst,
3983 iph2->id_p = ipsecdoi_sockaddr2id(iph2->dst, IPSECDOI_PREFIX_HOST,
3986 if (iph2->id_p == NULL) {
3990 VPTRINIT(iph2->id);
3995 s_ipsecdoi_ident(((struct ipsecdoi_id_b *)iph2->id_p->v)->type));