Home
last modified time | relevance | path

Searched refs:iph (Results 1 – 25 of 294) sorted by relevance

12345678910>>...12

/linux/net/xfrm/
A Dxfrm_inout.h11 const struct iphdr *iph = ip_hdr(skb); in xfrm4_extract_header() local
14 XFRM_MODE_SKB_CB(skb)->id = iph->id; in xfrm4_extract_header()
16 XFRM_MODE_SKB_CB(skb)->tos = iph->tos; in xfrm4_extract_header()
17 XFRM_MODE_SKB_CB(skb)->ttl = iph->ttl; in xfrm4_extract_header()
18 XFRM_MODE_SKB_CB(skb)->optlen = iph->ihl * 4 - sizeof(*iph); in xfrm4_extract_header()
26 struct ipv6hdr *iph = ipv6_hdr(skb); in xfrm6_extract_header() local
45 iph->version = 6; in xfrm6_beet_make_header()
48 sizeof(iph->flow_lbl)); in xfrm6_beet_make_header()
57 struct iphdr *iph = ip_hdr(skb); in xfrm4_beet_make_header() local
59 iph->ihl = 5; in xfrm4_beet_make_header()
[all …]
/linux/include/net/netfilter/
A Dnf_tables_ipv4.h21 struct iphdr *iph, _iph; in __nft_set_pktinfo_ipv4_validate() local
25 sizeof(*iph), &_iph); in __nft_set_pktinfo_ipv4_validate()
26 if (!iph) in __nft_set_pktinfo_ipv4_validate()
29 if (iph->ihl < 5 || iph->version != 4) in __nft_set_pktinfo_ipv4_validate()
32 len = ntohs(iph->tot_len); in __nft_set_pktinfo_ipv4_validate()
33 thoff = iph->ihl * 4; in __nft_set_pktinfo_ipv4_validate()
40 pkt->tprot = iph->protocol; in __nft_set_pktinfo_ipv4_validate()
55 struct iphdr *iph; in nft_set_pktinfo_ipv4_ingress() local
61 iph = ip_hdr(pkt->skb); in nft_set_pktinfo_ipv4_ingress()
62 if (iph->ihl < 5 || iph->version != 4) in nft_set_pktinfo_ipv4_ingress()
[all …]
A Dnf_queue.h49 static inline u32 hash_v4(const struct iphdr *iph, u32 initval) in hash_v4() argument
52 if ((__force u32)iph->saddr < (__force u32)iph->daddr) in hash_v4()
53 return jhash_3words((__force u32)iph->saddr, in hash_v4()
54 (__force u32)iph->daddr, iph->protocol, initval); in hash_v4()
56 return jhash_3words((__force u32)iph->daddr, in hash_v4()
57 (__force u32)iph->saddr, iph->protocol, initval); in hash_v4()
85 struct iphdr *iph, _iph; in hash_bridge() local
89 iph = skb_header_pointer(skb, skb_network_offset(skb), in hash_bridge()
90 sizeof(*iph), &_iph); in hash_bridge()
91 if (iph) in hash_bridge()
[all …]
/linux/net/netfilter/ipvs/
A Dip_vs_proto_ah_esp.c41 const struct ip_vs_iphdr *iph, in ah_esp_conn_fill_param_proto() argument
44 if (likely(!ip_vs_iph_inverse(iph))) in ah_esp_conn_fill_param_proto()
46 &iph->saddr, htons(PORT_ISAKMP), in ah_esp_conn_fill_param_proto()
50 &iph->daddr, htons(PORT_ISAKMP), in ah_esp_conn_fill_param_proto()
56 const struct ip_vs_iphdr *iph) in ah_esp_conn_in_get() argument
72 IP_VS_DBG_ADDR(af, &iph->saddr), in ah_esp_conn_in_get()
73 IP_VS_DBG_ADDR(af, &iph->daddr)); in ah_esp_conn_in_get()
82 const struct ip_vs_iphdr *iph) in ah_esp_conn_out_get() argument
94 IP_VS_DBG_ADDR(af, &iph->saddr), in ah_esp_conn_out_get()
95 IP_VS_DBG_ADDR(af, &iph->daddr)); in ah_esp_conn_out_get()
[all …]
A Dip_vs_core.c509 iph); in ip_vs_schedule()
835 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip_vs_nat_icmp_v6()
917 struct iphdr *iph; in ip_vs_out_icmp() local
934 iph = ip_hdr(skb); in ip_vs_out_icmp()
942 &iph->saddr, &iph->daddr); in ip_vs_out_icmp()
1437 if (ip_vs_has_real_service(ipvs, af, iph.protocol, &iph.saddr, in ip_vs_out_hook()
1450 iph.len)))) { in ip_vs_out_hook()
1614 &iph->saddr, &iph->daddr); in ip_vs_in_icmp()
1730 &iph->saddr); in ip_vs_in_icmp()
1843 &iph->saddr, &iph->daddr); in ip_vs_in_icmp_v6()
[all …]
/linux/tools/testing/selftests/bpf/progs/
A Dxdping_kern.c65 struct iphdr *iph; in icmp_check() local
73 iph = data + sizeof(*eth); in icmp_check()
78 if (bpf_ntohs(iph->tot_len) - sizeof(*iph) != ICMP_ECHO_LEN) in icmp_check()
97 struct iphdr *iph; in xdping_client() local
111 raddr = iph->saddr; in xdping_client()
139 iph->saddr = iph->daddr; in xdping_client()
140 iph->daddr = raddr; in xdping_client()
160 struct iphdr *iph; in xdping_server() local
171 raddr = iph->saddr; in xdping_server()
175 iph->saddr = iph->daddr; in xdping_server()
[all …]
A Dtest_xdp.c93 if (iph + 1 > data_end) in handle_ipv4()
96 dport = get_dport(iph + 1, data_end, iph->protocol); in handle_ipv4()
123 iph + 1 > data_end) in handle_ipv4()
128 iph->version = 4; in handle_ipv4()
129 iph->ihl = sizeof(*iph) >> 2; in handle_ipv4()
130 iph->frag_off = 0; in handle_ipv4()
132 iph->check = 0; in handle_ipv4()
133 iph->tos = 0; in handle_ipv4()
134 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); in handle_ipv4()
137 iph->ttl = 8; in handle_ipv4()
[all …]
A Dtest_xdp_loop.c89 if (iph + 1 > data_end) in handle_ipv4()
92 dport = get_dport(iph + 1, data_end, iph->protocol); in handle_ipv4()
119 iph + 1 > data_end) in handle_ipv4()
124 iph->version = 4; in handle_ipv4()
125 iph->ihl = sizeof(*iph) >> 2; in handle_ipv4()
126 iph->frag_off = 0; in handle_ipv4()
128 iph->check = 0; in handle_ipv4()
129 iph->tos = 0; in handle_ipv4()
130 iph->tot_len = bpf_htons(payload_len + sizeof(*iph)); in handle_ipv4()
133 iph->ttl = 8; in handle_ipv4()
[all …]
/linux/samples/bpf/
A Dxdp_tx_iptunnel_kern.c92 if (iph + 1 > data_end) in handle_ipv4()
95 dport = get_dport(iph + 1, data_end, iph->protocol); in handle_ipv4()
101 vip.daddr.v4 = iph->daddr; in handle_ipv4()
124 iph + 1 > data_end) in handle_ipv4()
129 iph->version = 4; in handle_ipv4()
130 iph->ihl = sizeof(*iph) >> 2; in handle_ipv4()
131 iph->frag_off = 0; in handle_ipv4()
133 iph->check = 0; in handle_ipv4()
134 iph->tos = 0; in handle_ipv4()
135 iph->tot_len = htons(payload_len + sizeof(*iph)); in handle_ipv4()
[all …]
A Dparse_varlen.c53 struct iphdr *iph; in parse_ipv4() local
56 iph = data + nh_off; in parse_ipv4()
57 if (iph + 1 > data_end) in parse_ipv4()
60 if (ip_is_fragment(iph)) in parse_ipv4()
62 ihl_len = iph->ihl * 4; in parse_ipv4()
66 if (iph + 1 > data_end) in parse_ipv4()
68 ihl_len += iph->ihl * 4; in parse_ipv4()
81 struct iphdr *iph; in parse_ipv6() local
93 if (iph + 1 > data_end) in parse_ipv6()
95 ihl_len += iph->ihl * 4; in parse_ipv6()
[all …]
A Dxdp_fwd_kern.c36 u32 check = (__force u32)iph->check; in ip_decrease_ttl()
40 return --iph->ttl; in ip_decrease_ttl()
50 struct iphdr *iph; in xdp_fwd_flags() local
63 iph = data + nh_off; in xdp_fwd_flags()
65 if (iph + 1 > data_end) in xdp_fwd_flags()
68 if (iph->ttl <= 1) in xdp_fwd_flags()
72 fib_params.tos = iph->tos; in xdp_fwd_flags()
73 fib_params.l4_protocol = iph->protocol; in xdp_fwd_flags()
77 fib_params.ipv4_src = iph->saddr; in xdp_fwd_flags()
78 fib_params.ipv4_dst = iph->daddr; in xdp_fwd_flags()
[all …]
/linux/net/ipv4/
A Dipip.c139 iph->daddr, iph->saddr, 0); in ipip_err()
182 if (t->parms.iph.daddr == 0) { in ipip_err()
218 const struct iphdr *iph; in ipip_tunnel_rcv() local
220 iph = ip_hdr(skb); in ipip_tunnel_rcv()
222 iph->saddr, iph->daddr, 0); in ipip_tunnel_rcv()
335 if (p->iph.version != 4 || in ipip_tunnel_ctl()
337 p->iph.ihl != 5 || (p->iph.frag_off & htons(~IP_DF))) in ipip_tunnel_ctl()
412 parms->iph.version = 4; in ipip_netlink_parms()
413 parms->iph.protocol = IPPROTO_IPIP; in ipip_netlink_parms()
414 parms->iph.ihl = 5; in ipip_netlink_parms()
[all …]
A Dip_input.c275 iph = ip_hdr(skb); in ip_rcv_options()
291 &iph->saddr, in ip_rcv_options()
325 err = ip_route_use_hint(skb, iph->daddr, iph->saddr, iph->tos, in ip_rcv_finish_core()
345 iph = ip_hdr(skb); in ip_rcv_finish_core()
354 err = ip_route_input_noref(skb, iph->daddr, iph->saddr, in ip_rcv_finish_core()
355 iph->tos, dev); in ip_rcv_finish_core()
458 iph = ip_hdr(skb); in ip_rcv_core()
471 if (iph->ihl < 5 || iph->version != 4) in ip_rcv_core()
484 iph = ip_hdr(skb); in ip_rcv_core()
486 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) in ip_rcv_core()
[all …]
A Dah4.c123 struct iphdr *iph; in ah_output_done() local
135 top_iph->tos = iph->tos; in ah_output_done()
136 top_iph->ttl = iph->ttl; in ah_output_done()
182 if (!iph) in ah_output()
194 iph->tos = top_iph->tos; in ah_output()
260 kfree(iph); in ah_output()
360 iph = ip_hdr(skb); in ah_input()
386 iph->ttl = 0; in ah_input()
387 iph->tos = 0; in ah_input()
388 iph->frag_off = 0; in ah_input()
[all …]
A Dxfrm4_input.c31 const struct iphdr *iph = ip_hdr(skb); in xfrm4_rcv_encap_finish() local
33 if (ip_route_input_noref(skb, iph->daddr, iph->saddr, in xfrm4_rcv_encap_finish()
34 iph->tos, skb->dev)) in xfrm4_rcv_encap_finish()
50 struct iphdr *iph = ip_hdr(skb); in xfrm4_transport_finish() local
56 return -iph->protocol; in xfrm4_transport_finish()
60 iph->tot_len = htons(skb->len); in xfrm4_transport_finish()
61 ip_send_check(iph); in xfrm4_transport_finish()
86 struct iphdr *iph; in xfrm4_udp_encap_rcv() local
145 iph = ip_hdr(skb); in xfrm4_udp_encap_rcv()
146 iphlen = iph->ihl << 2; in xfrm4_udp_encap_rcv()
[all …]
/linux/include/net/
A Dinet_ecn.h79 u32 ecn = (iph->tos + 1) & INET_ECN_MASK; in IP_ECN_set_ce()
100 iph->check = csum16_add(iph->check, check_add); in IP_ECN_set_ce()
101 iph->tos |= INET_ECN_CE; in IP_ECN_set_ce()
110 iph->check = csum16_add(iph->check, htons(0x1)); in IP_ECN_set_ect1()
111 iph->tos ^= INET_ECN_MASK; in IP_ECN_set_ect1()
117 iph->tos &= ~INET_ECN_MASK; in IP_ECN_clear()
138 if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph))) in IP6_ECN_set_ce()
141 from = *(__be32 *)iph; in IP6_ECN_set_ce()
143 *(__be32 *)iph = to; in IP6_ECN_set_ce()
157 from = *(__be32 *)iph; in IP6_ECN_set_ect1()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
A Dflow_dissector.c43 struct iphdr iph; member
49 struct iphdr iph; member
58 struct iphdr iph; member
64 struct ipv6hdr iph; member
70 struct ipv6hdr iph; member
112 .iph.ihl = 5,
154 .iph.ihl = 5,
198 .iph.ihl = 5,
224 .iph.ihl = 5,
338 .iph.ihl = 5,
[all …]
/linux/net/ipv6/
A Dsit.c568 iph->daddr, iph->saddr, sifindex); in ipip6_err()
687 iph->saddr, iph->daddr, sifindex); in ipip6_rcv()
719 &iph->saddr, iph->tos); in ipip6_rcv()
1112 iph = &tunnel->parms.iph; in ipip6_tunnel_bind_dev()
1117 iph->daddr, iph->saddr, in ipip6_tunnel_bind_dev()
1150 t->parms.iph.saddr = p->iph.saddr; in ipip6_tunnel_update()
1151 t->parms.iph.daddr = p->iph.daddr; in ipip6_tunnel_update()
1155 t->parms.iph.ttl = p->iph.ttl; in ipip6_tunnel_update()
1156 t->parms.iph.tos = p->iph.tos; in ipip6_tunnel_update()
1157 t->parms.iph.frag_off = p->iph.frag_off; in ipip6_tunnel_update()
[all …]
/linux/net/sched/
A Dact_nat.c106 struct iphdr *iph; in tcf_nat_act() local
136 iph = ip_hdr(skb); in tcf_nat_act()
139 addr = iph->saddr; in tcf_nat_act()
141 addr = iph->daddr; in tcf_nat_act()
151 iph = ip_hdr(skb); in tcf_nat_act()
153 iph->saddr = new_addr; in tcf_nat_act()
155 iph->daddr = new_addr; in tcf_nat_act()
163 ihl = iph->ihl * 4; in tcf_nat_act()
166 switch (iph->frag_off & htons(IP_OFFSET) ? 0 : iph->protocol) { in tcf_nat_act()
216 addr = iph->daddr; in tcf_nat_act()
[all …]
/linux/net/ipv6/netfilter/
A Dnft_fib_ipv6.c25 struct ipv6hdr *iph) in nft_fib6_flowi_init() argument
30 fl6->daddr = iph->daddr; in nft_fib6_flowi_init()
31 fl6->saddr = iph->saddr; in nft_fib6_flowi_init()
33 fl6->daddr = iph->saddr; in nft_fib6_flowi_init()
34 fl6->saddr = iph->daddr; in nft_fib6_flowi_init()
55 struct ipv6hdr *iph) in __nft_fib6_eval_type() argument
126 struct ipv6hdr *iph, _iph; in nft_fib6_eval_type() local
129 if (!iph) { in nft_fib6_eval_type()
134 *dest = __nft_fib6_eval_type(priv, pkt, iph); in nft_fib6_eval_type()
156 struct ipv6hdr *iph, _iph; in nft_fib6_eval() local
[all …]
/linux/net/netfilter/
A Dxt_iprange.c20 const struct iphdr *iph = ip_hdr(skb); in iprange_mt4() local
24 m = ntohl(iph->saddr) < ntohl(info->src_min.ip); in iprange_mt4()
25 m |= ntohl(iph->saddr) > ntohl(info->src_max.ip); in iprange_mt4()
29 &iph->saddr, in iprange_mt4()
37 m = ntohl(iph->daddr) < ntohl(info->dst_min.ip); in iprange_mt4()
38 m |= ntohl(iph->daddr) > ntohl(info->dst_max.ip); in iprange_mt4()
42 &iph->daddr, in iprange_mt4()
69 const struct ipv6hdr *iph = ipv6_hdr(skb); in iprange_mt6() local
73 m = iprange_ipv6_lt(&iph->saddr, &info->src_min.in6); in iprange_mt6()
78 &iph->saddr, in iprange_mt6()
[all …]
A Dnf_flow_table_ip.c85 addr = iph->saddr; in nf_flow_snat_ip()
87 iph->saddr = new_addr; in nf_flow_snat_ip()
90 addr = iph->daddr; in nf_flow_snat_ip()
92 iph->daddr = new_addr; in nf_flow_snat_ip()
108 addr = iph->daddr; in nf_flow_dnat_ip()
113 addr = iph->saddr; in nf_flow_dnat_ip()
125 struct iphdr *iph) in nf_flow_nat_ip() argument
174 struct iphdr *iph; in nf_flow_tuple_ip() local
199 if (iph->ttl <= 1) in nf_flow_tuple_ip()
340 struct iphdr *iph; in nf_flow_offload_ip_hook() local
[all …]
A Dxt_TPROXY.c39 const struct iphdr *iph = ip_hdr(skb); in tproxy_tg4() local
52 iph->saddr, iph->daddr, in tproxy_tg4()
68 iph->saddr, laddr, in tproxy_tg4()
79 iph->protocol, &iph->daddr, ntohs(hp->dest), in tproxy_tg4()
87 iph->protocol, &iph->saddr, ntohs(hp->source), in tproxy_tg4()
88 &iph->daddr, ntohs(hp->dest), skb->mark); in tproxy_tg4()
115 const struct ipv6hdr *iph = ipv6_hdr(skb); in tproxy_tg6_v1() local
141 &iph->saddr, &iph->daddr, in tproxy_tg6_v1()
162 tproto, &iph->saddr, laddr, in tproxy_tg6_v1()
173 tproto, &iph->saddr, ntohs(hp->source), in tproxy_tg6_v1()
[all …]
/linux/drivers/staging/r8188eu/core/
A Drtw_br_ext.c416 if (((unsigned char *)(iph) + (iph->ihl<<2)) >= (skb->data + ETH_HLEN + skb->len)) { in nat25_db_handle()
427 if (iph->saddr == 0) in nat25_db_handle()
429 tmp = be32_to_cpu(iph->saddr); in nat25_db_handle()
601iph->saddr.s6_addr16[0], iph->saddr.s6_addr16[1], iph->saddr.s6_addr16[2], iph->saddr.s6_addr16[3], in nat25_db_handle()
602iph->saddr.s6_addr16[4], iph->saddr.s6_addr16[5], iph->saddr.s6_addr16[6], iph->saddr.s6_addr16[7], in nat25_db_handle()
603iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16[2], iph->daddr.s6_addr16[3], in nat25_db_handle()
604iph->daddr.s6_addr16[4], iph->daddr.s6_addr16[5], iph->daddr.s6_addr16[6], iph->daddr.s6_addr16[7]… in nat25_db_handle()
611 if (iph->nexthdr == IPPROTO_ICMPV6 && in nat25_db_handle()
617 hdr->icmp6_cksum = csum_ipv6_magic(&iph->saddr, &iph->daddr, in nat25_db_handle()
618 iph->payload_len, in nat25_db_handle()
[all …]
/linux/net/ipv4/netfilter/
A Dnft_fib_ipv4.c34 struct iphdr *iph, _iph; in nft_fib4_eval_type() local
43 if (!iph) { in nft_fib4_eval_type()
49 addr = iph->daddr; in nft_fib4_eval_type()
51 addr = iph->saddr; in nft_fib4_eval_type()
63 struct iphdr *iph, _iph; in nft_fib4_eval() local
93 if (!iph) { in nft_fib4_eval()
98 if (ipv4_is_zeronet(iph->saddr)) { in nft_fib4_eval()
99 if (ipv4_is_lbcast(iph->daddr) || in nft_fib4_eval()
112 fl4.daddr = iph->daddr; in nft_fib4_eval()
113 fl4.saddr = get_saddr(iph->saddr); in nft_fib4_eval()
[all …]

Completed in 38 milliseconds

12345678910>>...12