Lines Matching refs:uh
4785 struct udphdr *uh; in pf_nat64_ipv4() local
4788 uh = (struct udphdr *)pbuf_contig_segment(pbuf, hlen, in pf_nat64_ipv4()
4789 sizeof(*uh)); in pf_nat64_ipv4()
4790 if (uh == NULL) { in pf_nat64_ipv4()
4794 if (uh->uh_sum == 0) { in pf_nat64_ipv4()
4795 uh->uh_sum = pbuf_inet6_cksum(pbuf, IPPROTO_UDP, in pf_nat64_ipv4()
4821 struct udphdr *uh = pd->hdr.udp; in pf_test_rule() local
4858 sxport.port = uh->uh_sport; in pf_test_rule()
4859 dxport.port = uh->uh_dport; in pf_test_rule()
4860 hdrlen = sizeof(*uh); in pf_test_rule()
4967 &uh->uh_sport, pd->ip_sum, in pf_test_rule()
4968 &uh->uh_sum, &pd->naddr, in pf_test_rule()
4970 sxport.port = uh->uh_sport; in pf_test_rule()
4976 (uh->uh_dport != nxport.port))) { in pf_test_rule()
4980 dport = uh->uh_dport; in pf_test_rule()
4983 &uh->uh_dport, pd->ip_sum, in pf_test_rule()
4984 &uh->uh_sum, &pd->ndaddr, in pf_test_rule()
4986 dxport.port = uh->uh_dport; in pf_test_rule()
5645 size_t plen = pbuf->pb_packet_len - off - sizeof(*uh); in pf_test_rule()
5647 if (ntohs(uh->uh_sport) == PF_IKE_PORT && in pf_test_rule()
5648 ntohs(uh->uh_dport) == PF_IKE_PORT && in pf_test_rule()
5653 pbuf_copy_data(pbuf, off + sizeof(*uh), plen, in pf_test_rule()
5912 ntohs(uh->uh_sport) == PF_IKE_PORT && in pf_test_rule()
5913 ntohs(uh->uh_dport) == PF_IKE_PORT) { in pf_test_rule()
7487 struct udphdr *uh = pd->hdr.udp; in pf_test_state_udp() local
7511 key.ext_gwy.xport.port = uh->uh_sport; in pf_test_state_udp()
7512 key.gwy.xport.port = uh->uh_dport; in pf_test_state_udp()
7516 key.lan.xport.port = uh->uh_sport; in pf_test_state_udp()
7517 key.ext_lan.xport.port = uh->uh_dport; in pf_test_state_udp()
7519 if (ntohs(uh->uh_sport) == PF_IKE_PORT && in pf_test_state_udp()
7520 ntohs(uh->uh_dport) == PF_IKE_PORT) { in pf_test_state_udp()
7522 size_t plen = pbuf->pb_packet_len - off - sizeof(*uh); in pf_test_state_udp()
7532 pbuf_copy_data(pbuf, off + sizeof(*uh), plen, &ike); in pf_test_state_udp()
7627 sk->app_state->handler(*state, direction, off + uh->uh_ulen, in pf_test_state_udp()
7638 if (pf_lazy_makewritable(pd, pbuf, off + sizeof(*uh)) == NULL) { in pf_test_state_udp()
7646 pf_change_ap(direction, pd->mp, pd->src, &uh->uh_sport, in pf_test_state_udp()
7647 pd->ip_sum, &uh->uh_sum, &sk->gwy.addr, in pf_test_state_udp()
7653 &uh->uh_dport, pd->ip_sum, in pf_test_state_udp()
7654 &uh->uh_sum, &sk->lan.addr, in pf_test_state_udp()
7659 &uh->uh_sport, pd->ip_sum, in pf_test_state_udp()
7660 &uh->uh_sum, &sk->ext_lan.addr, in pf_test_state_udp()
7661 uh->uh_sport, 1, pd->af, in pf_test_state_udp()
7665 &uh->uh_dport, pd->ip_sum, in pf_test_state_udp()
7666 &uh->uh_sum, &sk->ext_gwy.addr, in pf_test_state_udp()
7667 uh->uh_dport, 1, pd->af, in pf_test_state_udp()
7671 &uh->uh_sport, pd->ip_sum, in pf_test_state_udp()
7672 &uh->uh_sum, &sk->gwy.addr, in pf_test_state_udp()
7678 &uh->uh_dport, pd->ip_sum, in pf_test_state_udp()
7679 &uh->uh_sum, &sk->lan.addr, in pf_test_state_udp()
7685 pbuf_copy_back(pbuf, off, sizeof(*uh), uh); in pf_test_state_udp()
8182 struct udphdr uh; in pf_test_state_icmp() local
8184 if (!pf_pull_hdr(pbuf, off2, &uh, sizeof(uh), in pf_test_state_icmp()
8195 key.ext_gwy.xport.port = uh.uh_dport; in pf_test_state_icmp()
8196 key.gwy.xport.port = uh.uh_sport; in pf_test_state_icmp()
8201 key.lan.xport.port = uh.uh_dport; in pf_test_state_icmp()
8202 key.ext_lan.xport.port = uh.uh_sport; in pf_test_state_icmp()
8208 if (ntohs(uh.uh_sport) == PF_IKE_PORT && in pf_test_state_icmp()
8209 ntohs(uh.uh_dport) == PF_IKE_PORT) { in pf_test_state_icmp()
8212 sizeof(uh); in pf_test_state_icmp()
8224 pbuf_copy_data(pbuf, off + sizeof(uh), plen, in pf_test_state_icmp()
8317 &uh.uh_sport, pd2.ip_sum, in pf_test_state_icmp()
8318 &uh.uh_sum, &daddr2->addr, in pf_test_state_icmp()
8323 &uh.uh_dport, pd2.ip_sum, in pf_test_state_icmp()
8324 &uh.uh_sum, &saddr2->addr, in pf_test_state_icmp()
8329 sizeof(uh), &uh); in pf_test_state_icmp()
8348 pf_change_icmp(pd2.src, &uh.uh_sport, in pf_test_state_icmp()
8350 sk->lan.xport.port, &uh.uh_sum, in pf_test_state_icmp()
8354 pf_change_icmp(pd2.dst, &uh.uh_dport, in pf_test_state_icmp()
8356 sk->gwy.xport.port, &uh.uh_sum, in pf_test_state_icmp()
8361 off2 + sizeof(uh)) == NULL) { in pf_test_state_icmp()
8381 pbuf_copy_back(pbuf, off2, sizeof(uh), &uh); in pf_test_state_icmp()
9722 struct udphdr uh; in pf_test() local
9724 pd.hdr.udp = &uh; in pf_test()
9725 if (!pf_pull_hdr(pbuf, off, &uh, sizeof(uh), in pf_test()
9730 if (uh.uh_sport == 0 || uh.uh_dport == 0) { in pf_test()
9735 if (ntohs(uh.uh_ulen) > pbuf->pb_packet_len - off || in pf_test()
9736 ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { in pf_test()
10378 struct udphdr uh; in pf_test6() local
10380 pd.hdr.udp = &uh; in pf_test6()
10381 if (!pf_pull_hdr(pbuf, off, &uh, sizeof(uh), in pf_test6()
10386 if (uh.uh_sport == 0 || uh.uh_dport == 0) { in pf_test6()
10391 if (ntohs(uh.uh_ulen) > pbuf->pb_packet_len - off || in pf_test6()
10392 ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { in pf_test6()