Home
last modified time | relevance | path

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

12

/Linux-v5.15/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-v5.15/net/ipv4/
Dicmp.c106 struct icmphdr icmph; member
361 if (icmp_pointers[icmp_param->data.icmph.type].error) in icmp_glue_bits()
381 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply() local
386 (char *)icmph, in icmp_push_reply()
391 icmph->checksum = csum_fold(csum); in icmp_push_reply()
411 int type = icmp_param->data.icmph.type; in icmp_reply()
412 int code = icmp_param->data.icmph.code; in icmp_reply()
429 icmp_param->data.icmph.checksum = 0; in icmp_reply()
728 icmp_param.data.icmph.type = type; in __icmp_send()
729 icmp_param.data.icmph.code = code; in __icmp_send()
[all …]
Dping.c469 struct icmphdr *icmph; in ping_err() local
482 icmph = (struct icmphdr *)(skb->data + offset); in ping_err()
487 icmph = (struct icmphdr *) (skb->data + offset); in ping_err()
494 if (!ping_supported(family, icmph->type, icmph->code)) in ping_err()
498 skb->protocol, type, code, ntohs(icmph->un.echo.id), in ping_err()
499 ntohs(icmph->un.echo.sequence)); in ping_err()
501 sk = ping_lookup(net, skb, ntohs(icmph->un.echo.id)); in ping_err()
567 info, (u8 *)icmph); in ping_err()
571 info, (u8 *)icmph); in ping_err()
631 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
462 fl4->fl4_icmp_type = rfv->hdr.icmph.type; in raw_probe_proto_opt()
463 fl4->fl4_icmp_code = rfv->hdr.icmph.code; in raw_probe_proto_opt()
Droute.c1876 const struct icmphdr *icmph; in ip_multipath_l3_keys() local
1886 icmph = skb_header_pointer(skb, outer_iph->ihl * 4, sizeof(_icmph), in ip_multipath_l3_keys()
1888 if (!icmph) in ip_multipath_l3_keys()
1891 if (!icmp_is_err(icmph->type)) in ip_multipath_l3_keys()
3185 struct icmphdr *icmph; in inet_rtm_getroute_build_skb() local
3187 icmph = skb_put_zero(skb, sizeof(struct icmphdr)); in inet_rtm_getroute_build_skb()
3188 icmph->type = ICMP_ECHO; in inet_rtm_getroute_build_skb()
3189 icmph->code = 0; in inet_rtm_getroute_build_skb()
/Linux-v5.15/net/sched/
Dact_nat.c199 struct icmphdr *icmph; in tcf_nat_act() local
201 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + noff)) in tcf_nat_act()
204 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
206 if (!icmp_is_err(icmph->type)) in tcf_nat_act()
209 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph) + in tcf_nat_act()
213 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
214 iph = (void *)(icmph + 1); in tcf_nat_act()
223 if (skb_try_make_writable(skb, ihl + sizeof(*icmph) + in tcf_nat_act()
227 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act()
228 iph = (void *)(icmph + 1); in tcf_nat_act()
[all …]
Dact_csum.c150 struct icmphdr *icmph; in tcf_csum_ipv4_icmp() local
152 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp()
153 if (icmph == NULL) in tcf_csum_ipv4_icmp()
156 icmph->checksum = 0; in tcf_csum_ipv4_icmp()
157 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
158 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
/Linux-v5.15/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-v5.15/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-v5.15/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-v5.15/net/ipv6/
Dping.c130 pfh.icmph.type = user_icmph.icmp6_type; in ping_v6_sendmsg()
131 pfh.icmph.code = user_icmph.icmp6_code; in ping_v6_sendmsg()
132 pfh.icmph.checksum = 0; in ping_v6_sendmsg()
133 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg()
134 pfh.icmph.un.echo.sequence = user_icmph.icmp6_sequence; in ping_v6_sendmsg()
152 (struct icmp6hdr *)&pfh.icmph, len); in ping_v6_sendmsg()
Dndisc.c558 .icmph = { in ndisc_send_na()
632 .icmph = { in ndisc_send_ns()
692 .icmph = { in ndisc_send_rs()
979 msg->icmph.icmp6_solicited) { in ndisc_recv_na()
988 if (!msg->icmph.icmp6_solicited && idev && in ndisc_recv_na()
1049 msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, in ndisc_recv_na()
1051 (msg->icmph.icmp6_override ? NEIGH_UPDATE_F_OVERRIDE : 0)| in ndisc_recv_na()
1053 (msg->icmph.icmp6_router ? NEIGH_UPDATE_F_ISROUTER : 0), in ndisc_recv_na()
1257 (ra_msg->icmph.icmp6_addrconf_managed ? in ndisc_router_discovery()
1259 (ra_msg->icmph.icmp6_addrconf_other ? in ndisc_router_discovery()
[all …]
Ddatagram.c303 struct icmp6hdr *icmph = icmp6_hdr(skb); in ipv6_icmp_error() local
318 serr->ee.ee_type = icmph->icmp6_type; in ipv6_icmp_error()
319 serr->ee.ee_code = icmph->icmp6_code; in ipv6_icmp_error()
323 serr->addr_offset = (u8 *)&(((struct ipv6hdr *)(icmph + 1))->daddr) - in ipv6_icmp_error()
Dicmp.c720 struct icmp6hdr *icmph = icmp6_hdr(skb); in icmpv6_echo_reply() local
744 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
749 memcpy(&tmp_hdr, icmph, sizeof(tmp_hdr)); in icmpv6_echo_reply()
799 if (icmph->icmp6_type == ICMPV6_EXT_ECHO_REQUEST) in icmpv6_echo_reply()
/Linux-v5.15/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
121 icmph = skb_put_zero(nskb, sizeof(struct icmphdr)); in nf_reject_skb_v4_unreach()
122 icmph->type = ICMP_DEST_UNREACH; in nf_reject_skb_v4_unreach()
123 icmph->code = code; in nf_reject_skb_v4_unreach()
127 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nf_reject_skb_v4_unreach()
128 icmph->checksum = csum_fold(csum); in nf_reject_skb_v4_unreach()
/Linux-v5.15/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()
/Linux-v5.15/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()
378 if (ndmh->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) { in ipvlan_addr_lookup()
/Linux-v5.15/include/net/
Dndisc.h82 struct icmp6hdr icmph; member
88 struct icmp6hdr icmph; member
93 struct icmp6hdr icmph; member
99 struct icmp6hdr icmph; member
Dping.h57 struct icmphdr icmph; member
/Linux-v5.15/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-v5.15/drivers/net/usb/
Dcdc_mbim.c361 msg->icmph.icmp6_code == 0 && in is_neigh_solicit()
362 msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION); in is_neigh_solicit()
/Linux-v5.15/drivers/net/
Dvrf.c1295 const struct icmp6hdr *icmph; in ipv6_ndisc_frame() local
1298 icmph = skb_header_pointer(skb, sizeof(*iph), in ipv6_ndisc_frame()
1300 if (!icmph) in ipv6_ndisc_frame()
1303 switch (icmph->icmp6_type) { in ipv6_ndisc_frame()

12