Lines Matching refs:sp
344 * sp (src ptr) is always my side, and dp (dst ptr) is always remote side.
345 * length of mask (sm and dm) is assumed to be same as sp/dp.
349 encap_attach(af, proto, sp, sm, dp, dm, psw, arg)
352 const struct sockaddr *sp, *sm;
361 if (sp->sa_len > sizeof(ep->src) || dp->sa_len > sizeof(ep->dst)) {
365 if (sp->sa_len != dp->sa_len) {
369 if (af != sp->sa_family || af != dp->sa_family) {
380 if (ep->src.ss_len != sp->sa_len ||
381 bcmp(&ep->src, sp, sp->sa_len) != 0 ||
382 bcmp(&ep->srcmask, sm, sp->sa_len) != 0)
402 bcopy(sp, &ep->src, sp->sa_len);
403 bcopy(sm, &ep->srcmask, sp->sa_len);
476 mask_match(ep, sp, dp)
478 const struct sockaddr *sp;
488 if (sp->sa_len > sizeof(s) || dp->sa_len > sizeof(d))
490 if (sp->sa_family != ep->af || dp->sa_family != ep->af)
492 if (sp->sa_len != ep->src.ss_len || dp->sa_len != ep->dst.ss_len)
497 p = (const u_int8_t *)sp;
500 for (i = 0 ; i < sp->sa_len; i++) {
516 s.ss_len = sp->sa_len;
517 s.ss_family = sp->sa_family;