Home
last modified time | relevance | path

Searched refs:icmph (Results 1 – 25 of 28) sorted by relevance

12

/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dxdping_kern.c64 struct icmphdr *icmph; in icmp_check() local
81 icmph = data + sizeof(*eth) + sizeof(*iph); in icmp_check()
83 if (icmph->type != type) in icmp_check()
96 struct icmphdr *icmph; in xdping_client() local
110 icmph = data + sizeof(*eth) + sizeof(*iph); in xdping_client()
116 if (!pinginfo || pinginfo->seq != icmph->un.echo.sequence) in xdping_client()
141 icmph->type = ICMP_ECHO; in xdping_client()
142 seq = bpf_htons(bpf_ntohs(icmph->un.echo.sequence) + 1); in xdping_client()
143 icmph->un.echo.sequence = seq; in xdping_client()
144 icmph->checksum = 0; in xdping_client()
[all …]
/linux-6.1.9/net/ipv4/
Dicmp.c106 struct icmphdr icmph; member
355 if (icmp_pointers[icmp_param->data.icmph.type].error) in icmp_glue_bits()
374 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply() local
379 (char *)icmph, in icmp_push_reply()
384 icmph->checksum = csum_fold(csum); in icmp_push_reply()
404 int type = icmp_param->data.icmph.type; in icmp_reply()
405 int code = icmp_param->data.icmph.code; in icmp_reply()
422 icmp_param->data.icmph.checksum = 0; in icmp_reply()
721 icmp_param.data.icmph.type = type; in __icmp_send()
722 icmp_param.data.icmph.code = code; in __icmp_send()
[all …]
Dping.c502 struct icmphdr *icmph; in ping_err() local
515 icmph = (struct icmphdr *)(skb->data + offset); in ping_err()
520 icmph = (struct icmphdr *) (skb->data + offset); in ping_err()
527 if (!ping_supported(family, icmph->type, icmph->code)) in ping_err()
531 skb->protocol, type, code, ntohs(icmph->un.echo.id), in ping_err()
532 ntohs(icmph->un.echo.sequence)); in ping_err()
534 sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id)); in ping_err()
600 info, (u8 *)icmph); in ping_err()
604 info, (u8 *)icmph); in ping_err()
652 pfh->wcheck = csum_partial((char *)&pfh->icmph, in ping_v4_push_pending_frames()
[all …]
Dip_tunnel_core.c198 struct icmphdr *icmph; in iptunnel_pmtud_build_icmp() local
210 err = pskb_trim(skb, 576 - sizeof(*niph) - sizeof(*icmph)); in iptunnel_pmtud_build_icmp()
214 len = skb->len + sizeof(*icmph); in iptunnel_pmtud_build_icmp()
215 err = skb_cow(skb, sizeof(*niph) + sizeof(*icmph) + ETH_HLEN); in iptunnel_pmtud_build_icmp()
219 icmph = skb_push(skb, sizeof(*icmph)); in iptunnel_pmtud_build_icmp()
220 *icmph = (struct icmphdr) { in iptunnel_pmtud_build_icmp()
227 icmph->checksum = ip_compute_csum(icmph, len); in iptunnel_pmtud_build_icmp()
263 const struct icmphdr *icmph = icmp_hdr(skb); in iptunnel_pmtud_check_icmp() local
274 if (iph->protocol == IPPROTO_ICMP && icmp_is_err(icmph->type)) in iptunnel_pmtud_check_icmp()
Draw.c82 struct icmphdr icmph; member
434 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
435 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
/linux-6.1.9/net/sched/
Dact_nat.c198 struct icmphdr *icmph; in tcf_nat_act() local
200 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + noff)) in tcf_nat_act()
203 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
205 if (!icmp_is_err(icmph->type)) in tcf_nat_act()
208 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) + in tcf_nat_act()
212 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
213 iph = (void *)(icmph + 1); in tcf_nat_act()
222 if (skb_try_make_writable(skb, ihl + sizeof(*icmph) + in tcf_nat_act()
226 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
227 iph = (void *)(icmph + 1); in tcf_nat_act()
[all …]
Dact_csum.c149 struct icmphdr *icmph; in tcf_csum_ipv4_icmp() local
151 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp()
152 if (icmph == NULL) in tcf_csum_ipv4_icmp()
155 icmph->checksum = 0; in tcf_csum_ipv4_icmp()
156 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
157 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
/linux-6.1.9/net/batman-adv/
Drouting.c221 struct batadv_icmp_header *icmph; in batadv_recv_my_icmp_packet() local
224 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
226 switch (icmph->msg_type) { in batadv_recv_my_icmp_packet()
234 orig_node = batadv_orig_hash_find(bat_priv, icmph->orig); in batadv_recv_my_icmp_packet()
242 icmph = (struct batadv_icmp_header *)skb->data; in batadv_recv_my_icmp_packet()
244 ether_addr_copy(icmph->dst, icmph->orig); in batadv_recv_my_icmp_packet()
245 ether_addr_copy(icmph->orig, primary_if->net_dev->dev_addr); in batadv_recv_my_icmp_packet()
246 icmph->msg_type = BATADV_ECHO_REPLY; in batadv_recv_my_icmp_packet()
247 icmph->ttl = BATADV_TTL; in batadv_recv_my_icmp_packet()
342 struct batadv_icmp_header *icmph; in batadv_recv_icmp_packet() local
[all …]
/linux-6.1.9/net/bridge/
Dbr_arp_nd_proxy.c241 if (m->icmph.icmp6_code != 0 || in br_is_nd_neigh_msg()
242 (m->icmph.icmp6_type != NDISC_NEIGHBOUR_SOLICITATION && in br_is_nd_neigh_msg()
243 m->icmph.icmp6_type != NDISC_NEIGHBOUR_ADVERTISEMENT)) in br_is_nd_neigh_msg()
323 na->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; in br_nd_send()
324 na->icmph.icmp6_router = (n->flags & NTF_ROUTER) ? 1 : 0; in br_nd_send()
325 na->icmph.icmp6_override = 1; in br_nd_send()
326 na->icmph.icmp6_solicited = 1; in br_nd_send()
332 na->icmph.icmp6_cksum = csum_ipv6_magic(&pip6->saddr, in br_nd_send()
413 if (msg->icmph.icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT && in br_do_suppress_nd()
414 !msg->icmph.icmp6_solicited) { in br_do_suppress_nd()
[all …]
/linux-6.1.9/net/ipv6/netfilter/
Dnf_socket_ipv6.c31 struct icmp6hdr *icmph, _icmph; in extract_icmp6_fields() local
37 icmph = skb_header_pointer(skb, outside_hdrlen, in extract_icmp6_fields()
39 if (icmph == NULL) in extract_icmp6_fields()
42 if (icmph->icmp6_type & ICMPV6_INFOMSG_MASK) in extract_icmp6_fields()
/linux-6.1.9/net/ipv4/netfilter/
Dnf_socket_ipv4.c26 struct icmphdr *icmph, _icmph; in extract_icmp4_fields() local
29 icmph = skb_header_pointer(skb, outside_hdrlen, in extract_icmp4_fields()
31 if (icmph == NULL) in extract_icmp4_fields()
34 if (!icmp_is_err(icmph->type)) in extract_icmp4_fields()
Dnf_reject_ipv4.c81 struct icmphdr *icmph; in nf_reject_skb_v4_unreach() local
123 icmph = skb_put_zero(nskb, sizeof(struct icmphdr)); in nf_reject_skb_v4_unreach()
124 icmph->type = ICMP_DEST_UNREACH; in nf_reject_skb_v4_unreach()
125 icmph->code = code; in nf_reject_skb_v4_unreach()
129 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nf_reject_skb_v4_unreach()
130 icmph->checksum = csum_fold(csum); in nf_reject_skb_v4_unreach()
/linux-6.1.9/net/ipv6/
Dping.c168 pfh.icmph.type = user_icmph.icmp6_type; in ping_v6_sendmsg()
169 pfh.icmph.code = user_icmph.icmp6_code; in ping_v6_sendmsg()
170 pfh.icmph.checksum = 0; in ping_v6_sendmsg()
171 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg()
172 pfh.icmph.un.echo.sequence = user_icmph.icmp6_sequence; in ping_v6_sendmsg()
191 (struct icmp6hdr *)&pfh.icmph, len); in ping_v6_sendmsg()
Dndisc.c559 .icmph = { in ndisc_send_na()
627 .icmph = { in ndisc_ns_create()
708 .icmph = { in ndisc_send_rs()
1015 msg->icmph.icmp6_solicited) { in ndisc_recv_na()
1025 if (!msg->icmph.icmp6_solicited && idev && in ndisc_recv_na()
1082 new_state = msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE; in ndisc_recv_na()
1112 (msg->icmph.icmp6_override ? NEIGH_UPDATE_F_OVERRIDE : 0)| in ndisc_recv_na()
1114 (msg->icmph.icmp6_router ? NEIGH_UPDATE_F_ISROUTER : 0), in ndisc_recv_na()
1318 (ra_msg->icmph.icmp6_addrconf_managed ? in ndisc_router_discovery()
1320 (ra_msg->icmph.icmp6_addrconf_other ? in ndisc_router_discovery()
[all …]
Ddatagram.c308 struct icmp6hdr *icmph = icmp6_hdr(skb); in ipv6_icmp_error() local
323 serr->ee.ee_type = icmph->icmp6_type; in ipv6_icmp_error()
324 serr->ee.ee_code = icmph->icmp6_code; in ipv6_icmp_error()
328 serr->addr_offset = (u8 *)&(((struct ipv6hdr *)(icmph + 1))->daddr) - in ipv6_icmp_error()
Dicmp.c714 struct icmp6hdr *icmph = icmp6_hdr(skb); in icmpv6_echo_reply() local
738 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
743 memcpy(&tmp_hdr, icmph, sizeof(tmp_hdr)); in icmpv6_echo_reply()
793 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
/linux-6.1.9/net/netfilter/
Dnf_conntrack_proto_icmp.c209 const struct icmphdr *icmph; in nf_conntrack_icmpv4_error() local
213 icmph = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); in nf_conntrack_icmpv4_error()
214 if (icmph == NULL) { in nf_conntrack_icmpv4_error()
233 if (icmph->type > NR_ICMP_TYPES) { in nf_conntrack_icmpv4_error()
239 if (!icmp_is_err(icmph->type)) in nf_conntrack_icmpv4_error()
245 dataoff += sizeof(*icmph); in nf_conntrack_icmpv4_error()
Dxt_HMARK.c233 const struct icmphdr *icmph; in get_inner_hdr() local
237 icmph = skb_header_pointer(skb, *nhoff + iphsz, sizeof(_ih), &_ih); in get_inner_hdr()
238 if (icmph == NULL || icmph->type > NR_ICMP_TYPES) in get_inner_hdr()
242 if (!icmp_is_err(icmph->type)) in get_inner_hdr()
Dnf_conntrack_proto_icmpv6.c152 if (rd_msg->icmph.icmp6_code != 0) in nf_conntrack_icmpv6_redirect()
/linux-6.1.9/drivers/net/ipvlan/
Dipvlan_core.c186 struct icmp6hdr *icmph; in ipvlan_get_L3_hdr() local
188 if (unlikely(!pskb_may_pull(skb, sizeof(*ip6h) + sizeof(*icmph)))) in ipvlan_get_L3_hdr()
192 icmph = (struct icmp6hdr *)(ip6h + 1); in ipvlan_get_L3_hdr()
194 if (icmph->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) { in ipvlan_get_L3_hdr()
196 if (unlikely(!pskb_may_pull(skb, sizeof(*ip6h) + sizeof(*icmph) in ipvlan_get_L3_hdr()
201 icmph = (struct icmp6hdr *)(ip6h + 1); in ipvlan_get_L3_hdr()
205 lyr3h = icmph; in ipvlan_get_L3_hdr()
377 if (ndmh->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) { in ipvlan_addr_lookup()
/linux-6.1.9/include/net/
Dndisc.h82 struct icmp6hdr icmph; member
88 struct icmp6hdr icmph; member
93 struct icmp6hdr icmph; member
99 struct icmp6hdr icmph; member
Dping.h54 struct icmphdr icmph; member
/linux-6.1.9/net/netfilter/ipvs/
Dip_vs_core.c87 #define icmp_id(icmph) (((icmph)->un).echo.id) argument
88 #define icmpv6_id(icmph) (icmph->icmp6_dataun.u_echo.identifier) argument
753 struct icmphdr *icmph = (struct icmphdr *)(skb_network_header(skb) + in ip_vs_nat_icmp() local
755 struct iphdr *ciph = (struct iphdr *)(icmph + 1); in ip_vs_nat_icmp()
781 icmph->checksum = 0; in ip_vs_nat_icmp()
782 icmph->checksum = ip_vs_checksum_complete(skb, icmp_offset); in ip_vs_nat_icmp()
801 struct icmp6hdr *icmph; in ip_vs_nat_icmp_v6() local
806 icmph = (struct icmp6hdr *)(skb_network_header(skb) + icmp_offset); in ip_vs_nat_icmp_v6()
835 icmph->icmp6_cksum = ~csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip_vs_nat_icmp_v6()
/linux-6.1.9/drivers/net/usb/
Dcdc_mbim.c362 msg->icmph.icmp6_code == 0 && in is_neigh_solicit()
363 msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION); in is_neigh_solicit()
/linux-6.1.9/drivers/net/
Dvrf.c1318 const struct icmp6hdr *icmph; in ipv6_ndisc_frame() local
1321 icmph = skb_header_pointer(skb, sizeof(*iph), in ipv6_ndisc_frame()
1323 if (!icmph) in ipv6_ndisc_frame()
1326 switch (icmph->icmp6_type) { in ipv6_ndisc_frame()

12