Home
last modified time | relevance | path

Searched refs:icmp_hdr (Results 1 – 25 of 30) sorted by relevance

12

/linux-6.15/samples/bpf/
H A Dxdp_adjust_tail_kern.c84 struct icmphdr *icmp_hdr; in send_icmp4_too_big() local
94 icmp_hdr = data + off; in send_icmp4_too_big()
97 icmp_hdr->type = ICMP_DEST_UNREACH; in send_icmp4_too_big()
98 icmp_hdr->code = ICMP_FRAG_NEEDED; in send_icmp4_too_big()
99 icmp_hdr->un.frag.mtu = htons(max_pcktsz - sizeof(struct ethhdr)); in send_icmp4_too_big()
100 icmp_hdr->checksum = 0; in send_icmp4_too_big()
101 ipv4_csum(icmp_hdr, ICMP_TOOBIG_PAYLOAD_SIZE, &csum); in send_icmp4_too_big()
102 icmp_hdr->checksum = csum; in send_icmp4_too_big()
/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dtest_xdp_noinline.c403 struct icmphdr *icmp_hdr; in send_icmp_reply() local
416 icmp_hdr = data + off; in send_icmp_reply()
417 icmp_hdr->type = 0; in send_icmp_reply()
435 struct icmp6hdr *icmp_hdr; in send_icmp6_reply() local
446 icmp_hdr = data + off; in send_icmp6_reply()
460 struct icmp6hdr *icmp_hdr; in parse_icmpv6() local
463 icmp_hdr = data + off; in parse_icmpv6()
485 struct icmphdr *icmp_hdr; in parse_icmp() local
488 icmp_hdr = data + off; in parse_icmp()
491 if (icmp_hdr->type == 8) in parse_icmp()
[all …]
H A Dtest_l4lb.c237 struct icmp6hdr *icmp_hdr; in parse_icmpv6() local
240 icmp_hdr = data + off; in parse_icmpv6()
241 if (icmp_hdr + 1 > data_end) in parse_icmpv6()
243 if (icmp_hdr->icmp6_type != ICMPV6_PKT_TOOBIG) in parse_icmpv6()
259 struct icmphdr *icmp_hdr; in parse_icmp() local
262 icmp_hdr = data + off; in parse_icmp()
263 if (icmp_hdr + 1 > data_end) in parse_icmp()
265 if (icmp_hdr->type != ICMP_DEST_UNREACH || in parse_icmp()
266 icmp_hdr->code != ICMP_FRAG_NEEDED) in parse_icmp()
H A Dtest_l4lb_noinline.c236 struct icmp6hdr *icmp_hdr; in parse_icmpv6() local
239 icmp_hdr = data + off; in parse_icmpv6()
240 if (icmp_hdr + 1 > data_end) in parse_icmpv6()
242 if (icmp_hdr->icmp6_type != ICMPV6_PKT_TOOBIG) in parse_icmpv6()
258 struct icmphdr *icmp_hdr; in parse_icmp() local
261 icmp_hdr = data + off; in parse_icmp()
262 if (icmp_hdr + 1 > data_end) in parse_icmp()
264 if (icmp_hdr->type != ICMP_DEST_UNREACH || in parse_icmp()
265 icmp_hdr->code != ICMP_FRAG_NEEDED) in parse_icmp()
H A Dtest_l4lb_noinline_dynptr.c239 struct icmp6hdr *icmp_hdr; in parse_icmpv6() local
242 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_icmpv6()
243 if (!icmp_hdr) in parse_icmpv6()
246 if (icmp_hdr->icmp6_type != ICMPV6_PKT_TOOBIG) in parse_icmpv6()
264 struct icmphdr *icmp_hdr; in parse_icmp() local
267 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer_icmp, sizeof(buffer_icmp)); in parse_icmp()
268 if (!icmp_hdr) in parse_icmp()
270 if (icmp_hdr->type != ICMP_DEST_UNREACH || in parse_icmp()
271 icmp_hdr->code != ICMP_FRAG_NEEDED) in parse_icmp()
/linux-6.15/net/ipv4/
H A Dipcomp.c30 switch (icmp_hdr(skb)->type) { in ipcomp4_err()
32 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in ipcomp4_err()
47 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in ipcomp4_err()
H A Dicmp.c380 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply()
883 icmph = icmp_hdr(skb); in icmp_unreach()
992 icmp_socket_deliver(skb, ntohl(icmp_hdr(skb)->un.gateway)); in icmp_redirect()
1020 icmp_param.data.icmph = *icmp_hdr(skb); in icmp_echo()
1174 icmp_param.data.icmph = *icmp_hdr(skb); in icmp_timestamp()
1238 icmph = icmp_hdr(skb); in icmp_rcv()
1377 int type = icmp_hdr(skb)->type; in icmp_err()
1378 int code = icmp_hdr(skb)->code; in icmp_err()
H A Dah4.c446 switch (icmp_hdr(skb)->type) { in ah4_err()
448 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in ah4_err()
462 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in ah4_err()
H A Dip_vti.c356 switch (icmp_hdr(skb)->type) { in vti4_err()
358 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in vti4_err()
372 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in vti4_err()
H A Dipip.c134 const int type = icmp_hdr(skb)->type; in ipip_err()
135 const int code = icmp_hdr(skb)->code; in ipip_err()
H A Dping.c503 type = icmp_hdr(skb)->type; in ping_err()
504 code = icmp_hdr(skb)->code; in ping_err()
645 memcpy(icmp_hdr(skb), &pfh->icmph, sizeof(struct icmphdr)); in ping_v4_push_pending_frames()
970 struct icmphdr *icmph = icmp_hdr(skb); in ping_rcv()
H A Dip_gre.c142 const int type = icmp_hdr(skb)->type; in ipgre_err()
143 const int code = icmp_hdr(skb)->code; in ipgre_err()
154 iph = (const struct iphdr *)(icmp_hdr(skb) + 1); in ipgre_err()
195 data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */ in ipgre_err()
236 const int type = icmp_hdr(skb)->type; in gre_err()
237 const int code = icmp_hdr(skb)->code; in gre_err()
H A Dip_sockglue.c403 switch (icmp_hdr(skb)->type) { in ipv4_icmp_error_rfc4884()
408 icmp_hdr(skb)->un.reserved[1] * 4); in ipv4_icmp_error_rfc4884()
424 serr->ee.ee_type = icmp_hdr(skb)->type; in ip_icmp_error()
425 serr->ee.ee_code = icmp_hdr(skb)->code; in ip_icmp_error()
429 serr->addr_offset = (u8 *)&(((struct iphdr *)(icmp_hdr(skb) + 1))->daddr) - in ip_icmp_error()
H A Desp4.c938 switch (icmp_hdr(skb)->type) { in esp4_err()
940 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in esp4_err()
954 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in esp4_err()
H A Draw.c211 const int type = icmp_hdr(skb)->type; in raw_err()
212 const int code = icmp_hdr(skb)->code; in raw_err()
/linux-6.15/net/ipv6/
H A Dsysctl_net_ipv6.c289 net->ipv6.sysctl.icmp_hdr = register_net_sysctl_sz(net, in ipv6_sysctl_net_init()
293 if (!net->ipv6.sysctl.icmp_hdr) in ipv6_sysctl_net_init()
320 ipv6_icmp_table = net->ipv6.sysctl.icmp_hdr->ctl_table_arg; in ipv6_sysctl_net_exit()
322 unregister_net_sysctl_table(net->ipv6.sysctl.icmp_hdr); in ipv6_sysctl_net_exit()
H A Dsit.c531 const int type = icmp_hdr(skb)->type; in ipip6_err()
532 const int code = icmp_hdr(skb)->code; in ipip6_err()
559 data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */ in ipip6_err()
/linux-6.15/include/linux/
H A Dicmp.h20 static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb) in icmp_hdr() function
/linux-6.15/include/net/netns/
H A Dipv6.h19 struct ctl_table_header *icmp_hdr; member
/linux-6.15/drivers/net/wireless/intel/iwlwifi/mei/
H A Dnet.c229 icmp = icmp_hdr(skb); in iwl_mei_rx_filter_ipv4()
/linux-6.15/net/xfrm/
H A Dxfrm_interface_core.c614 switch (icmp_hdr(skb)->type) { in xfrmi4_err()
616 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in xfrmi4_err()
636 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in xfrmi4_err()
/linux-6.15/net/dccp/
H A Dipv4.c252 const int type = icmp_hdr(skb)->type; in dccp_v4_err()
253 const int code = icmp_hdr(skb)->code; in dccp_v4_err()
/linux-6.15/net/sctp/
H A Dinput.c610 const int type = icmp_hdr(skb)->type; in sctp_v4_err()
611 const int code = icmp_hdr(skb)->code; in sctp_v4_err()
/linux-6.15/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/
H A Ddr_ste_v0.c1418 u32 icmp_hdr; in dr_ste_v0_build_icmp_tag() local
1436 icmp_hdr = (*icmp_type << ICMP_TYPE_OFFSET_FIRST_DW) | in dr_ste_v0_build_icmp_tag()
1438 *(__be32 *)parser_ptr = cpu_to_be32(icmp_hdr); in dr_ste_v0_build_icmp_tag()
/linux-6.15/net/openvswitch/
H A Dflow.c752 struct icmphdr *icmp = icmp_hdr(skb); in key_extract_l3l4()

12