Home | History | Annotate | Download | only in racoon

Lines Matching defs:spidx

69 getsp(spidx)
70 struct policyindex *spidx;
75 if (!cmpspidxstrict(spidx, &p->spidx))
90 getsp_r(spidx)
91 struct policyindex *spidx;
97 if (!cmpspidxstrict(spidx, &p->spidx))
100 if (!found && !cmpspidxwild(spidx, &p->spidx))
108 getsp_r(spidx, iph2)
109 struct policyindex *spidx;
117 if (spidx->src.ss_family != spidx->dst.ss_family) {
120 spidx->src.ss_family,
121 spidx->dst.ss_family);
124 switch (spidx->src.ss_family) {
135 "invalid family: %d\n", spidx->src.ss_family);
143 saddr2str((struct sockaddr *)&spidx->src));
145 if (cmpsaddr(iph2->src, (struct sockaddr *) &spidx->src) != CMPSADDR_MATCH ||
146 spidx->prefs != prefixlen)
152 saddr2str((struct sockaddr *)&spidx->dst));
154 if (cmpsaddr(iph2->dst, (struct sockaddr *) &spidx->dst) != CMPSADDR_MATCH ||
155 spidx->prefd != prefixlen)
161 if (!cmpspidx_wild(spidx, &p->spidx))
329 struct policyindex spidx;
334 memcpy(&spidx, spidx0, sizeof(spidx));
335 switch (spidx.dir) {
340 src = spidx.src;
341 dst = spidx.dst;
342 prefs = spidx.prefs;
343 prefd = spidx.prefd;
346 src = spidx.dst;
347 dst = spidx.src;
348 prefs = spidx.prefd;
349 prefd = spidx.prefs;
355 spidx.src = src;
356 spidx.dst = dst;
357 spidx.prefs = prefs;
358 spidx.prefd = prefd;
359 spidx.dir = IPSEC_DIR_INBOUND;
361 sp = getsp(&spidx);
368 spidx.dir = IPSEC_DIR_FWD;
370 sp = getsp(&spidx);
377 spidx.src = dst;
378 spidx.dst = src;
379 spidx.prefs = prefd;
380 spidx.prefd = prefs;
381 spidx.dir = IPSEC_DIR_OUTBOUND;
383 sp = getsp(&spidx);
398 if (new->spidx.priority < p->spidx.priority) {
448 spidx2str(spidx)
449 const struct policyindex *spidx;
459 a = saddr2str((const struct sockaddr *)&spidx->src);
466 i = snprintf(p, blen, "%s/%d[%s ", a, spidx->prefs, b);
472 a = saddr2str((const struct sockaddr *)&spidx->dst);
479 i = snprintf(p, blen, "%s/%d[%s ", a, spidx->prefd, b);
486 s_proto(spidx->ul_proto), s_direction(spidx->dir));
489 if (spidx->sec_ctx.ctx_strlen) {
493 spidx->sec_ctx.ctx_doi, spidx->sec_ctx.ctx_alg,
494 spidx->sec_ctx.ctx_strlen, spidx->sec_ctx.ctx_str);