Home
last modified time | relevance | path

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

12

/openbmc/linux/samples/bpf/
H A Dxdp_adjust_tail_kern.c83 struct icmphdr *icmp_hdr; in send_icmp4_too_big() local
93 icmp_hdr = data + off; in send_icmp4_too_big()
96 icmp_hdr->type = ICMP_DEST_UNREACH; in send_icmp4_too_big()
97 icmp_hdr->code = ICMP_FRAG_NEEDED; in send_icmp4_too_big()
98 icmp_hdr->un.frag.mtu = htons(max_pcktsz - sizeof(struct ethhdr)); in send_icmp4_too_big()
99 icmp_hdr->checksum = 0; in send_icmp4_too_big()
100 ipv4_csum(icmp_hdr, ICMP_TOOBIG_PAYLOAD_SIZE, &csum); in send_icmp4_too_big()
101 icmp_hdr->checksum = csum; in send_icmp4_too_big()
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dtest_xdp_noinline.c390 struct icmphdr *icmp_hdr; in send_icmp_reply() local
403 icmp_hdr = data + off; in send_icmp_reply()
404 icmp_hdr->type = 0; in send_icmp_reply()
422 struct icmp6hdr *icmp_hdr; in send_icmp6_reply() local
433 icmp_hdr = data + off; in send_icmp6_reply()
447 struct icmp6hdr *icmp_hdr; in parse_icmpv6() local
450 icmp_hdr = data + off; in parse_icmpv6()
472 struct icmphdr *icmp_hdr; in parse_icmp() local
475 icmp_hdr = data + off; in parse_icmp()
478 if (icmp_hdr->type == 8) in parse_icmp()
[all …]
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.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_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()
/openbmc/u-boot/net/
H A Dping.c25 struct icmp_hdr *icmp = (struct icmp_hdr *)(pkt + IP_HDR_SIZE); in set_icmp_header()
79 struct icmp_hdr *icmph = (struct icmp_hdr *)&ip->udp_src; in ping_receive()
H A Dnet.c1065 struct icmp_hdr *icmph = (struct icmp_hdr *)&ip->udp_src; in receive_icmp()
/openbmc/u-boot/drivers/net/
H A Dsandbox.c118 struct icmp_hdr *icmp; in sandbox_eth_ping_req_to_reply()
121 struct icmp_hdr *icmpr; in sandbox_eth_ping_req_to_reply()
131 icmp = (struct icmp_hdr *)&ip->udp_src; in sandbox_eth_ping_req_to_reply()
144 icmpr = (struct icmp_hdr *)&ipr->udp_src; in sandbox_eth_ping_req_to_reply()
216 struct icmp_hdr *icmpr; in sandbox_eth_recv_ping_req()
239 icmpr = (struct icmp_hdr *)&ipr->udp_src; in sandbox_eth_recv_ping_req()
/openbmc/linux/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.c385 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply()
881 icmph = icmp_hdr(skb); in icmp_unreach()
990 icmp_socket_deliver(skb, ntohl(icmp_hdr(skb)->un.gateway)); in icmp_redirect()
1018 icmp_param.data.icmph = *icmp_hdr(skb); in icmp_echo()
1172 icmp_param.data.icmph = *icmp_hdr(skb); in icmp_timestamp()
1236 icmph = icmp_hdr(skb); in icmp_rcv()
1373 int type = icmp_hdr(skb)->type; in icmp_err()
1374 int code = icmp_hdr(skb)->code; in icmp_err()
H A Dah4.c449 switch (icmp_hdr(skb)->type) { in ah4_err()
451 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in ah4_err()
465 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in ah4_err()
H A Dip_vti.c350 switch (icmp_hdr(skb)->type) { in vti4_err()
352 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in vti4_err()
366 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in vti4_err()
H A Dip_gre.c141 const int type = icmp_hdr(skb)->type; in ipgre_err()
142 const int code = icmp_hdr(skb)->code; in ipgre_err()
154 iph = (const struct iphdr *)(icmp_hdr(skb) + 1); in ipgre_err()
184 data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */ in ipgre_err()
231 const int type = icmp_hdr(skb)->type; in gre_err()
232 const int code = icmp_hdr(skb)->code; in gre_err()
H A Dipip.c133 const int type = icmp_hdr(skb)->type; in ipip_err()
134 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()
973 struct icmphdr *icmph = icmp_hdr(skb); in ping_rcv()
H A Dip_sockglue.c405 switch (icmp_hdr(skb)->type) { in ipv4_icmp_error_rfc4884()
410 icmp_hdr(skb)->un.reserved[1] * 4); in ipv4_icmp_error_rfc4884()
426 serr->ee.ee_type = icmp_hdr(skb)->type; in ip_icmp_error()
427 serr->ee.ee_code = icmp_hdr(skb)->code; in ip_icmp_error()
431 serr->addr_offset = (u8 *)&(((struct iphdr *)(icmp_hdr(skb) + 1))->daddr) - in ip_icmp_error()
H A Desp4.c977 switch (icmp_hdr(skb)->type) { in esp4_err()
979 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in esp4_err()
993 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in esp4_err()
/openbmc/linux/net/ipv6/
H A Dsysctl_net_ipv6.c291 net->ipv6.sysctl.icmp_hdr = register_net_sysctl_sz(net, in ipv6_sysctl_net_init()
295 if (!net->ipv6.sysctl.icmp_hdr) in ipv6_sysctl_net_init()
322 ipv6_icmp_table = net->ipv6.sysctl.icmp_hdr->ctl_table_arg; in ipv6_sysctl_net_exit()
324 unregister_net_sysctl_table(net->ipv6.sysctl.icmp_hdr); in ipv6_sysctl_net_exit()
/openbmc/linux/include/linux/
H A Dicmp.h20 static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb) in icmp_hdr() function
/openbmc/linux/include/net/netns/
H A Dipv6.h19 struct ctl_table_header *icmp_hdr; member
/openbmc/u-boot/test/dm/
H A Deth.c353 struct icmp_hdr *icmp; in sb_check_ping_reply()
365 icmp = (struct icmp_hdr *)&ip->udp_src; in sb_check_ping_reply()
/openbmc/u-boot/include/
H A Dnet.h448 struct icmp_hdr { struct
466 #define ICMP_HDR_SIZE (sizeof(struct icmp_hdr)) argument
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/mei/
H A Dnet.c229 icmp = icmp_hdr(skb); in iwl_mei_rx_filter_ipv4()
/openbmc/linux/net/xfrm/
H A Dxfrm_interface_core.c616 switch (icmp_hdr(skb)->type) { in xfrmi4_err()
618 if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) in xfrmi4_err()
638 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) in xfrmi4_err()
/openbmc/linux/net/dccp/
H A Dipv4.c250 const int type = icmp_hdr(skb)->type; in dccp_v4_err()
251 const int code = icmp_hdr(skb)->code; in dccp_v4_err()

12