Lines Matching defs:spidx
582 key_allocsp(spidx, dir)
583 struct secpolicyindex *spidx;
591 if (spidx == NULL)
606 kdebug_secpolicyindex(spidx));
612 kdebug_secpolicyindex(&sp->spidx));
616 if (key_cmpspidx_withmask(&sp->spidx, spidx))
631 KEY_CHKSPDIR(sp->spidx.dir, dir, "key_allocsp");
651 struct secpolicyindex spidx;
674 spidx = sp->spidx;
675 if (isrc->sa_len > sizeof(spidx.src) ||
676 idst->sa_len > sizeof(spidx.dst))
678 bcopy(isrc, &spidx.src, isrc->sa_len);
679 bcopy(idst, &spidx.dst, idst->sa_len);
680 if (!key_cmpspidx_withmask(&sp->spidx, &spidx))
1507 key_getsp(spidx)
1508 struct secpolicyindex *spidx;
1515 if (spidx == NULL)
1518 LIST_FOREACH(sp, &sptree[spidx->dir], chain) {
1521 if (key_cmpspidx_exactly(spidx, &sp->spidx)) {
1611 newsp->spidx.dir = xpl0->sadb_x_policy_dir;
1855 xpl->sadb_x_policy_dir = sp->spidx.dir;
1987 struct secpolicyindex spidx;
2031 &spidx);
2067 newsp = key_getsp(&spidx);
2099 &newsp->spidx);
2155 LIST_INSERT_TAIL(&sptree[newsp->spidx.dir], newsp, secpolicy, chain);
2159 LIST_FOREACH(tmpsp, &sptree[newsp->spidx.dir], chain)
2165 LIST_INSERT_TAIL(&sptree[newsp->spidx.dir], newsp, secpolicy, chain);
2176 if ((spacq = key_getspacq(&spidx)) != NULL) {
2284 struct secpolicyindex spidx;
2318 &spidx);
2332 if ((sp = key_getsp(&spidx)) == NULL) {
2554 if ((newspacq = key_getspacq(&sp->spidx)) != NULL) {
2566 if ((newspacq = key_newspacq(&sp->spidx)) == NULL) {
2748 (struct sockaddr *)&sp->spidx.src, sp->spidx.prefs,
2749 sp->spidx.ul_proto);
2755 (struct sockaddr *)&sp->spidx.dst, sp->spidx.prefd,
2756 sp->spidx.ul_proto);
2881 (struct sockaddr *)&sp->spidx.src,
2882 sp->spidx.prefs, sp->spidx.ul_proto);
2891 (struct sockaddr *)&sp->spidx.dst,
2892 sp->spidx.prefd, sp->spidx.ul_proto);
4467 /* if spidx.ul_proto == IPSEC_ULPROTO_ANY, ignore. */
5527 /* set spidx if there */
5752 /* set spidx if there */
6593 m = key_setsadbxpolicy(sp->policy, sp->spidx.dir, sp->id);
6758 key_newspacq(spidx)
6759 struct secpolicyindex *spidx;
6778 bcopy(spidx, &acq->spidx, sizeof(acq->spidx));
6787 key_getspacq(spidx)
6788 struct secpolicyindex *spidx;
6795 if (key_cmpspidx_exactly(spidx, &acq->spidx))