Lines Matching defs:saddr
2349 const struct pf_addr *saddr, const struct pf_addr *daddr,
2442 h->ip_src.s_addr = saddr->v4.s_addr;
2455 memcpy(&h6->ip6_src, &saddr->v6, sizeof (struct in6_addr));
2873 struct pf_addr *rmask, struct pf_addr *saddr, sa_family_t af)
2879 ((rmask->addr32[0] ^ 0xffffffff) & saddr->addr32[0]);
2884 ((rmask->addr32[0] ^ 0xffffffff) & saddr->addr32[0]);
2886 ((rmask->addr32[1] ^ 0xffffffff) & saddr->addr32[1]);
2888 ((rmask->addr32[2] ^ 0xffffffff) & saddr->addr32[2]);
2890 ((rmask->addr32[3] ^ 0xffffffff) & saddr->addr32[3]);
2985 pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
2998 PF_ACPY(&k.addr, saddr, af);
3057 PF_POOLMASK(naddr, raddr, rmask, saddr, af);
3099 pf_hash(saddr, (struct pf_addr *)(void *)&hash,
3169 struct pf_addr *saddr, union pf_state_xport *sxport, struct pf_addr *daddr,
3183 if (pf_map_addr(af, r, saddr, naddr, &init_addr, sn))
3217 if (PF_ANEQ(&sk->lan.addr, saddr, af))
3244 if (!(PF_AEQ(&sk->lan.addr, saddr, af)))
3321 if (pf_map_addr(af, r, saddr, naddr, &init_addr, sn))
3337 int direction, struct pfi_kif *kif, struct pf_addr *saddr,
3381 else if (xsrc && PF_MISMATCHAW(xsrc, saddr, pd->af, 0, NULL))
3383 else if (!xsrc && PF_MISMATCHAW(&src->addr, saddr, pd->af,
3435 struct pf_addr *saddr, union pf_state_xport *sxport, struct pf_addr *daddr,
3442 r = pf_match_translation(pd, m, off, direction, kif, saddr,
3446 saddr, sxport, daddr, dxport, PF_RULESET_RDR);
3449 saddr, sxport, daddr, dxport, PF_RULESET_NAT);
3451 r = pf_match_translation(pd, m, off, direction, kif, saddr,
3455 saddr, sxport, daddr, dxport, PF_RULESET_BINAT);
3465 if (pf_get_sport(pd, kif, r, saddr, sxport, daddr,
3491 saddr, AF_INET);
3504 saddr, AF_INET6);
3512 saddr, pd->af);
3596 if (pf_map_addr(pd->af, r, saddr,
3642 struct pf_addr *saddr, *daddr;
3672 saddr = pd->src;
3680 saddr = pd->dst;
3686 inp = in_pcblookup_hash_exists(pi, saddr->v4, sport, daddr->v4, dport,
3694 memcpy(&s6.s6_addr32[3], &saddr->v4,
3695 sizeof (saddr->v4));
3705 inp = in_pcblookup_hash_exists(pi, saddr->v4, sport,
3718 inp = in_pcblookup_hash_exists(pi, saddr->v4, sport,
3729 inp = in6_pcblookup_hash_exists(pi, &saddr->v6, sport, &daddr->v6,
3732 inp = in6_pcblookup_hash_exists(pi, &saddr->v6, sport,
3884 pf_set_rt_ifp(struct pf_state *s, struct pf_addr *saddr)
3894 pf_map_addr(AF_INET, r, saddr, &s->rt_addr, NULL,
3901 pf_map_addr(AF_INET6, r, saddr, &s->rt_addr, NULL,
4010 struct pf_addr *saddr = pd->src, *daddr = pd->dst;
4106 saddr, &sxport, daddr, &dxport, &pd->naddr, &nxport)) !=
4108 PF_ACPY(&pd->baddr, saddr, af);
4111 pf_change_ap(direction, pd->mp, saddr,
4118 pf_change_ap(direction, pd->mp, saddr,
4128 pf_change_a(&saddr->v4.s_addr, pd->ip_sum,
4141 pf_change_a6(saddr, &pd->hdr.icmp6->icmp6_cksum,
4151 pf_change_a(&saddr->v4.s_addr,
4157 PF_ACPY(saddr, &pd->naddr, AF_INET6);
4168 pf_change_a(&saddr->v4.s_addr,
4174 PF_ACPY(saddr, &pd->naddr, AF_INET6);
4183 pf_change_a(&saddr->v4.s_addr,
4189 PF_ACPY(saddr, &pd->naddr, af);
4204 saddr, &sxport, daddr, &dxport, &pd->naddr, &nxport)) !=
4310 else if (PF_MISMATCHAW(&r->src.addr, saddr, af,
4426 pf_change_ap(direction, pd->mp, saddr,
4434 pf_change_ap(direction, pd->mp, saddr,
4448 PF_ACPY(&pd->baddr, saddr, af);
4453 pf_change_a(&saddr->v4.s_addr,
4460 PF_ACPY(saddr, &pd->baddr,
4467 PF_ACPY(&pd->baddr, saddr, af);
4471 pf_change_a(&saddr->v4.s_addr,
4478 PF_ACPY(saddr, &pd->baddr,
4487 pf_change_a(&saddr->v4.s_addr,
4492 PF_ACPY(saddr, &pd->baddr, af);
4644 PF_ACPY(&psk.gwy.addr, saddr, af);
4676 PF_ACPY(&psk.ext.addr, saddr, af);
4751 PF_ACPY(&sk0.gwy.addr, saddr, sk0.af);
4771 pf_insert_src_node(&sn, r, saddr, af) != 0) {
4780 (pf_insert_src_node(&nsn, nr, saddr, af) != 0))) {
4927 pf_set_rt_ifp(s, saddr); /* needs s->state_key set */
5011 pf_change_ap(direction, pd->mp, saddr,
5027 mss = pf_calc_mss(saddr, af, mss);
5030 pf_send_tcp(r, af, daddr, saddr, th->th_dport,
5096 struct pf_addr *saddr = pd->src, *daddr = pd->dst;
5177 else if (PF_MISMATCHAW(&r->src.addr, saddr, af,
5291 dnflow.fwa_id.src_ip = ntohl(saddr->v4.s_addr);
5296 dnflow.fwa_id.src_ip6 = saddr->v6;
5297 dnflow.fwa_id.dst_ip6 = saddr->v6;
6462 struct pf_addr *saddr = pd->src, *daddr = pd->dst;
6532 pf_change_a(&saddr->v4.s_addr,
6551 pf_change_a6(saddr,
6796 saddr, &(*state)->state_key->gwy.addr,
6918 saddr, &(*state)->state_key->gwy.addr,
6988 saddr, &(*state)->state_key->gwy.addr,
7042 saddr, &(*state)->state_key->gwy.addr,
7088 saddr, &(*state)->state_key->gwy.addr,