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;
96 if (!cmpspidxwild(spidx, &p->spidx))
104 getsp_r(spidx, iph2)
105 struct policyindex *spidx;
113 if (spidx->src.ss_family != spidx->dst.ss_family) {
116 spidx->src.ss_family,
117 spidx->dst.ss_family);
120 switch (spidx->src.ss_family) {
131 "invalid family: %d\n", spidx->src.ss_family);
139 saddr2str((struct sockaddr *)&spidx->src));
140 if (cmpsaddrwop(iph2->src, (struct sockaddr *)&spidx->src)
141 || spidx->prefs != prefixlen)
147 saddr2str((struct sockaddr *)&spidx->dst));
148 if (cmpsaddrwop(iph2->dst, (struct sockaddr *)&spidx->dst)
149 || spidx->prefd != prefixlen)
155 if (!cmpspidx_wild(spidx, &p->spidx))
319 struct policyindex spidx;
324 memcpy(&spidx, spidx0, sizeof(spidx));
325 switch (spidx.dir) {
330 src = spidx.src;
331 dst = spidx.dst;
332 prefs = spidx.prefs;
333 prefd = spidx.prefd;
336 src = spidx.dst;
337 dst = spidx.src;
338 prefs = spidx.prefd;
339 prefd = spidx.prefs;
345 spidx.src = src;
346 spidx.dst = dst;
347 spidx.prefs = prefs;
348 spidx.prefd = prefd;
349 spidx.dir = IPSEC_DIR_INBOUND;
351 sp = getsp(&spidx);
358 spidx.dir = IPSEC_DIR_FWD;
360 sp = getsp(&spidx);
367 spidx.src = dst;
368 spidx.dst = src;
369 spidx.prefs = prefd;
370 spidx.prefd = prefs;
371 spidx.dir = IPSEC_DIR_OUTBOUND;
373 sp = getsp(&spidx);
388 if (new->spidx.priority < p->spidx.priority) {
438 spidx2str(spidx)
439 const struct policyindex *spidx;
449 a = saddr2str((const struct sockaddr *)&spidx->src);
456 i = snprintf(p, blen, "%s/%d[%s ", a, spidx->prefs, b);
462 a = saddr2str((const struct sockaddr *)&spidx->dst);
469 i = snprintf(p, blen, "%s/%d[%s ", a, spidx->prefd, b);
476 s_proto(spidx->ul_proto), s_direction(spidx->dir));
479 if (spidx->sec_ctx.ctx_strlen) {
483 spidx->sec_ctx.ctx_doi, spidx->sec_ctx.ctx_alg,
484 spidx->sec_ctx.ctx_strlen, spidx->sec_ctx.ctx_str);